+ tfprintf(ofile, "\t!db !constbyte\n", 0);
+}
+
+/*-----------------------------------------------------------------*/
+/* return the generic pointer high byte for a given pointer type. */
+/*-----------------------------------------------------------------*/
+int pointerTypeToGPByte(const int p_type)
+{
+ switch (p_type)
+ {
+ case IPOINTER:
+ case POINTER:
+ return 0;
+ case GPOINTER:
+ /* hack - if we get a generic pointer, we just assume
+ * it's an FPOINTER (i.e. in XDATA space).
+ */
+ case FPOINTER:
+ return 1;
+ case CPOINTER:
+ return 2;
+ case PPOINTER:
+ return 3;
+ default:
+ fprintf(stderr, "*** internal error: unknown pointer type %d in GPByte.\n",
+ p_type);
+ break;
+ }
+ return -1;
+}
+
+
+/*-----------------------------------------------------------------*/
+/* printPointerType - generates ival for pointer type */
+/*-----------------------------------------------------------------*/
+void _printPointerType(FILE *oFile, const char *name)
+{
+ if (IS_DS390_PORT)
+ {
+ fprintf(oFile, "\t.byte %s,(%s >> 8),(%s >> 16)",name,name,name);
+ }
+ else
+ {
+ fprintf(oFile, "\t.byte %s,(%s >> 8)",name,name);
+ }
+}
+
+/*-----------------------------------------------------------------*/
+/* printPointerType - generates ival for pointer type */
+/*-----------------------------------------------------------------*/
+void printPointerType(FILE *oFile, const char *name)
+{
+ _printPointerType(oFile, name);
+ fprintf(oFile, "\n");
+}
+
+/*-----------------------------------------------------------------*/
+/* printGPointerType - generates ival for generic pointer type */
+/*-----------------------------------------------------------------*/
+void printGPointerType(FILE *oFile, const char *name,
+ const unsigned int type)
+{
+ _printPointerType(oFile,name);
+ fprintf(oFile, ",#0x%02x\n", pointerTypeToGPByte(type));