Microsoft (R) Macro Assembler Version 5.10                  2/14/25 23:45:29
GRTAB - DEFINE ROM GRAPHIC CHARACTERS FOR 128-255           Page     1-1


					PAGE	90,132			;A2
					TITLE	GRTAB - DEFINE ROM GRAPHIC CHARACTERS FOR 128-255
					ELSE
				;	    %OUT    GRTAB.SAL...
					ENDIF
 = 0001				LISTPARM =	1			;0=SUPPRESS LIST; 1=ALLOW LIST		;AN000;
				;.XLIST 				;					  ;AN000;
				;****************** START OF SPECIFICATIONS *****************************
				; MODULE NAME: GRTAB
				;	       (MAIN ROUTINE FOR UTILITY "GRAFTABL")
				
				; DESCRIPTIVE NAME: Makes resident a 1K block of data defining the
				;		    graphic character set when in graphics mode.
				
				;FUNCTION:  When in normal text mode (BASIC SCREEN 0), the CGA will properly
				;	    handle all 255 characters in the screen display.
				;	    However, when in graphics mode (BASIC SCREEN 1), then only the
				;	    first 128 characters are properly shown on the screen.
				;	    The upper 128 characters are defined in graphics mode by
				;	    the 8 by 128 byte table pointed to by interrupt 1FH
				;	    vector, which is normally set to 0:0, thus producing
				;	    garbage on the screen for the upper set of characters.
				
				;	    The purpose of this routine is to define an 8 by 128 byte
				;	    table that defines each of these graphic characters in
				;	    the upper 128 byte range, and also to put the vector
				;	    pointer to this table into the interrupt 1FH.  Once
				;	    loaded, this table remains resident.
				
				;	    An interrupt handler is hooked into the INT 2FH vector that
				;	    screens INT 2FH calls for the MULTIPLEX ID value of hex B0,
				;	    as defined by an equate, MY_MULTIPLEX_NUMBER, in GRATABHAN.
				;	    The response indicates that GRAFTABL has been loaded, thus
				;	    permitting the redefinition of the original 1K table with
				;	    some new specification.
				
				; ENTRY POINT: Entry_Point, JMP from GRTABHAN.SAL at his ORG 100H.
				;    LINKAGE: [d:][path] GRAFTABL [437 | 850 | 860 | 863 | 865 | ? | /STATUS]
				
				; INPUT: (DOS COMMAND LINE PARAMETERS)
				;	'/STATUS'- (OR /STA) Identify the table already loaded, if any.
				;	'?'	- Display the list of operands supported by GRAFTABL.
				;	437  - Install the USA Graphic Character Set
				;	(BLANK) - Means same as '437', the 'USA' definition table
				;	850  - Install the Multi-lingual Graphic Character Set
				;	860  - Install the Portuguese Graphic Character Set
				;	863  - Install the Canadian French Graphic Character Set
				;	865  - Install the Nordic Graphic Character Set
				
				; EXIT-NORMAL:	ERRORLEVEL 0 - Leaving the 1K block of newly defined
				;			       characters resident.  There was no
				;			       previously defined character table.
				;			       Available RAM reduced by hex 1360 bytes.
				
				;		ERRORLEVEL 1 - No change in size of available RAM storage.
				;			       A previously loaded character table exists.
				;			       If a new table was requested, it has replaced
				;			       the previous table at its original location.
				
				;		ERRORLEVEL 2 - No change in size of available RAM storage.
				;			       No previously loaded character table exists.
				;
				;				(The request for status, with parm="/sta[tus]",
				;				or the request for HELP, with parm="?",
				;				will result in either code 1 or 2.)
				
				; EXIT-ERROR: ERRORLEVEL 3 - Incorrect parameter.
				;			     No action taken, assumes "?" requested HELP.
				;			     No change in size of available RAM storage.
				
				;	      ERRORLEVEL 4 - Incorrect version of DOS, DOS 4.0 required
				
				; EFFECTS: Either the desired table is hooked into Interrupt 1FH,
				;	   or the identity of the previously loaded table is
				;	   displayed.
				
				; INTERNAL REFERENCES:
				;    ROUTINES:
				;	FINDTYPE - Scan existing table to see who is already loaded
				;	MOVTAB - Moves the specified table to overlay a portion of the PSP
				;	BADPARMS - Displays error message, and sets error ERRORLEVEL code
				;	SENDMSG - passes parms to regs and invokes the system message routine.
				
				;    DATA AREAS:
				;	PSP - Contains the DOS command line parameters.  Partly overlayed
				;	      with the installation of the character table.
Microsoft (R) Macro Assembler Version 5.10                  2/14/25 23:45:29
GRTAB - DEFINE ROM GRAPHIC CHARACTERS FOR 128-255           Page     1-2


				;	WORKAREA - Temporary storage
				
				; EXTERNAL REFERENCES:
				;    ROUTINES:
				;	GRTABHAN (ENTRY is "HANDLER") - hooked into INT 2FH to identify
				;		 that GRAFTABL is loaded and resident.
				;	SYSDISPMSG - Uses the MSG parm lists to construct the messages
				;		 on STDOUT.
				;	SYSLOADMSG - Loads messages, makes them accessable.
				;	SYSPARSE - Processes the DOS Command line, finds parms.
				;	PARSE - Interfaces with the system Parser.
				
				;    DATA AREAS:
				;	GRTABUS - 1k binary table of the USA graphic character set
				;	GRTABML - 1k binary table of the Multi-Lingual graphic
				;		  character set
				;	GRTABPO - 1k binary table of the Portuguese graphic
				;		  character set
				;	GRTABCF - 1k binary table of the Canada French graphic
				;		  character set
				;	GRTABNO - 1k binary table of the Nordic graphic character
				;		  set
				;	GRTABSM - Definition of messages, text and MSG parm lists,
				;		  and COPYRIGHT notice
				;	GRTABPAR - Control blocks to define the DOS command line parms.
				;	MPEXNUM - Byte containing the value of the multiplex number
				;		(For ease of patching, if such should ever become needed,
				;		this byte is immediately just before the interrupt 2FH
				;		handler's entry point, after that handler is loaded.  To
				;		change this value here in these source modules, that value
				;		is defined in GRTABHAN as the equate: MY_MULTIPLEX_NUMBER.
				;		For purposes of patching the GRAFTABL.EXE file, this byte
				;		is at offset 5FH into the module.)
				
				; NOTES:
				;	 This module should be processed with the SALUT preprocessor
				;	 with the re-alignment not requested, as:
				
				;		SALUT GRTAB,NUL
				
				;	 To assemble these modules, the alphabetical or sequential
				;	 ordering of segments may be used.
				
				;	 Sample LINK command:
				
				; LINK @GRTABLK.ARF
				
				; Where the GRTABLK.ARF is defined as:
				;	 GRTABHAN+    (must be first in this list)
				;	 GRTABUS+     (these languages must be linked in this order)
				;	 GRTABML+     (Multi-Lingual)
				;	 GRTABPO+     (Portuguese)
				;	 GRTABCF+     (Canadian French)
				;	 GRTABNO+     (Nordic)
				;	 GRTABSM+     (contains COPYRIGHT, SYSDISPMSG, SYSLOADMSG code)
				;	 GRTABPAR+    (contains PARSE control blocks, code to call SYSPARSE)
				;	 GRTABP+      (contains SYSPARSE to decode COMMAND line parms)
				;	 GRTAB	      (MAIN ROUTINE)
				;	 GRAFTABL;
				
				;	 These modules must be linked in this order.  The load module is
				;	 a COM file, to be converted to COM with EXE2BIN.
				
				; REVISION HISTORY:
				;	     A000 Version 4.00: add PARSER, System Message Handler,
				;	     A001 PTM 382 display "ACTIVE" OR "PREVIOUS" CP.
				;	     A002 PTM 474 Avoid duplicate switches
				;	     A003 PTM 538 Display parm in error
				;	     A004 PTM1821 INCLUDE COPYRIGH.INC moved to msg_service macro.
				;	     A005 PTM3262 specify BASESW EQU 1 before PARSE.ASM
				;	     A006 PTM3512 PATHGEN START/END LABELS
				;	     A007 PTM3621 break up large help msg into smaller messages
				;	     A008 PTM3899 Free Environment, close all STDxxx handles
				;			when leaving a resident portion
				;
				; COPYRIGHT: The following notice is found in the OBJ code generated from
				;	     the "GRTABSM.ASM" module:
				
				;	     "Version 4.00 (C) Copyright Microsoft Corp 1981, 1988"
				;	     "Licensed Material - Program Property of Microsoft"
				
				;****************** END OF SPECIFICATIONS *****************************
					HEADER	<MACRO DEFINITIONS, LOCAL EQUATES>
Microsoft (R) Macro Assembler Version 5.10                  2/14/25 23:45:29
GRTAB - DEFINE ROM GRAPHIC CHARACTERS FOR 128-255           Page     1-3
MACRO DEFINITIONS, LOCAL EQUATES	   ;                       

					INCLUDE PATHMAC.INC		;AN006;
			     C	;;***********************************************************************
			     C	;; NAME: pathlabl
			     C	;; DESC: creates a public label at the spot it is placed, using the name
			     C	;;       given.
			     C	;; INPUT: either module name or procedure name
			     C	;; OUTPUT: public label
			     C	;; LOGIC: LBL-parameter-name will have four values -
			     C	;;            - one for each pass (2)
			     C	;;            - one for start and one for stop
			     C	;;        if LBL is not defined, it is first pass, at beginning label
			     C	;;              - set it to 1 and create the start label
			     C	;;        if LBL = 1, it is first pass, at end label
			     C	;;              - set it to 2 and create stop label
			     C	;;        if LBL = 2, it is second pass, at beginning label
			     C	;;              - set it to 3 and create the start label
			     C	;;        if LBL = 3, it is second pass, at end label
			     C	;;              - set it to 4 and create stop label
			     C	;;        if LBL = 4, it is second pass,
			     C	;;              - this macro has been invoked more than twice with same parm
			     C	;;              - issue error message
			     C	;;***********************************************************************
			     C	
			     C	pathlabl MACRO pnam
			     C	IFNDEF LBL_&pnam                        ;;IF THIS IS THE FIRST TIME,
			     C	    LBL_&pnam = 0                       ;;DEFINE IT, INITIALLY ZERO
			     C	ELSE                                    ;;SINCE IT IS DEFINED
			     C	    IF (LBL_&pnam GT 3)                 ;;IF USED TOO MANY TIMES,
			     C	        .ERR NON-UNIQUE OPERAND ON PATHLABL
			     C	        EXITM                           ;;ABORT THIS GENERATION
			     C	    ENDIF
			     C	ENDIF
			     C	
			     C	IF (LBL_&pnam EQ 0) OR (LBL_&pnam EQ 2) ;;ready for START?
			     C	    $$A_START_&pnam:                    ;;create START label
			     C	    PUBLIC $$A_START_&pnam              ;;make it public
			     C	ELSE                                    ;;SINCE SWITCH MAY BE 1 OR 3,
			     C	    $$A_STOP_&pnam:                     ;;create STOP label
			     C	    PUBLIC $$A_STOP_&pnam               ;;make it public
			     C	ENDIF
			     C	LBL_&pnam = LBL_&pnam + 1               ;;INCREMENT SWITCH
			     C	ENDM
				;				   $SALUT (0,36,41,52)
				DOSCALL 			   MACRO FN,SF	   ;;				;AN000;
								   IFNB <FN>	   ;;ARE THERE ANY PARMS AT ALL?;AN000;
								   IFNB <SF>	   ;;				;AN000;
								   MOV	AX,(FN SHL 8)+SF ;;AH=FN;AH=SF		;AN000;
								   ELSE 	   ;;SINCE THERE IS NO SUB FUNC ;AN000;
								   MOV	AH,FN	   ;;				;AN000;
								   ENDIF	   ;;				;AN000;
								   ENDIF	   ;;				;AN000;
								   INT	21H	   ;;				;AN000;
								   ENDM 	   ;;				;AN000;
				; =  =	=  =  =  =  =  =  =  =	=  =
				;		  $SALUT (4,19,23,36)
				FIXLIST 	  MACRO LP,DOIT    ;;						;AN000;
				IF		  LP		   ;;						;AN000;
				DOIT				   ;;						;AN000;
				ENDIF				   ;;						;AN000;
						  ENDM		   ;;						;AN000;
				; =  =	=  =  =  =  =  =  =  =	=  =
				HEADER		  MACRO TEXT	   ;;						;AN000;
						  FIXLIST LISTPARM,.XLIST ;;					;AN000;
						  SUBTTL TEXT	   ;;						;AN000;
						  FIXLIST LISTPARM,.LIST ;;					;AN000;
						  PAGE		   ;;						;AN000;
						  ENDM		   ;;						;AN000;
				; =  =	=  =  =  =  =  =  =  =	=  =
				;		DEFINITION OF FUNCTIONS TO BE REQUESTED OF INT 2FH
 = 0000				GET_INST_STATE	  EQU 0 	   ;FUNCTION = "GET INSTALLED STATE"
 = 0001				WHERE_R_U	  EQU 1 	   ;FUNCTION = "WHERE ARE YOU?"
								   ; REQUESTS VECTOR OF LOADED TABLE BE
								   ; PUT IN VECTOR POINTED TO BY DS:[BX]
				
				;		DOS FUNCTIONS:
 = 0009				SHOW_MSG	  EQU 09H	   ;"SEND MESSAGE TO CONSOLE" DOS FUNCTION
 = 0025				SET_VECT	  EQU 25H	   ;"SET VECTOR" DOS FUNCTION
 = 0030				GET_VERSION	  EQU 30H	   ;"GET DOS VERSION"
 = 0031				RET_RES 	  EQU 31H	   ;"RETURN TO DOS" REMAIN RESIDENT
 = 0035				GET_VECT	  EQU 35H	   ;"GET VECTOR" DOS FUNCTION
 = 003E				CLOSE		  EQU 3EH	   ;AN008; CLOSE A FILE HANDLE
 = 0049				FREE_AL_MEM	  EQU 49H	   ;AN008; FREE ALLOCATED MEM
 = 004C				RET_FN		  EQU 4CH	   ;"RETURN TO DOS" NOT REMAIN RESIDENT
				
				;		VECTOR TABLE ENTRIES USED
 = 001F				VEC_GRAF_CHAR	  EQU 1FH	   ;VECTOR THAT POINTS TO GRAPHIC CHAR TABLE
Microsoft (R) Macro Assembler Version 5.10                  2/14/25 23:45:29
GRTAB - DEFINE ROM GRAPHIC CHARACTERS FOR 128-255           Page     1-4
MACRO DEFINITIONS, LOCAL EQUATES	   ;                       

 = 002F				VEC_MULTIPLX	  EQU 2FH	   ;VECTOR OF MULTIPLEX HANDLER
 = 0021				VEC_DOS 	  EQU 21H	   ;VECTOR POINTS TO DOS FUNCTIONS
 = 0020				VEC_RET 	  EQU 20H	   ;RETURN TO DOS, WITHOUT RET CODE		;AN000;
				
				;		DOS COMMAND LINE PARAMETERS
 =-0001				RETCODE_QUESTION  EQU -1	   ;VALUE IN BX, IF PARM=?
 = 0000				ZERO		  EQU 0 	   ;VALUE IN BX IF PARM=/STATUS OR /STA
						  FIXLIST LISTPARM,.XLIST ;					;AN000;
				
				;		STANDARD FILE HANDLES
 = 0000				STDIN		  EQU 0 	   ;AN008; STANDARD INPUT DEVICE
 = 0001				STDOUT		  EQU 1 	   ;STANDARD OUTPUT DEVICE
 = 0002				STDERR		  EQU 2 	   ;STANDARD ERROR OUTPUT DEVICE
 = 0003				STDAUX		  EQU 3 	   ;AN008; STANDARD AUX DEVICE
 = 0004				STDPRN		  EQU 4 	   ;AN008; STANDARD PRINTER DEVICE
				
				;		OTHER EQUATES
 = 0020				BLANK		  EQU " "	   ;BLANK CHARACTER
 = 0004				NIBBLE_SIZE	  EQU 4 	   ;SHIFT COUNT TO MOVE ONE NIBBLE		;AN000;
						  FIXLIST LISTPARM,.XLIST ;					;AN000;
				
						  EXTRN HANDLER_SIZE:ABS ;THE BYTE SIZE REQUIREMENTS
						  EXTRN CPID_L:ABS ;NO. BYTES IN EACH CPID ENTRY
				
				VECTOR		  STRUC 	   ;DEFINITION OF ANY DOUBLE WORD VECTOR POINTER
 0000  0000			VECOFF		  DW  ? 	   ;OFFSET PORTION OF VECTOR POINTER
 0002  0000			VECSEG		  DW  ? 	   ;SEGMENT PORTION OF VECTOR POINTER
 0004				VECTOR		  ENDS
				; = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
				LANGUAGE	  STRUC 	   ;DEFINITION OF EACH LANGUAGE TABLE
 0000  0400[			LANCHAR 	  DB  1024 DUP(?)  ;8 BYTES PER EACH OF 128 CHARACTERS
	   ??			
			 ]	
				
 0400  0000			LANID		  DW  ? 	   ;TWO BYTE CODEPAGE ID, TO MATCH
								   ; GRAFTABL CMD LINE PARM
 0402  000E[			LANNAME 	  DB  14 DUP(?)    ;ASCIIZ STRING NAME OF LANGUAGE
	   ??			
			 ]	
				
 0410				LANGUAGE	  ENDS
				
 = 0410				TABSIZE 	  EQU SIZE LANCHAR + SIZE LANID + SIZE LANNAME ;SIZE OF
								   ; EACH GRAPHIC CHAR TABLE + ID + NAME
				; = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
				;		VALUES FOR THE MSG_DESC CONTROL BLOCK
 = 0001				ONE_SUBS	  EQU 1 	   ;ONE VARIABLE FIELD IN MESSAGE		;AN000;
 = 0002				TWO_SUBS	  EQU 2 	   ;TWO VARIABLE FIELDS IN MESSAGE		;AN000;
 = 0100				CLASS_1 	  EQU 0100H	   ;CLASS 1 (DOS EXTENDED ERRORS)		;AN000;
 = 0200				CLASS_2 	  EQU 0200H	   ;CLASS 2 (PARSE ERRORS)			;AN000;
 = 0A00				CLASS_A 	  EQU 0A00H	   ;CLASS A TYPE MESSAGE			;AN000;
				
				;THIS MESSAGE DESCRIPTOR CONTROL BLOCK IS GENERATED, ONE PER MESSAGE,
				;TO DEFINE THE SEVERAL PARAMETERS THAT ARE EXPECTED TO BE PASSED IN
				;CERTAIN REGISTERS WHEN THE SYSDISPMSG FUNCTION IS TO BE INVOKED.
				
				MSG_DESC	  STRUC 	   ;						;AN000;
 0000  0000			MSG_NUM 	  DW  0 	   ;MESSAGE NUMBER (TO AX)			;AN000;
 0002  0001			MSG_HANDLE	  DW  STDOUT	   ;HANDLE OF OUTPUT DEVICE (TO BX)		;AN000;
 0004  0000			MSG_SUBLIST	  DW  0 	   ;POINTER TO SUBLIST (TO SI)			;AN000;
 0006  0000			MSG_COUNT	  DW  0 	   ;SUBSTITUTION COUNT (TO CX)			;AN000;
 0008  0A00			MSG_CLASS	  DW  CLASS_A	   ;MESSAGE CLASS (IN HIGH BYTE, TO DH) 	;AN000;
								   ; LOW BYTE HAS 0 (FUNCTION "NO INPUT", TO DL)
 000A				MSG_DESC	  ENDS		   ;						;AN000;
				; = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
				SUBLIST 	  STRUC 	   ;						;AN000;
 0000  0B			SUB_SIZE	  DB  TYPE SUBLIST ;SUBLIST SIZE (POINTER TO NEXT SUBLIST)	;AN000;
 0001  00			SUB_RES 	  DB  0 	   ;RESERVED					;AN000;
								   ;NEXT FIELD IS TO BE USED AS A DOUBLE WORD
 0002  0000			SUB_VALUE	  DW  0 	   ;TIME, DATE, OR PTR TO DATA ITEM		;AN000;
 0004  0000			SUB_VALUE_SEG	  DW  0 	   ;SEG ID OF PTR				;AN000;
								   ;(ABOVE FIELD MUST BE FILLED AT EXECUTION TIME
								   ; IF THIS IS A .COM FILE)
 0006  00			SUB_ID		  DB  0 	   ;N OF %N					;AN000;
 0007  00			SUB_FLAGS	  DB  0 	   ;DATA TYPE FLAGS				;AN000;
 0008  00			SUB_MAX_WIDTH	  DB  0 	   ;MAXIMUM FIELD WIDTH (0=UNLIMITED)		;AN000;
 0009  00			SUB_MIN_WIDTH	  DB  0 	   ;MINIMUM FIELD WIDTH 			;AN000;
 000A  20			SUB_PAD_CHAR	  DB  " "	   ;CHARACTER FOR PAD FIELD			;AN000;
 000B				SUBLIST 	  ENDS		   ;						;AN000;
				; = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
				DEFPSP		  STRUC
 0000  002C[					  DB  2CH DUP(?)   ;AN008;
	   ??			
			 ]	
				
 002C  0000			ENVIRON_SEG	  DW  ? 	   ;AN008; SEG ID OF ENVIRONMENT
Microsoft (R) Macro Assembler Version 5.10                  2/14/25 23:45:29
GRTAB - DEFINE ROM GRAPHIC CHARACTERS FOR 128-255           Page     1-5
MACRO DEFINITIONS, LOCAL EQUATES	   ;                       

 002E  0032[					  DB  32H DUP(?)   ;AN008; SET WHERE
	   ??			
			 ]	
				
 0060  0020[			MOV_DEST	  DB  20H DUP(?)   ; INT HANDLER IS TO BE MOVED TO
	   ??			
			 ]	
				
								   ;AT MOV_DEST+HANDLER_SIZE WILL GO THE
								   ; TABLE ITSELF
 0080  00			PARMCNT 	  DB  ? 	   ;COUNT OF CHARS IN DOS COMMAND LINE PARM LIST
 0081  007F[			PARMDOS 	  DB  127 DUP(?)   ;DOS COMMAND LINE PARM TEXT
	   ??			
			 ]	
				
 0100				DEFPSP		  ENDS
				
 = 0100				PSPSIZE 	  EQU SIZE DEFPSP  ;SIZE OF THE PSP ITSELF
 = 00A0				SHIFT_SIZE	  EQU PSPSIZE - MOV_DEST ; HOW FAR HANDLER/TABLE MOVED
								   ;WHEN THEY BECAME RESIDENT
 = 000A				SHIFT_SIZE_SEG	  EQU SHIFT_SIZE SHR NIBBLE_SIZE ;DIVIDE BY 16			;AN000;
								   ; TO CONVERT BYTES TO SEGS
				; = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
				.LIST
						  HEADER <EXTERNALS AND WORKAREA>
Microsoft (R) Macro Assembler Version 5.10                  2/14/25 23:45:29
GRTAB - DEFINE ROM GRAPHIC CHARACTERS FOR 128-255           Page     1-6
EXTERNALS AND WORKAREA	   ;                                 

				;    $SALUT (4,6,12,28)
				
 0000				CSEG SEGMENT WORD PUBLIC
				     ASSUME CS:CSEG	   ;AS A .COM FILE, THE DOS
				     ASSUME DS:CSEG	   ;  LOADER HAS ALREADY
				     ASSUME ES:CSEG	   ;  INITIALIZED ALL THESE
				     ASSUME SS:CSEG	   ;  SEGMENT REGISTERS
				
 = 0000				GRTAB_BASE EQU $	   ;FOR EASE IN DEBUGGING				;AN000;
				     PUBLIC GRTAB_BASE	   ; TELL LINK MAP WHERE THIS IS			;AN000;
				
				     EXTRN END_PSP:BYTE    ;MOVE RESIDENT CODE FROM HERE TO "MOV_DEST"
				     EXTRN MPEXNUM:BYTE    ;MULTIPLEXOR ID VALUE
				     EXTRN HANDLER:NEAR    ;ENTRY TO INT2FH HANDLER
				     EXTRN PREV_OWN:DWORD  ;VECTOR TO SAVE PREVIOUS INT2FH OWNER
				     EXTRN PATCH_OFF:WORD  ;THESE TWO PATCH LOCATION IN GRTABHAN.SAL
				     EXTRN PATCH_SEG:WORD  ; ARE TO RECEIVE LOCATION WHERE TABLE IS MOVED TO
				     EXTRN TABLEUS:BYTE    ;START OF THE USA CHAR TABLE
				     EXTRN COPYRIGHT:BYTE  ;USED TO MARK THE END OF THE ARRAY OF CHAR TABLES
							   ; THE COPYRIGHT TEXT IS ITSELF UN-REFERENCED
				     FIXLIST LISTPARM,.XLIST ;							;AN000;
				     EXTRN MSGNUM_EXTERR:WORD ;ALL DOS EXTENDED ERRORS				;AN000;
				     EXTRN MSGNUM_PARSE:WORD ;ALL PARSING ERRORS				;AN000;
				     EXTRN SUBLIST_PARSE:WORD ;DEFINES THE BAD PARM AS %0			;AN003;
				     EXTRN MSGNUM_VER:WORD ;"Incorrect DOS Version"				;AN000;
				     EXTRN MSGNUM_ACTIVE:WORD ;"Active Code Page: %1"				;AN000;
				     EXTRN MSGNUM_PREVIOUS:WORD ;"Previous Code Page: %1"			;AN000;
				     EXTRN CPID:BYTE	   ;4 BYTE STRING OF CODE PAGE ID			;AN000;
				     EXTRN SLIST_23:WORD   ;SET VECTOR TO POINT TO "NONE" OR "NON-STANDARD",	;AN000;
							   ; OR TO ONE OF THE "CPID" ENTRIES
				     EXTRN MSGNUM_NONE:WORD ;"None"						;AN000;
				     EXTRN MSGNUM_NSTD:WORD ;"Non-Standard"					;AN000;
				     EXTRN MSGNUM_HELP_TITLE:WORD ;"DOS command line parameters supported:"	;AN000;
				     EXTRN MSGNUM_HELP_TITLE7:WORD ;AN007;
				     EXTRN MSGNUM_HELP_TITLE8:WORD ;AN007;
				     EXTRN MSGNUM_HELP_TITLE9:WORD ;AN007;
				     EXTRN MSGNUM_HELP_TITLE10:WORD ;AN007;
				     EXTRN SYSDISPMSG:NEAR ;DISPLAY MESSAGE SUBROUTINE				;AN000;
				     EXTRN SYSLOADMSG:NEAR ;LOAD MESSAGE SUBROUTINE				;AN000;
				     EXTRN SYSGETMSG:NEAR  ;GET MESSAGE SUBROUTINE				;AN000;
				     EXTRN PARSER:NEAR	   ;INVOKES SYSTEM DOS COMMAND LINE PARSER		;AN000;
				;		$SALUT (4,17,22,32)
 0000  00000000			WHERE		DD   0	       ;VECTOR POINTING TO PREVIOUS GRAFTABL TABLE
							       ; VECTOR AS SET BY "GRTABHAN" MULTIPLEX HANDLER.
							       ;THIS IS NOT NECESSARILY WHAT INT 1FH HAS.
 0004  0000			ADPSP		DW   0	       ;SEG ID OF PSP.
							       ; CHANGED TO SHOW ITS SHIFTED LOCATION
						FIXLIST LISTPARM,.XLIST ;					;AN000;
 0006  0000			RESSIZE_PARA	DW   0	       ;SIZE OF RESIDENT PORTION, HANDLER+TABLE, IN PARAGRAPHS
 0008  0000			RESSIZE_BYTE	DW   0	       ;SIZE OF RESIDENT PORTION, HANDLER+TABLE, IN BYTES
 000A  0000			SAVESI		DW   0	       ;REMEMBER WHERE CURRENT TABLE STARTS
 000C  0000 E			CPIDPOINTER	DW   CPID      ;POINTER TO ENTRY IN CPID TABLE OF PREVIOUS ENTRY
 000E  0000 E			ACTIVECPID	DW   CPID      ;POINTER TO ENTRY IN CPID TABLE OF ACTIVE ENTRY
						PUBLIC ACTIVECPID
 0010  0000			IDXXX		DW   0	       ;ID OF PREVIOUSLY LOADED TABLE
 0012  00			INSTALLED	DB   0	       ;OUTPUT OF INT 2FH, "FF"=GRAFTABL ALREADY INSTALLED
							       ; AND 'WHERE' WILL POINT TO PREVIOUS TABLE
							       ;"00"=GRAFTABL NOT INSTALLED
				
				;		DEFINITIONS OF VALUES OF CONTENTS OF "INSTALLED".
 = 00FF				LOADED		EQU  0FFH      ;GRAFTABLE IS ALREADY IN VECTOR
				
				
				;		DEFINITIONS OF VALUES OF CONTENTS OF 'EXITFL'.
				;		THESE VALUES ARE THE RETURN CODES CHECKED BY ERRORLEVEL.
 = 0004				EXVER		EQU  4	       ;RETURN TO DOS, INVALID DOS VERSION
 = 0003				EXPAR		EQU  3	       ;RETURN TO DOS, INVALID DOS COMMAND LINE PARMS
							       ; OR SYSTEM MESSAGE HANDLER ERROR
 = 0002				EXNONE		EQU  2	       ;RETURN TO DOS, NO TABLE WAS LOADED
 = 0001				EXDOS		EQU  1	       ;RETURN TO DOS, CHAR TABLE PREVIOUSLY LOADED
 = 0000				EXRES		EQU  0	       ;RETURN TO DOS, LEAVING THE 1K BLOCK OF CHAR RESIDENT
				
 0013  01			EXITFL		DB   EXDOS     ;ERRORLEVEL RETURN CODE, INITIALLY SET TO "EXDOS"
						PUBLIC EXITFL
 0014  00			BAD1F		DB   0	       ;FLAG, GET SET TO "RESET" IF GRAFTABL FONT IS
 = 0001				RESET		EQU  1	       ; LOADED, BUT 1FH DOES NOT POINT TO IT
				; = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
						PATHLABL GRTAB ;AN006;
 0015                        1	    $$A_START_GRTAB:                    ; 
				;  $SALUT (3,4,9,32)
				   HEADER <EXECUTABLE CODE, INITIALIZATION>
Microsoft (R) Macro Assembler Version 5.10                  2/14/25 23:45:29
GRTAB - DEFINE ROM GRAPHIC CHARACTERS FOR 128-255           Page     1-7
EXECUTABLE CODE, INITIALIZATION	   ;                        

 0015				MAIN PROC NEAR
 0015				ENTRY_POINT LABEL NEAR	       ;JUMPED TO FROM ENTRY POINT IN GRTABHAN
				   PUBLIC ENTRY_POINT
				;VERSION CHECKING AND SYSTEM MESSAGE INITIALIZATION
				
 0015  E8 0000 E		   CALL SYSLOADMSG	       ; INIT SYSMSG HANDLER				;AN000;
				
				;  $IF	C		       ; IF THERE WAS A PROBLEM 			;AN000;
 0018  73 0C			   JNC $$IF1
 001A  E8 0000 E		      CALL SYSDISPMSG	       ; LET HIM SAY WHY HE HAD A PROBLEM		;AN000;
				
 001D  C6 06 0013 R 04		      MOV  EXITFL,EXVER        ; TELL ERRORLEVEL BAD DOS VERSION		;AN000;
 0022  B4 4C			      MOV  AH,RET_FN	       ;RETURN TO DOS, DO NOT STAY RESIDENT		;AN000;
				;  $ELSE		       ; SINCE SYSDISPMSG IS HAPPY			;AN000;
 0024  EB 04			   JMP SHORT $$EN1
 0026				$$IF1:
 0026  FC			      CLD		       ;CLEAR DIRECTION TO AUTO-INCREMENT		;AN000;
 0027  E8 0031 R		      CALL MAIN_GRTAB	       ;PERFORM REST OF GRAFTABL FUNCTIONS		;AN000;
							       ;AH=DOS FUNCTION OF TYPE OF RETURN TO DOS
				;  $ENDIF		       ;LOAD OF SYS MSGS OK?				;AN000;
 002A				$$EN1:
 002A  A0 0013 R		   MOV	AL,EXITFL	       ;PASS BACK ERRORLEVEL RET CODE
 002D  CD 21			   INT	VEC_DOS 	       ;(21H) RETURN TO DOS WITH RET CODE
				
 002F  CD 20			   INT	VEC_RET 	       ;(20H) IF ABOVE NOT WORK, EXIT ANYWAY		;AN000;
 0031				MAIN ENDP
				; = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
				   HEADER <MAIN_GRTAB - PERFORM FUNCTIONS INDICATED BY PARMS>
Microsoft (R) Macro Assembler Version 5.10                  2/14/25 23:45:29
GRTAB - DEFINE ROM GRAPHIC CHARACTERS FOR 128-255           Page     1-8
MAIN_GRTAB - PERFORM FUNCTIONS INDICATED BY PARMS	   ;      

 0031				MAIN_GRTAB PROC NEAR
				   PUBLIC MAIN_GRTAB
				;INPUT: SYSTEM MESSAGE HANDLER IS LOADED, DOS VERSION IS CORRECT.
				;OUTPUT: AH=FUNCTION NUMBER FOR PROPER TYPE OF RETURN TO DOS.
				
 0031  8C 0E 0004 E		   MOV	SLIST_23.SUB_VALUE_SEG,CS ;DO MY OWN SEGMENT FIXUPS			;AN000;
 0035  8C 0E 0004 E		   MOV	SUBLIST_PARSE.SUB_VALUE_SEG,CS ;					;AN003;
				
 0039  8C 06 0004 R		   MOV	ADPSP,ES	       ;SAVE SEG ID OF PSP
 003D  83 2E 0004 R 0A		   SUB	ADPSP,SHIFT_SIZE_SEG   ;WHERE THE SEG BASE OF MOVED INT HANDLER WILL BE
 0042  06			   PUSH ES		       ;SAVE PSP SEGID
				
 0043  B8 0000 E		   MOV	AX,HANDLER_SIZE        ;GET SIZE OF MULTIPLEX HANDLER (NOT PSP) 	;AN000;
 0046  05 0410			   ADD	AX,TABSIZE	       ;ADD THE SIZE OF THE CHAR TABLE
 0049  A3 0008 R		   MOV	RESSIZE_BYTE,AX        ;SAVE BYTE LENGTH OF HANDLER + CHAR TABLE
							       ; THIS IS THE AMOUNT TO BE SHIFTED
 004C  05 0060			   ADD	AX,OFFSET MOV_DEST     ;ADD ON PART OF PSP NOT OVERLAID BY CODE MOVE	;AN000;
 004F  B1 04			   MOV	CL,NIBBLE_SIZE	       ;DIVIDE						;AN000;
 0051  D3 E8			   SHR	AX,CL		       ; BYTE SIZE BY 16
 0053  A3 0006 R		   MOV	RESSIZE_PARA,AX        ;SAVE PARA LENGTH OF HANDLER + CHAR TABLE
							       ; AND FIRST PART OF PSP
							       ;THIS IS THE AMOUNT TO STAY RESIDENT
				
							       ;PATCH INT2FH HANDLER IN CASE LATER
							       ; IT BECOMES RESIDENT AND IS ASKED
							       ; TO TELL WHERE ITS CHAR TABLE WENT
 0056  A1 0004 R		   MOV	AX,ADPSP	       ;TELL INT2FH HANDLER WHERE TO SAY HIS TABLE IS
 0059  A3 0000 E		   MOV	PATCH_SEG,AX
 005C  C7 06 0000 E 0000 E	   MOV	PATCH_OFF,OFFSET TABLEUS ;TELL INT2FH HANDLER
							       ; WHERE TO SAY HIS TABLE IS
 0062  B4 35			   MOV	AH,GET_VECT	       ;REQUEST "GET VECTOR" FUNCTION
 0064  B0 2F			   MOV	AL,VEC_MULTIPLX        ; FOR INTERRUPT 2FH
 0066  CD 21			   INT	VEC_DOS 	       ;OUTPUT: ES:BX = VECTOR OF CONTENTS
				
				   ASSUME ES:NOTHING	       ;SINCE ORIG PSP POINTER IS LOST
							       ;PATCH INT2FH HANDLER TO TELL HIM WHERE
							       ; THE CURRENT INT2FH HANDLER IS IN CASE
							       ; THIS NEW HANDLER REPLACES THE OLD ONE
 0068  89 1E 0000 E		   MOV	PREV_OWN.VECOFF,BX     ;REMEMBER WHERE THE PREVIOUS
 006C  8C 06 0002 E		   MOV	PREV_OWN.VECSEG,ES     ; OWNER OF INT 2FH WAS
				
 0070  07			   POP	ES		       ;RESTORE THE PSP SEGID BAS			;AN000;
				   ASSUME ES:CSEG	       ;REG IS RESET BACK LIKE IT WAS
 0071  E8 00C1 R		   CALL FINDTYPE	       ;SET 'IDXXX' TO SHOW
							       ; WHAT IS IN THE LOW RAM TABLE NOW
				
				   FIXLIST LISTPARM,.XLIST     ;						;AN000;
 0074  E8 0000 E		   CALL PARSER		       ;LOOK AT DOS COMMAND LINE PARMS			;AN000;
				
							       ;IF A CODEPAGE NUMBER WAS SPECIFIED
							       ;   BX = OFFSET TO LANGUAGE TABLE TO BE LOADED
							       ;   DX = INTEGER VALUE OF CODEPAGE SPECIFIED
							       ;IF /STATUS WAS SPECIFIED
							       ;   BX = 0
							       ;IF QUESTION MARK WAS SPECIFIED
							       ;   BX=-1
				
 0077  E8 016C R		   CALL DOFUNCTION	       ; RESPOND TO PARMS				;AN000;
							       ; SETTING 'EXITFL' TO INDICATE RESULTS
				
				
				   FIXLIST LISTPARM,.XLIST     ;						;AN000;
				
 007A  80 3E 0013 R 00		   CMP	EXITFL,EXRES	       ;CHECK THE EXIT TYPE FLAG
				;  $IF	E		       ;IF NEW TABLE HAS JUST BEEN LOADED
 007F  75 3D			   JNE $$IF4
				;THE INT2FH HANDLER AND THE CHAR TABLE HAVE ALREADY BEEN MOVED INTO THE PSP.
				;CHANGE THE TWO VECTORS TO POINT TO WHERE THEN WENT.
				;THE TWO VECTORS ARE:
				;      2FH  - MULTIPLEX INTERRUPT HANDLER
				;      1FH  - 128 CHAR DEFINITION TABLE
				
 0081  1E			      PUSH DS
				
 0082  A1 0004 R		      MOV  AX,ADPSP
 0085  8E D8			      MOV  DS,AX	       ;FIND SEG WHERE TABLE WENT
				      ASSUME DS:NOTHING
				
				;SET INTERRUPT VECTOR 1FH TO POINT TO WHERE THE CHAR TABLE IS
 0087  8D 16 0000 E		      LEA  DX,TABLEUS	       ;WHERE CHAR TABLE IS
							       ; DS:DX = VECTOR POINTING TO CHAR TABLE AFTER MOVE
 008B  B4 25			      MOV  AH,SET_VECT	       ;FUNCTION TO MOVE DS:DX INTO VECTOR FOR INT 1FH
 008D  B0 1F			      MOV  AL,VEC_GRAF_CHAR    ;INTERRUPT NUMBER TO RECEIVE NEW CONTENTS
 008F  CD 21			      INT  VEC_DOS	       ;CHANGE THE VECTOR
				
				;SET INTERRUPT VECTOR 2FH (MULTIPLEXOR) TO WHERE THE INTERRUPT HANDLER IS
Microsoft (R) Macro Assembler Version 5.10                  2/14/25 23:45:29
GRTAB - DEFINE ROM GRAPHIC CHARACTERS FOR 128-255           Page     1-9
MAIN_GRTAB - PERFORM FUNCTIONS INDICATED BY PARMS	   ;      

 0091  8D 16 0000 E		      LEA  DX,HANDLER	       ;SET DS:DX = INT 2FH INTERRUPT HANDLER
 0095  B4 25			      MOV  AH,SET_VECT	       ;FUNCTION TO MOVE DS:DX INTO VECTOR FOR INT 2FH
 0097  B0 2F			      MOV  AL,VEC_MULTIPLX     ;CHANGE THE CONTENTS OF THE MULTIPLEX INTERRUPT
 0099  CD 21			      INT  VEC_DOS	       ;HOOK IN THE INTERRUPT HANDLER
				
 009B  1F			      POP  DS		       ;RESTORE SEG REG
				      ASSUME DS:CSEG
				
				;FREE THE SEGMENT CONTAINING THE ENVIRONMENT
 009C  06			      PUSH ES		       ;AN008; SAVE NORMAL ES
 009D  A1 002C			      MOV  AX,DS:ENVIRON_SEG   ;AN008; FROM PSP GET SEG OF ENVIRONMENT
 00A0  8E C0			      MOV  ES,AX	       ;AN008; SET SEGREG TO POINT TO ENVIRONMENT SEG
				      ASSUME ES:NOTHING        ;AN008; ES NOW HAS SEG OF ENVIRONMENT
				
 00A2  B4 49			      MOV  AH,FREE_AL_MEM      ;AN008; (49H) FREE MEM ALLOC TO ENVIRON
							       ;ES = SEGID OF BLOCK BEING RETURNED
 00A4  CD 21			      INT  VEC_DOS	       ;AN008; FREE ENVIRONMENT
							       ;IF CARRY IS SET, THERE WAS A PROBLEM
							       ;THIS IS NOT CHECKED, IGNORING ANY ERROR
				
 00A6  07			      POP  ES		       ;AN008; RESTORE ES TO NORMAL VALUE
				      ASSUME ES:CSEG	       ;AN008;
				
				;LOOP THRU ALL THE STANDARD EXTERNALLY OPENED HANDLES, 0-4,
				; AND CLOSE EACH ONE BEFORE RETURNING TO DOS, STAYING RESIDENT.
 00A7  BB 0000			      MOV  BX,STDIN	       ;AN008; START WITH FIRST STANDARD HANDLE
				;     $DO  COMPLEX
 00AA  EB 01			      JMP SHORT $$SD5
 00AC				$$DO5:
 00AC  43				 INC  BX	       ;AN008; SELECT NEXT HANDLE
				;     $STRTDO
 00AD				$$SD5:
 00AD  B4 3E				 MOV  AH,CLOSE	       ;AN008; (3EH) CLOSE A FILE HANDLE
							       ; BX=FILE HANDLE
 00AF  CD 21				 INT  VEC_DOS	       ;AN008; CLOSE THE HANDLE
							       ;CARRY IS SET IF A PROBLEM WITH CLOSE
							       ;IN THIS CASE, ERRORS ARE IGNORED.
				
 00B1  83 FB 04				 CMP  BX,STDPRN        ;AN008; WAS THIS THE LAST ONE?
				;     $ENDDO E		       ;AN008; QUIT IF LAST ONE
 00B4  75 F6			      JNE $$DO5
				
				;SET UP TO LEAVE A PORTION OF GRAFTABL RESIDENT:
				; THE MULTIPLEXOR INTERRUPT HANDLER, AND
				; THE FIRST 1K PIXEL TABLE.
				
 00B6  8B 16 0006 R		      MOV  DX,RESSIZE_PARA     ;MARK END OF AREA TO REMAIN RESIDENT
 00BA  B4 31			      MOV  AH,RET_RES	       ;FUNCTION TO RETURN TO DOS, BUT STAY RESIDENT
				;  $ELSE		       ;SINCE NEW TABLE NOT LOADED
 00BC  EB 02			   JMP SHORT $$EN4
 00BE				$$IF4:
							       ; MAYBE BECAUSE TABLE ALREADY LOADED
							       ; OR MAYBE BECAUSE BAD DOS COMMAND LINE PARMS
 00BE  B4 4C			      MOV  AH,RET_FN	       ;RETURN TO DOS, DO NOT STAY RESIDENT
				;  $ENDIF
 00C0				$$EN4:
 00C0  C3			   RET			       ;RETURN TO CALLER
 00C1				MAIN_GRTAB ENDP
				; = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
				   HEADER <LOCAL SUBROUTINES, SCAN TO SEE WHO IS ALREADY LOADED>
Microsoft (R) Macro Assembler Version 5.10                  2/14/25 23:45:29
GRTAB - DEFINE ROM GRAPHIC CHARACTERS FOR 128-255           Page     1-10
LOCAL SUBROUTINES, SCAN TO SEE WHO IS ALREADY LOADED	   ;   

 00C1				FINDTYPE PROC NEAR
				   PUBLIC FINDTYPE
				;OUTPUT =  IDXXX HAS 2 CHAR ID OF WHATEVER IS ALREADY LOADED
				;	     OR IS JUST 0 IF 1FH DOES NOT POINT TO A GRAFTABL DEFINED FONT.
				;	   SUBLIST_23 IS SET TO CONTAIN THE ORIGINAL CP PREVIOUSLY LOADED
				;	   OR "NONE".  THIS SUBLIST IS USED BY BOTH MESSAGES 2 AND 3
				;	   WHICH STATE THE "ACTIVE CODEPAGE" AND "PREVIOUS CODEPAGE".
				;	   THE MESSAGE ACTUALLY TO USE THIS SUBLIST IS SELECTED IN "DOFUNCTION"
				;	   AFTER INTERROGATING THE PARMS, SO THAT "/STATUS" & "?" WILL REFER TO
				;	   THE "ACTIVE CODEPAGE", AND OTHER REQUESTS WILL SAY "PREVIOUS CP".
				
				   ASSUME ES:NOTHING
 00C1  8A 26 0000 E		   MOV	AH,MPEXNUM	       ;REQUEST "GET INSTALLED STATE"
 00C5  B0 00			   MOV	AL,GET_INST_STATE      ;IDENTIFY THAT IT IS ME I AM LOOKING FOR
							       ;AH=MULTIPLEXOR NUMBER, AL=FUNCTION REQUEST
 00C7  CD 2F			   INT	VEC_MULTIPLX	       ;SEE IF I AM ALREADY LOADED
				
 00C9  A2 0012 R		   MOV	INSTALLED,AL	       ;SAVE THE "INSTALLED?" INDICATOR
 00CC  3C FF			   CMP	AL,LOADED
				;  $IF	E		       ;IF I AM ALREADY INSTALLED
 00CE  75 78			   JNE $$IF10
				;		GRAFTABL HAS BEEN LOADED.  SEVERAL CONDITIONS MAY EXIST:
				;		  INT 1FH STILL POINTS TO THE TABLE GRAFTABL LOADED
				;			AND THAT TABLE HAS NOT BEEN ALTERED.
				;		  INT 1FH STILL POINTS TO THE TABLE GRAFTABL LOADED
				;			BUT THE CONTENTS OF THAT TABLE HAS BEEN ALTERED.
				;		  INT 1FH NO LONGER POINTS TO THE TABLE GRAFTABL LOADED,
				;			BUT POINTS TO SOME OTHER CHARACTER TABLE.
				
				;		NOW WE ASK THE MULTIPLEXOR HANDLER OF GRAFTABLE, SINCE WE
				;		KNOW HE HAS BEEN LOADED, TO TELL US WHERE HIS GRAFTABL
				;		CHARACTER FONT TABLE IS IN RESIDENT RAM, BY SETTING THE
				;		DWORD AT "WHERE" TO POINT TO THE OLD GRAFTABL FONT TABLE.
				
							       ;AH STILL SHOULD HAVE "MY_MULTIPLEX_NUMBER"
 00D0  B0 01			      MOV  AL,WHERE_R_U        ;ASK "WHERE ARE YOU"
 00D2  8D 1E 0000 R		      LEA  BX,WHERE	       ;PASS POINTER TO VECTOR TO RECEIVE ANSWER
							       ;AH=MULTIPLEXOR NUMBER, AL=FUNCTION REQUEST
							       ;DS:BX POINTS TO "WHERE", TO RECEIVE RESPONSE
 00D6  CD 2F			      INT  VEC_MULTIPLX        ;SET VECTOR "WHERE" TO POINT TO HIS TABLE
				
				;		COMPARE THE CONTENTS OF VECTOR 1FH WITH THE VECTOR AT "WHERE"
				;		WHICH POINTS TO THE CURRENTLY LOADED TABLE OF GRAFTABL.
				;		THE USER MAY HAVE ALTERED THE CONTENTS OF VECTOR 1FH AFTER
				;		HAVING PREVIOUSLY LOADED A GRAFTABL CHARACTER FONT.
 00D8  33 C0			      XOR  AX,AX	       ;ZERO A REG
 00DA  8E C0			      MOV  ES,AX	       ;LOOK AT THE VECTOR TABLE
							       ;ES IS STILL ASSUMED "NOTHING"
 00DC  26: A1 007C		      MOV  AX,ES:[VEC_GRAF_CHAR * DWORD] ;AN000;
 00E0  3B 06 0000 R		      CMP  AX,WHERE.VECOFF
				;     $IF  E,AND
 00E4  75 56			      JNE $$IF11
 00E6  26: A1 007E		      MOV  AX,ES:[VEC_GRAF_CHAR * 4]+2 ;AN000;
 00EA  3B 06 0002 R		      CMP  AX,WHERE.VECSEG
				;     $IF  E		       ;IF THE 1FH VECTOR IS POINTING TO A GRAFTABLE
 00EE  75 4C			      JNE $$IF11
							       ; DEFINED CHARACTER TABLE.
							       ;NOW TO FIND OUT WHICH TABLE HE IS POINT TO.
 00F0  8D 36 0000 E			 LEA  SI,TABLEUS       ;GET WHERE NEW TABLE IS IN THIS LOAD MODULE
							       ; DS:SI POINT TO NEW TABLE
				;		IN THIS SEARCH, WE ARE GOING TO STEP THRU THE ARRAY OF
				;		TABLES WE HAVE DEFINED, COMPARING EACH ONE WITH WHATEVER "WHERE"
				;		POINTS TO, TO SEE IF WHAT WAS PREVIOUSLY LOADED IS LIKE ONE
				;		OF THE TABLES WE HAVE DEFINED HERE.  A MATCH LETS US IDENTIFY
				;		THE ONE PREVIOUSLY LOADED; A NON-MATCH MEANS THAT WHATEVER
				;		THAT WAS PREVIOUSLY LOADED HAS APPARENTLY BEEN ALTERED,
				;		SO WHATEVER IT WAS, WE CANNOT SAY WHICH TABLE IT IS, AND SO WE
				;		IDENTIFY IT AS SIMPLY A NON-STANDARD TABLE.  THIS SEARCH WILL
				;		SELECT WHICH OF TWO MESSAGES TO BE DISPLAYED.
 00F4  89 36 000A R			 MOV  SAVESI,SI        ;SAVE WHERE TABLE STARTS
				;	 $SEARCH COMPLEX
 00F8  EB 12				 JMP SHORT $$SS12
 00FA				$$DO12:
 00FA  81 06 000C R 0000 E		    ADD  CPIDPOINTER,CPID_L ;BUMP TO NEXT ENTRY IN CPID TABLE.		;AN000;
 0100  8B 36 000A R			    MOV  SI,SAVESI     ;GO BACK TO START OF TABLE			;AN000;
 0104  81 C6 0410			    ADD  SI,TABSIZE    ;BUMP TO NEXT TABLE				;AN000;
 0108  89 36 000A R			    MOV  SAVESI,SI     ;SAVE WHERE TABLE STARTS 			;AN000;
				;	 $STRTSRCH
 010C				$$SS12:
				;		   THIS CHANGES ES TO PREVIOUSLY LOADED TABLE
				
 010C  C4 3E 0000 R			    LES  DI,WHERE      ;GET THE CONTENTS OF THE VECTOR
							       ;ES:DI POINTS TO THE OLD TABLE OF CHARACTERS
							       ;ES IS STILL ASSUMED "NOTHING"
 0110  B9 0410				    MOV  CX,TABSIZE    ;GET SIZE OF TABLE
 0113  F3/ A6				    REP  CMPSB	       ;COMPARE ES:[DI] WITH DS:[SI]
Microsoft (R) Macro Assembler Version 5.10                  2/14/25 23:45:29
GRTAB - DEFINE ROM GRAPHIC CHARACTERS FOR 128-255           Page     1-11
LOCAL SUBROUTINES, SCAN TO SEE WHO IS ALREADY LOADED	   ;   

				;	 $EXITIF E	       ;IF THIS TABLE ALREADY LOADED
 0115  75 16				 JNE $$IF12
 0117  C4 3E 0000 R			    LES  DI,WHERE      ;RESTORE THE POINTERS TO RESIDENT TABLE
 011B  26: 8B 85 0400			    MOV  AX,ES:[DI].LANID ;PICK UP 2 CHAR ID OF PREVIOUS TABLE
 0120  A3 0010 R			    MOV  IDXXX,AX      ;REMEMBER WHAT THAT WAS PREVIOUSLY LOADED
				
 0123  1E				    PUSH DS	       ;SET UP THE ES REG TO				;AN000;
 0124  07				    POP  ES	       ;  BE THE SAME AS DS, THE COMMON SEGMENT 	;AN000;
					    ASSUME ES:CSEG     ;						;AN000;
				
 0125  A1 000C R			    MOV  AX,CPIDPOINTER ;GET OFFSET TO CURRENT CPID ENTRY		;AN000;
 0128  A3 0002 E			    MOV  SLIST_23.SUB_VALUE,AX ;PUT CP NAME IN MSG			;AN000;
							       ;SO MSG IS "PREVIOUS CODE PAGE: XXX"
					    FIXLIST LISTPARM,.XLIST ;						;AN000;
				;	 $ORELSE	       ;SINCE THIS VERSION IS NOT ALREADY LOADED
 012B  EB 0D				 JMP SHORT $$SR12
 012D				$$IF12:
					    ASSUME ES:NOTHING  ;SINCE BASE REG NOT RESET YET,
 012D  8D 06 0000 E			    LEA  AX,COPYRIGHT  ;WHICH IS IMMEDIATELY FOLLOWING THE LAST TABLE
 0131  3B C6				    CMP  AX,SI	       ;HAVE WE INCREMENTED THE INDEX TO BE BEYOND
							       ; THE LAST TABLE TO BE CHECKED
				;	 $ENDLOOP BE	       ;QUIT IF NO NEXT TABLE TO BE LOOKED AT
 0133  77 C5				 JNBE $$DO12
 0135  1E				    PUSH DS	       ;SET UP THE ES REG TO				;AN000;
 0136  07				    POP  ES	       ;  BE THE SAME AS DS, THE COMMON SEGMENT 	;AN000;
					    ASSUME ES:CSEG     ;TELL THE ASSEMBLER WHAT I JUST DID		;AN000;
				
					    FIXLIST LISTPARM,.XLIST ;						;AN000;
 0137  E8 014E R			    CALL PREV_NONSTD   ;SET MSG TO SAY "NON STANDARD"			;AN000;
							       ; SO MSG IS "PREVIOUS CODE PAGE: NON-STANDARD"
				;	 $ENDSRCH
 013A				$$SR12:
				;     $ELSE		       ;SINCE THE 1FH VECTOR DOES NOT POINT TO
 013A  EB 0A			      JMP SHORT $$EN11
 013C				$$IF11:
							       ; THE SAME PLACE AS "WHERE"
							       ; THEN THE USER MUST HAVE USED GRAFTABL TO
							       ; LOAD A CHAR FONT, THEN LOADED SOME OTHER
							       ; TABLE AND CHANGED VECTOR 1FH TO POINT TO THE NEW ONE.
 013C  1E				 PUSH DS	       ;SET UP THE ES REG TO				;AN000;
 013D  07				 POP  ES	       ;  BE THE SAME AS DS, THE COMMON SEGMENT 	;AN000;
					 ASSUME ES:CSEG        ;TELL THE ASSEMBLER WHAT I JUST DID		;AN000;
				
 013E  E8 014E R			 CALL PREV_NONSTD      ;SET MSG TO SAY "NON STANDARD"			;AN000;
				
					 FIXLIST LISTPARM,.XLIST ;						;AN000;
 0141  C6 06 0014 R 01			 MOV  BAD1F,RESET      ;INDICATE THAT THE 1FH VECTOR DOES NOT POINT
							       ; TO THE GRAFTABL FONT
				;     $ENDIF		       ;HAS 1Fh BEEN CHANGED?
 0146				$$EN11:
				;  $ELSE		       ;SINCE GRAFTABLE IS NOT LOADED,
 0146  EB 05			   JMP SHORT $$EN10
 0148				$$IF10:
 0148  1E			      PUSH DS		       ;SET UP THE ES REG TO				;AN000;
 0149  07			      POP  ES		       ;  BE THE SAME AS DS, THE COMMON SEGMENT 	;AN000;
				      ASSUME ES:CSEG	       ;TELL THE ASSEMBLER WHAT I JUST DID		;AN000;
				
 014A  E8 015D R		      CALL PREV_NONE	       ;SET MSG TO SAY "NONE"				;AN000;
				
				      FIXLIST LISTPARM,.XLIST  ;						;AN000;
				;  $ENDIF		       ;ALREADY INSTALLED?
 014D				$$EN10:
 014D  C3			   RET
 014E				FINDTYPE ENDP
				; = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
				   HEADER <PREV_NONSTD - SET UP MESSAGE TO SAY 'NON-STANDARD'> ;		;AN000;
Microsoft (R) Macro Assembler Version 5.10                  2/14/25 23:45:29
GRTAB - DEFINE ROM GRAPHIC CHARACTERS FOR 128-255           Page     1-12
PREV_NONSTD - SET UP MESSAGE TO SAY 'NON-STANDARD'	   ;     

 014E				PREV_NONSTD PROC NEAR	       ;						;AN000;
				   PUBLIC PREV_NONSTD	       ;						;AN000;
				;SET UP SUBLIST FOR MSGS 2-3 TO HAVE THE VARIABLE TEXT: "NON-STANDARD".
				   ASSUME ES:CSEG	       ;						;AN000;
				
 014E  A1 0000 E		   MOV	AX,MSGNUM_NSTD.MSG_NUM ;PASS MESSAGE NUMBER OF "NON-STANDARD"		;AN000;
 0151  8A 36 0009 E		   MOV	DH,BYTE PTR MSGNUM_NSTD.MSG_CLASS+BYTE ;PASS MSG'S CLASS                ;AN000;
 0155  E8 0000 E		   CALL SYSGETMSG	       ;FIND WHERE THE TEXT OF "NON-STANDARD" IS	;AN000;
							       ;ES:SI=VECTOR TO MESSAGE TEXT
 0158  89 36 0002 E		   MOV	SLIST_23.SUB_VALUE,SI  ;PUT OFFSET INTO SUBLIST 			;AN000;
 015C  C3			   RET			       ;RETURN TO CALLER				;AN000;
 015D				PREV_NONSTD ENDP	       ;						;AN000;
				; = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
				   HEADER <PREV_NONE - SET UP MESSAGE TO SAY 'NONE'> ;				;AN000;
Microsoft (R) Macro Assembler Version 5.10                  2/14/25 23:45:29
GRTAB - DEFINE ROM GRAPHIC CHARACTERS FOR 128-255           Page     1-13
PREV_NONE - SET UP MESSAGE TO SAY 'NONE'	   ;               

 015D				PREV_NONE PROC NEAR	       ;						;AN000;
				   PUBLIC PREV_NONE	       ;						;AN000;
				;SET UP SUBLIST FOR MSGS 2-3 TO HAVE THE VARIABLE TEXT: "NONE".
				   ASSUME ES:CSEG	       ;						;AN000;
				
 015D  A1 0000 E		   MOV	AX,MSGNUM_NONE.MSG_NUM ;PASS MESSAGE NUMBER OF "NONE"			;AN000;
 0160  8A 36 0009 E		   MOV	DH,BYTE PTR MSGNUM_NONE.MSG_CLASS+BYTE ;PASS MSG'S CLASS                ;AN000;
 0164  E8 0000 E		   CALL SYSGETMSG	       ;FIND WHERE THE TEXT OF "NONE" IS		;AN000;
							       ;ES:SI=VECTOR TO MESSAGE TEXT
 0167  89 36 0002 E		   MOV	SLIST_23.SUB_VALUE,SI  ;PUT OFFSET INTO SUBLIST 			;AN000;
 016B  C3			   RET			       ;RETURN TO CALLER				;AN000;
 016C				PREV_NONE ENDP		       ;						;AN000;
				; = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
				   FIXLIST LISTPARM,.XLIST     ;						    ;AN000;
				   HEADER <RESPOND TO PARAMETER> ;AC000;
Microsoft (R) Macro Assembler Version 5.10                  2/14/25 23:45:29
GRTAB - DEFINE ROM GRAPHIC CHARACTERS FOR 128-255           Page     1-14
RESPOND TO PARAMETER	   ;                                   

 016C				DOFUNCTION PROC NEAR	       ;RESPOND TO PARM 				;AC000;
				   PUBLIC DOFUNCTION
				;INPUT: IF A CODEPAGE NUMBER WAS SPECIFIED
				;	    BX = OFFSET TO LANGUAGE TABLE TO BE LOADED
				;	    DX = INTEGER VALUE OF CODEPAGE SPECIFIED
				;	 IF /STATUS WAS SPECIFIED
				;	    BX = 0
				;	 IF QUESTION MARK WAS SPECIFIED
				;	    BX=-1
				
				   ASSUME ES:CSEG
 016C  83 FB FF			   CMP	BX,RETCODE_QUESTION    ;IS QUESTION MARK SPECFIED?
				;  $IF	E
 016F  75 05			   JNE $$IF22
 0171  E8 0203 R		      CALL HELP 	       ;DISPLAY RESULTS OF "?" SPECIFICATION
				
				;  $ELSE		       ;SINCE QUESTION MARK IS NOT PARM SPECIFIED
 0174  EB 58			   JMP SHORT $$EN22
 0176				$$IF22:
 0176  83 FB 00			      CMP  BX,ZERO	       ;IS /STATUS SPECIFIED?
				;     $IF  NE		       ;IF NOT STATUS, MUST BE REQUEST TO LOAD A TABLE
 0179  74 39			      JE $$IF24
 017B  8D 3E 0000 E			 LEA  DI,MSGNUM_PREVIOUS ;"Previous Code Page: xxx"			;AN001;
 017F  E8 0241 R			 CALL SENDMSG	       ;SEND THE MSG TO STDOUT				;AN001;
				
 0182  8B 97 0400			 MOV  DX,[BX].LANID    ;FETCH THE TWO CHAR ID FROM TABLE
 0186  3B 16 0010 R			 CMP  DX,IDXXX	       ;IS THIS ONE ALREADY LOADED?
				;	 $IF  NE	       ;IF NOT, LOAD IT
 018A  74 26				 JE $$IF25
				
					    FIXLIST LISTPARM,.XLIST ;						;AN000;
				
 018C  8B F3				    MOV  SI,BX	       ;PASS START OF CHAR TABLE
 018E  E8 01CF R			    CALL MOVTAB        ;PUT THIS TABLE INTO THE USA POSITION
				
					    FIXLIST LISTPARM,.XLIST ;						;AN000;
 0191  8D 3E 0000 E			    LEA  DI,MSGNUM_ACTIVE ;"ACTIVE CODE PAGE: XXX"			;AN000;
 0195  A1 000E R			    MOV  AX,ACTIVECPID ;GET POINTER TO CP JUST ACTIVATED		;AN000;
 0198  A3 0002 E			    MOV  SLIST_23.SUB_VALUE,AX ;INTO SUBLIST				;AN000;
 019B  E8 0241 R			    CALL SENDMSG       ;SHOW "ACTIVE CODE PAGE: XXX"			;AN000;
				
 019E  80 3E 0014 R 01			    CMP  BAD1F,RESET   ;THIS FLAG SET TO '1' MEANS INT 1FH POINTS TO
				;	    $IF  E	       ; A TABLE OTHER THAN ONE LOADED BY GRAFTABL
 01A3  75 0D				    JNE $$IF26
 01A5  1E				       PUSH DS
					       ASSUME DS:NOTHING
 01A6  36: C5 16 0000 R			       LDS  DX,WHERE   ;SET DS:DX POINT TO PREVIOUSLY LOADED GRAFTABL FONT
 01AB  B4 25				       MOV  AH,SET_VECT ;FUNCTION TO MOVE DS:DX INTO VECTOR FOR INT 1FH
 01AD  B0 1F				       MOV  AL,VEC_GRAF_CHAR ;INTERRUPT NUMBER TO RECEIVE NEW CONTENTS
 01AF  CD 21				       INT  VEC_DOS    ;CHANGE THE VECTOR
				
 01B1  1F				       POP  DS
					       ASSUME DS:CSEG
				;	    $ENDIF	       ;BAD 1FH?
 01B2				$$IF26:
				;	 $ENDIF 	       ;THIS TABLE ALREADY LOADED?
 01B2				$$IF25:
					 FIXLIST LISTPARM,.XLIST ;						;AN000;
				;     $ELSE		       ;SINCE /STATUS SPECIFIED,
 01B2  EB 1A			      JMP SHORT $$EN24
 01B4				$$IF24:
 01B4  8D 3E 0000 E			 LEA  DI,MSGNUM_ACTIVE ;POINT TO "ACTIVE CODE PAGE: XXX"		;AN001;
 01B8  E8 0241 R			 CALL SENDMSG	       ; VARIABLE FILLED BY "FINDTYPE"			;AN001;
				
 01BB  83 3E 0010 R 00			 CMP  IDXXX,ZERO       ;SEE WHO IS LOADED, IF ANYBODY
				;	 $IF  E
 01C0  75 07				 JNE $$IF30
 01C2  C6 06 0013 R 02			    MOV  EXITFL,EXNONE ;SET EXIT CODE TO SAY NO TABLE LOADED AT ALL
				;	 $ELSE		       ;SINCE SOMEONE IS LOADED,
 01C7  EB 05				 JMP SHORT $$EN30
 01C9				$$IF30:
 01C9  C6 06 0013 R 01			    MOV  EXITFL,EXDOS  ;SAY A TABLE IS LOADED
				;	 $ENDIF 	       ;ANY TABLE PREVIOUSLY LOADED?
 01CE				$$EN30:
				
				;     $ENDIF		       ;/STATUS?
 01CE				$$EN24:
				;  $ENDIF		       ;QUESTION MARK?
 01CE				$$EN22:
 01CE  C3			   RET
 01CF				DOFUNCTION ENDP
				; = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
				   HEADER <LOCAL SUBROUTINE, INSTALL A PARTICULAR TABLE>
Microsoft (R) Macro Assembler Version 5.10                  2/14/25 23:45:29
GRTAB - DEFINE ROM GRAPHIC CHARACTERS FOR 128-255           Page     1-15
LOCAL SUBROUTINE, INSTALL A PARTICULAR TABLE	   ;           

 01CF				MOVTAB PROC NEAR
				   PUBLIC MOVTAB
				;INPUT: SI = OFFSET OF SOURCE TABLE
				;	ES = PSP
				   ASSUME ES:CSEG
				;OUTPUT: THE SOURCE TABLE WILL BE MOVED TO ONE OF TWO PLACES,
				;	EITHER
				;	(IF THIS IS THE FIRST TIME FOR GRAFTABL)
				;	TO THE "TABLEUS" IN THE PSP (IF USA NOT SPECIFIED),
				;	AND THEN BOTH INT2FH AND TABLEUS MOVED TO MOV_DEST IN THE PSP,
				;	OR
				;	ON TOP OF THE PREVIOUS TABLE LEFT BY A PREVIOUS GRAFTABL CALL,
				;	AS POINTED TO BY THE VECTOR, "WHERE".
				
 01CF  06			   PUSH ES		       ;SAVE THE PSP
 01D0  80 3E 0012 R FF		   CMP	INSTALLED,LOADED       ;IF A PREVIOUS COPY OF GRAFTABL
				;  $IF	E		       ; HAS ALREADY BEEN LOADED
 01D5  75 0B			   JNE $$IF35
				
 01D7  C4 3E 0000 R		      LES  DI,WHERE	       ;REMEMBER WHERE PREVIOUSLY TABLE WENT
				      ASSUME ES:NOTHING        ;ES IS BASE OF OLD PREVIOUSLY LOADED TABLE
 01DB  B9 0410			      MOV  CX,TABSIZE	       ;THE TABLE,2 CHAR ID,& LANGUAGE NAME ARE TO BE MOVED
 01DE  F3/ A4			      REP  MOVSB	       ;MOVE NEW TABLE ON TOP OF OLD TABLE
							       ;WHEN EXITING, LEAVE NOTHING RESIDENT
				;  $ELSE		       ;SINCE NO PREVIOUS LOAD OF GRAFTABL EXISTS,
 01E0  EB 1F			   JMP SHORT $$EN35
 01E2				$$IF35:
				      ASSUME ES:CSEG	       ;SINCE ES WAS NOT CHANGED,
 01E2  C6 06 0013 R 00		      MOV  EXITFL,EXRES        ;WHEN EXITING, LEAVE TABLE RESIDENT
							       ; ALONG WITH THE INT2FH HANDLER
				
							       ;SINCE IT IS THE USA TABLE THAT IS
							       ; PHYSICALLY NEXT TO THE INTERRUPT HANDLER,
							       ; THAT PAIR OF AREAS IS WHAT WILL STAY
							       ; RESIDENT.  IF THE USA TABLE IS NOT THE
							       ; DESIRED VERSION, THEN FIRST MOVE THE
							       ; VERSION DESIRED ON TOP OF THE USA VERSION,
							       ; THEN MOVE THE PAIR DOWN ON TOP OF THE PSP
							       ; WHERE THEY WILL STAY RESIDENT.
				
 01E7  8D 3E 0000 E		      LEA  DI,TABLEUS	       ;FIND WHERE FIRST TABLE NOW IS
 01EB  3B F7			      CMP  SI,DI
				;     $IF  NE		       ;IF NOT THE USA TABLE,
 01ED  74 05			      JE $$IF37
 01EF  B9 0410				 MOV  CX,TABSIZE       ;SIZE OF THE TABLE
 01F2  F3/ A4				 REP  MOVSB	       ;MOVE THE XX TABLE ONTO THE USA TABLE
				;     $ENDIF
 01F4				$$IF37:
 01F4  BF 0060			      MOV  DI,OFFSET MOV_DEST  ;WHERE TO MOVE EVERYTHING TO
 01F7  8D 36 0000 E		      LEA  SI,END_PSP	       ;START WITH THE INT2FH HANDLER, ON THRU THE TABLE
							       ;ES:DI POINT TO DESTINATION, DS:SI POINT TO SOURCE
 01FB  8B 0E 0008 R		      MOV  CX,RESSIZE_BYTE     ;GET SIZE OF TABLE + RESIDENT CODE INT HANDLER
 01FF  F3/ A4			      REP  MOVSB	       ;MOVE THE TABLE ONTO THE PSP OF THIS LOAD
				;  $ENDIF
 0201				$$EN35:
 0201  07			   POP	ES		       ;RESTORE THE PSP POINTER TO ES
 0202  C3			   RET
 0203				MOVTAB ENDP
				; = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
				   HEADER <HELP - GENERATE DISPLAY RESPONDING TO STATUS REQUEST>
Microsoft (R) Macro Assembler Version 5.10                  2/14/25 23:45:29
GRTAB - DEFINE ROM GRAPHIC CHARACTERS FOR 128-255           Page     1-16
HELP - GENERATE DISPLAY RESPONDING TO STATUS REQUEST	   ;   

 0203				HELP PROC NEAR		       ;RESPOND TO "?" PARM SPECIFIED
				   PUBLIC HELP
				;INPUT: DS, ES = POINTS TO PSP
				;	IDXXX = CP OF WHO IS ALREADY LOADED
				;	EXITFL = ERROR LEVEL RET CODE
				;		NORMAL VALUE SAYS SOME TABLE HAS BEEN LOADED, BUT
				;		INVALID PARMS COULD HAVE ALREADY ALTERED THIS VALUE.
				;OUTPUT: EXITFL MAY BE CHANGED TO "EXNONE", IF NO TABLE LOADED
				
				   ASSUME ES:CSEG
 0203  8D 3E 0000 E		   LEA	DI,MSGNUM_ACTIVE       ;POINT TO "ACTIVE CODE PAGE: XXX"		;AN001;
 0207  E8 0241 R		   CALL SENDMSG 	       ; VARIABLE FILLED BY "FINDTYPE"			;AN001;
				
 020A  80 3E 0013 R 01		   CMP	EXITFL,EXDOS	       ;IS RET CODE UNTOUCHED SO FAR?
				;  $IF	E		       ;IF SO, REPORT WHO IS LOADED
 020F  75 0C			   JNE $$IF40
 0211  83 3E 0010 R 00		      CMP  IDXXX,ZERO	       ;SEE WHO IS LOADED, IF ANYBODY
				;     $IF  E
 0216  75 05			      JNE $$IF41
 0218  C6 06 0013 R 02			 MOV  EXITFL,EXNONE    ;SET EXIT CODE TO SAY NO TABLE LOADED AT ALL
				;     $ENDIF		       ;ANY TABLE PREVIOUSLY LOADED?
 021D				$$IF41:
				;  $ENDIF		       ;RET CODE UNTOUCHED?
 021D				$$IF40:
				
				   FIXLIST LISTPARM,.XLIST     ;						;AN000;
 021D  8D 3E 0000 E		   LEA	DI,MSGNUM_HELP_TITLE   ;"DOS command line parameters supported:"	;AN000;
 0221  E8 0241 R		   CALL SENDMSG 	       ;DISPLAY MSG IN STDOUT				;AN000;
				
 0224  8D 3E 0000 E		   LEA	DI,MSGNUM_HELP_TITLE7  ;AN007;
 0228  E8 0241 R		   CALL SENDMSG 	       ;AN007;DISPLAY MSG IN STDOUT			      ;AN000;
				
 022B  8D 3E 0000 E		   LEA	DI,MSGNUM_HELP_TITLE8  ;AN007;
 022F  E8 0241 R		   CALL SENDMSG 	       ;AN007;DISPLAY MSG IN STDOUT			      ;AN000;
				
 0232  8D 3E 0000 E		   LEA	DI,MSGNUM_HELP_TITLE9  ;AN007;
 0236  E8 0241 R		   CALL SENDMSG 	       ;AN007;DISPLAY MSG IN STDOUT			      ;AN000;
				
 0239  8D 3E 0000 E		   LEA	DI,MSGNUM_HELP_TITLE10 ;AN007;
 023D  E8 0241 R		   CALL SENDMSG 	       ;AN007;DISPLAY MSG IN STDOUT			      ;AN000;
				
				   FIXLIST LISTPARM,.XLIST     ;						;AN000;
 0240  C3			   RET
 0241				HELP ENDP
				; = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
				   FIXLIST LISTPARM,.XLIST     ;					       ;AN000;
				
				   HEADER <SENDMSG - PASS IN REGS DATA FROM MSG DESCRIPTOR TO DISP MSG> ;AN000;
Microsoft (R) Macro Assembler Version 5.10                  2/14/25 23:45:29
GRTAB - DEFINE ROM GRAPHIC CHARACTERS FOR 128-255           Page     1-17
SENDMSG - PASS IN REGS DATA FROM MSG DESCRIPTOR TO DISP MSG	

 0241				SENDMSG PROC NEAR	       ;						;AN000;
				   PUBLIC SENDMSG	       ;						;AN000;
				;INPUT - DI=POINTER TO MSG_DESC STRUC FOR THIS MESSAGE
				;OUTPUT - IF CARRY SET, EXTENDED ERROR MSG ATTEMPTED DISPLAYED
				;	   IF CARRY CLEAR, ALL OK
				;	   IN EITHER CASE, DI AND AX ALTERED, OTHERS OK
				;  =  =  =  =  =  =  =	=  =  =  =  =
				
 0241  53			   PUSH BX		       ; SAVE CALLER'S REGS                             ;AN000;
 0242  51			   PUSH CX		       ;						;AN000;
 0243  52			   PUSH DX		       ;						;AN000;
 0244  56			   PUSH SI		       ;						;AN000;
				
				;		 PASS PARMS TO MESSAGE HANDLER IN
				;		 THE APPROPRIATE REGISTERS IT NEEDS.
 0245  8B 05			   MOV	AX,[DI].MSG_NUM        ;MESSAGE NUMBER					;AN000;
 0247  8B 5D 02			   MOV	BX,[DI].MSG_HANDLE     ;HANDLE TO DISPLAY TO				;AN000;
 024A  8B 75 04			   MOV	SI,[DI].MSG_SUBLIST    ;OFFSET IN ES: OF SUBLIST, OR 0 IF NONE		;AN000;
 024D  8B 4D 06			   MOV	CX,[DI].MSG_COUNT      ;NUMBER OF %PARMS, 0 IF NONE			;AN000;
 0250  8B 55 08			   MOV	DX,[DI].MSG_CLASS      ;CLASS IN HIGH BYTE, INPUT FUNCTION IN LOW	;AN000;
 0253  E8 0000 E		   CALL SYSDISPMSG	       ;DISPLAY THE MESSAGE				;AN000;
				
				;  $IF	C		       ;IF THERE IS A PROBLEM				;AN000;
 0256  73 14			   JNC $$IF44
							       ;AX=EXTENDED ERROR NUMBER			;AN000;
 0258  8D 3E 0000 E		      LEA  DI,MSGNUM_EXTERR    ;GET REST OF ERROR DESCRIPTOR			;AN000;
 025C  8B 5D 02			      MOV  BX,[DI].MSG_HANDLE  ;HANDLE TO DISPLAY TO				;AN000;
 025F  8B 75 04			      MOV  SI,[DI].MSG_SUBLIST ;OFFSET IN ES: OF SUBLIST, OR 0 IF NONE		;AN000;
 0262  8B 4D 06			      MOV  CX,[DI].MSG_COUNT   ;NUMBER OF %PARMS, 0 IF NONE			;AN000;
 0265  8B 55 08			      MOV  DX,[DI].MSG_CLASS   ;CLASS IN HIGH BYTE, INPUT FUNCTION IN LOW	;AN000;
 0268  E8 0000 E		      CALL SYSDISPMSG	       ;TRY TO SAY WHAT HAPPENED			;AN000;
				
 026B  F9			      STC		       ;REPORT PROBLEM					;AN000;
				;  $ENDIF		       ;PROBLEM WITH DISPLAY?				;AN000;
 026C				$$IF44:
				
 026C  5E			   POP	SI		       ;RESTORE CALLER'S REGISTERS                      ;AN000;
 026D  5A			   POP	DX		       ;						;AN000;
 026E  59			   POP	CX		       ;						;AN000;
 026F  5B			   POP	BX		       ;						;AN000;
				   FIXLIST LISTPARM,.XLIST     ;						;AN000;
				
 0270  C3			   RET			       ;						;AN000;
 0271				SENDMSG ENDP		       ;						;AN000;
				   PATHLABL GRTAB	       ;AN006;
 0271                        1	    $$A_STOP_GRTAB:                     ; 
 0271				CSEG ENDS
				   END

Microsoft (R) Macro Assembler Version 5.10                  2/14/25 23:45:29
GRTAB - DEFINE ROM GRAPHIC CHARACTERS FOR 128-255           Symbols-1


Macros:

		N a m e			Lines

DOSCALL  . . . . . . . . . . . .  	   8
FIXLIST  . . . . . . . . . . . .  	   3
HEADER . . . . . . . . . . . . .  	   4
PATHLABL . . . . . . . . . . . .  	  16

Structures and Records:

                N a m e                 Width   # fields
                                        Shift   Width   Mask    Initial

DEFPSP . . . . . . . . . . . . .  	0100	0006
  ENVIRON_SEG  . . . . . . . . .  	002C
  MOV_DEST . . . . . . . . . . .  	0060
  PARMCNT  . . . . . . . . . . .  	0080
  PARMDOS  . . . . . . . . . . .  	0081
LANGUAGE . . . . . . . . . . . .  	0410	0003
  LANCHAR  . . . . . . . . . . .  	0000
  LANID  . . . . . . . . . . . .  	0400
  LANNAME  . . . . . . . . . . .  	0402
MSG_DESC . . . . . . . . . . . .  	000A	0005
  MSG_NUM  . . . . . . . . . . .  	0000
  MSG_HANDLE . . . . . . . . . .  	0002
  MSG_SUBLIST  . . . . . . . . .  	0004
  MSG_COUNT  . . . . . . . . . .  	0006
  MSG_CLASS  . . . . . . . . . .  	0008
SUBLIST  . . . . . . . . . . . .  	000B	0009
  SUB_SIZE . . . . . . . . . . .  	0000
  SUB_RES  . . . . . . . . . . .  	0001
  SUB_VALUE  . . . . . . . . . .  	0002
  SUB_VALUE_SEG  . . . . . . . .  	0004
  SUB_ID . . . . . . . . . . . .  	0006
  SUB_FLAGS  . . . . . . . . . .  	0007
  SUB_MAX_WIDTH  . . . . . . . .  	0008
  SUB_MIN_WIDTH  . . . . . . . .  	0009
  SUB_PAD_CHAR . . . . . . . . .  	000A
VECTOR . . . . . . . . . . . . .  	0004	0002
  VECOFF . . . . . . . . . . . .  	0000
  VECSEG . . . . . . . . . . . .  	0002

Segments and Groups:

                N a m e         	Length	 Align	Combine Class

CSEG . . . . . . . . . . . . . .  	0271	WORD	PUBLIC	

Symbols:            

                N a m e         	Type	 Value	 Attr

ACTIVECPID . . . . . . . . . . .  	L WORD	000E	CSEG	Global
ADPSP  . . . . . . . . . . . . .  	L WORD	0004	CSEG

BAD1F  . . . . . . . . . . . . .  	L BYTE	0014	CSEG
BLANK  . . . . . . . . . . . . .  	NUMBER	0020	

CLASS_1  . . . . . . . . . . . .  	NUMBER	0100	
CLASS_2  . . . . . . . . . . . .  	NUMBER	0200	
CLASS_A  . . . . . . . . . . . .  	NUMBER	0A00	
CLOSE  . . . . . . . . . . . . .  	NUMBER	003E	
COPYRIGHT  . . . . . . . . . . .  	V BYTE	0000	CSEG	External
CPID . . . . . . . . . . . . . .  	V BYTE	0000	CSEG	External
CPIDPOINTER  . . . . . . . . . .  	L WORD	000C	CSEG
CPID_L . . . . . . . . . . . . .  	NUMBER	0000		Communal

DOFUNCTION . . . . . . . . . . .  	N PROC	016C	CSEG	Global	Length = 0063

END_PSP  . . . . . . . . . . . .  	V BYTE	0000	CSEG	External
ENTRY_POINT  . . . . . . . . . .  	L NEAR	0015	CSEG	Global
EXDOS  . . . . . . . . . . . . .  	NUMBER	0001	
EXITFL . . . . . . . . . . . . .  	L BYTE	0013	CSEG	Global
EXNONE . . . . . . . . . . . . .  	NUMBER	0002	
EXPAR  . . . . . . . . . . . . .  	NUMBER	0003	
EXRES  . . . . . . . . . . . . .  	NUMBER	0000	
EXVER  . . . . . . . . . . . . .  	NUMBER	0004	

FINDTYPE . . . . . . . . . . . .  	N PROC	00C1	CSEG	Global	Length = 008D
FREE_AL_MEM  . . . . . . . . . .  	NUMBER	0049	

GET_INST_STATE . . . . . . . . .  	NUMBER	0000	
GET_VECT . . . . . . . . . . . .  	NUMBER	0035	
GET_VERSION  . . . . . . . . . .  	NUMBER	0030	
GRTAB_BASE . . . . . . . . . . .  	NEAR	0000	CSEG	Global
Microsoft (R) Macro Assembler Version 5.10                  2/14/25 23:45:29
GRTAB - DEFINE ROM GRAPHIC CHARACTERS FOR 128-255           Symbols-2



HANDLER  . . . . . . . . . . . .  	L NEAR	0000	CSEG	External
HANDLER_SIZE . . . . . . . . . .  	NUMBER	0000		Communal
HELP . . . . . . . . . . . . . .  	N PROC	0203	CSEG	Global	Length = 003E

IDXXX  . . . . . . . . . . . . .  	L WORD	0010	CSEG
INSTALLED  . . . . . . . . . . .  	L BYTE	0012	CSEG

LBL_GRTAB  . . . . . . . . . . .  	NUMBER	0004	
LISTPARM . . . . . . . . . . . .  	NUMBER	0001	
LOADED . . . . . . . . . . . . .  	NUMBER	00FF	

MAIN . . . . . . . . . . . . . .  	N PROC	0015	CSEG	Length = 001C
MAIN_GRTAB . . . . . . . . . . .  	N PROC	0031	CSEG	Global	Length = 0090
MOVTAB . . . . . . . . . . . . .  	N PROC	01CF	CSEG	Global	Length = 0034
MPEXNUM  . . . . . . . . . . . .  	V BYTE	0000	CSEG	External
MSGNUM_ACTIVE  . . . . . . . . .  	V WORD	0000	CSEG	External
MSGNUM_EXTERR  . . . . . . . . .  	V WORD	0000	CSEG	External
MSGNUM_HELP_TITLE  . . . . . . .  	V WORD	0000	CSEG	External
MSGNUM_HELP_TITLE10  . . . . . .  	V WORD	0000	CSEG	External
MSGNUM_HELP_TITLE7 . . . . . . .  	V WORD	0000	CSEG	External
MSGNUM_HELP_TITLE8 . . . . . . .  	V WORD	0000	CSEG	External
MSGNUM_HELP_TITLE9 . . . . . . .  	V WORD	0000	CSEG	External
MSGNUM_NONE  . . . . . . . . . .  	V WORD	0000	CSEG	External
MSGNUM_NSTD  . . . . . . . . . .  	V WORD	0000	CSEG	External
MSGNUM_PARSE . . . . . . . . . .  	V WORD	0000	CSEG	External
MSGNUM_PREVIOUS  . . . . . . . .  	V WORD	0000	CSEG	External
MSGNUM_VER . . . . . . . . . . .  	V WORD	0000	CSEG	External

NIBBLE_SIZE  . . . . . . . . . .  	NUMBER	0004	

ONE_SUBS . . . . . . . . . . . .  	NUMBER	0001	

PARSER . . . . . . . . . . . . .  	L NEAR	0000	CSEG	External
PATCH_OFF  . . . . . . . . . . .  	V WORD	0000	CSEG	External
PATCH_SEG  . . . . . . . . . . .  	V WORD	0000	CSEG	External
PREV_NONE  . . . . . . . . . . .  	N PROC	015D	CSEG	Global	Length = 000F
PREV_NONSTD  . . . . . . . . . .  	N PROC	014E	CSEG	Global	Length = 000F
PREV_OWN . . . . . . . . . . . .  	V DWORD	0000	CSEG	External
PSPSIZE  . . . . . . . . . . . .  	NUMBER	0100	

RESET  . . . . . . . . . . . . .  	NUMBER	0001	
RESSIZE_BYTE . . . . . . . . . .  	L WORD	0008	CSEG
RESSIZE_PARA . . . . . . . . . .  	L WORD	0006	CSEG
RETCODE_QUESTION . . . . . . . .  	NUMBER	-0001	
RET_FN . . . . . . . . . . . . .  	NUMBER	004C	
RET_RES  . . . . . . . . . . . .  	NUMBER	0031	

SAVESI . . . . . . . . . . . . .  	L WORD	000A	CSEG
SENDMSG  . . . . . . . . . . . .  	N PROC	0241	CSEG	Global	Length = 0030
SET_VECT . . . . . . . . . . . .  	NUMBER	0025	
SHIFT_SIZE . . . . . . . . . . .  	NUMBER	00A0	
SHIFT_SIZE_SEG . . . . . . . . .  	NUMBER	000A	
SHOW_MSG . . . . . . . . . . . .  	NUMBER	0009	
SLIST_23 . . . . . . . . . . . .  	V WORD	0000	CSEG	External
STDAUX . . . . . . . . . . . . .  	NUMBER	0003	
STDERR . . . . . . . . . . . . .  	NUMBER	0002	
STDIN  . . . . . . . . . . . . .  	NUMBER	0000	
STDOUT . . . . . . . . . . . . .  	NUMBER	0001	
STDPRN . . . . . . . . . . . . .  	NUMBER	0004	
SUBLIST_PARSE  . . . . . . . . .  	V WORD	0000	CSEG	External
SYSDISPMSG . . . . . . . . . . .  	L NEAR	0000	CSEG	External
SYSGETMSG  . . . . . . . . . . .  	L NEAR	0000	CSEG	External
SYSLOADMSG . . . . . . . . . . .  	L NEAR	0000	CSEG	External

TABLEUS  . . . . . . . . . . . .  	V BYTE	0000	CSEG	External
TABSIZE  . . . . . . . . . . . .  	NUMBER	0410	
TWO_SUBS . . . . . . . . . . . .  	NUMBER	0002	

VEC_DOS  . . . . . . . . . . . .  	NUMBER	0021	
VEC_GRAF_CHAR  . . . . . . . . .  	NUMBER	001F	
VEC_MULTIPLX . . . . . . . . . .  	NUMBER	002F	
VEC_RET  . . . . . . . . . . . .  	NUMBER	0020	

WHERE  . . . . . . . . . . . . .  	L DWORD	0000	CSEG
WHERE_R_U  . . . . . . . . . . .  	NUMBER	0001	

ZERO . . . . . . . . . . . . . .  	NUMBER	0000	

$$A_START_GRTAB  . . . . . . . .  	L NEAR	0015	CSEG	Global
$$A_STOP_GRTAB . . . . . . . . .  	L NEAR	0271	CSEG	Global
$$DO12 . . . . . . . . . . . . .  	L NEAR	00FA	CSEG
$$DO5  . . . . . . . . . . . . .  	L NEAR	00AC	CSEG
$$EN1  . . . . . . . . . . . . .  	L NEAR	002A	CSEG
$$EN10 . . . . . . . . . . . . .  	L NEAR	014D	CSEG
$$EN11 . . . . . . . . . . . . .  	L NEAR	0146	CSEG
Microsoft (R) Macro Assembler Version 5.10                  2/14/25 23:45:29
GRTAB - DEFINE ROM GRAPHIC CHARACTERS FOR 128-255           Symbols-3


$$EN22 . . . . . . . . . . . . .  	L NEAR	01CE	CSEG
$$EN24 . . . . . . . . . . . . .  	L NEAR	01CE	CSEG
$$EN30 . . . . . . . . . . . . .  	L NEAR	01CE	CSEG
$$EN35 . . . . . . . . . . . . .  	L NEAR	0201	CSEG
$$EN4  . . . . . . . . . . . . .  	L NEAR	00C0	CSEG
$$IF1  . . . . . . . . . . . . .  	L NEAR	0026	CSEG
$$IF10 . . . . . . . . . . . . .  	L NEAR	0148	CSEG
$$IF11 . . . . . . . . . . . . .  	L NEAR	013C	CSEG
$$IF12 . . . . . . . . . . . . .  	L NEAR	012D	CSEG
$$IF22 . . . . . . . . . . . . .  	L NEAR	0176	CSEG
$$IF24 . . . . . . . . . . . . .  	L NEAR	01B4	CSEG
$$IF25 . . . . . . . . . . . . .  	L NEAR	01B2	CSEG
$$IF26 . . . . . . . . . . . . .  	L NEAR	01B2	CSEG
$$IF30 . . . . . . . . . . . . .  	L NEAR	01C9	CSEG
$$IF35 . . . . . . . . . . . . .  	L NEAR	01E2	CSEG
$$IF37 . . . . . . . . . . . . .  	L NEAR	01F4	CSEG
$$IF4  . . . . . . . . . . . . .  	L NEAR	00BE	CSEG
$$IF40 . . . . . . . . . . . . .  	L NEAR	021D	CSEG
$$IF41 . . . . . . . . . . . . .  	L NEAR	021D	CSEG
$$IF44 . . . . . . . . . . . . .  	L NEAR	026C	CSEG
$$SD5  . . . . . . . . . . . . .  	L NEAR	00AD	CSEG
$$SR12 . . . . . . . . . . . . .  	L NEAR	013A	CSEG
$$SS12 . . . . . . . . . . . . .  	L NEAR	010C	CSEG
@CPU . . . . . . . . . . . . . .  	TEXT  0101h		
@FILENAME  . . . . . . . . . . .  	TEXT  grtab		
@VERSION . . . . . . . . . . . .  	TEXT  510		


   1261 Source  Lines
   1511 Total   Lines
    160 Symbols

  46328 + 201697 Bytes symbol space free

      0 Warning Errors
      0 Severe  Errors
