Microsoft (R) Macro Assembler Version 5.10                  5/17/24 09:43:46
CONDEV  FANCY CONSOLE DRIVER                                Page     1-1


				PAGE    ,132
				TITLE   CONDEV  FANCY CONSOLE DRIVER
				
				;:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
				;
				;       ADDRESSES FOR I/O
				;
				;:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
				;------------------------------------------------------------------------------
				;AN000; New functionality in DOS 4.00
				;AN001; GHG fix scrolling flashes on Mod 25/30's
				;AN002; P1767 VIDEO_MODE_TABLE not initialized correctly           10/16/87 J.K.
				;AN003; D375 /X needs to be supported by ANSI sequence also        12/14/87 J.K.
				;AN004; D397 /L option for Enforcing number of lines               12/17/87 J.K.
				;AN005; D479  An option to disable the extended keyboard functions 02/12/88 J.K.
				;AN006; P4241 AN001 fix be Revised to fix this problem            04/20/88 J.K.
				;AN007; P4532 Scrolling has a snow for CGA adapter                 04/27/88 J.K.
				;AN008; P4533 In mode Dh, Eh, Fh, 10h and 13h, Scrolling not working 04/27/88 J.K.
				;AN009; P4766 In mode 11h, and 12h erase display leaves bottom 5   05/24/88 F.G.
				;------------------------------------------------------------------------------
				
 = FFFF				TRUE     EQU 0FFFFh
 = 0000				FALSE    EQU 0
				
				BREAK   MACRO   subtitle
				        SUBTTL  subtitle
				        PAGE    ,132
				ENDM
				
				AsmVars Macro   varlist
				IRP     var,<varlist>
				AsmVar  var
				ENDM
				ENDM
				
				AsmVar  Macro   var
				IFNDEF  var
				var = FALSE
				ENDIF
				ENDM
				
				INCLUDE VECTOR.INC
			     C	;	SCCSID = @(#)vector.asm	1.1 85/04/10
			     C	BREAK <interrupt definitions>
			     C	
			     C	Asmvar	AltVect
			     C	
 = 0020                      C	INTTAB		EQU	20H
 = 0080                      C	INTBASE 	EQU	4 * inttab
 = 00C0                      C	ENTRYPOINT	EQU	INTBASE+40H
			     C	
			     C	
			     C	;
			     C	; interrupt assignments
Microsoft (R) Macro Assembler Version 5.10                  5/17/24 09:43:46
CONDEV  FANCY CONSOLE DRIVER                                Page     1-2
interrupt definitions                                       

			     C	;
			     C		IF	NOT ALTVECT
 =                           C	int_abort	    EQU     INTTAB	; abort process
 = 0021                      C	int_command	    EQU     int_abort+1 ; call MSDOS
 = 0022                      C	int_terminate	    EQU     int_abort+2 ; int to terminate address
 = 0023                      C	int_ctrl_c	    EQU     int_abort+3 ; ^c trapper
 = 0024                      C	int_fatal_abort     EQU     int_abort+4 ; hard disk error
 = 0025                      C	int_disk_read	    EQU     int_abort+5 ; logical sector disk read
 = 0026                      C	int_disk_write	    EQU     int_abort+6 ; logical sector disk write
 = 0027                      C	int_keep_process    EQU     int_abort+7 ; terminate program and stay
			     C						; resident
			     C	;----+----+----+----+----+----+----+----+----+----+----+----+----+----+----;
			     C	;	     C	A  V  E  A  T	  P  R	O  G  R  A  M  M  E  R		   ;
			     C	;									   ;
 = 0028                      C	int_spooler	    EQU     int_abort+8 ; spooler call
 = 0029                      C	int_fastcon	    EQU     int_abort+9 ; fast CON interrupt
 = 002A                      C	int_IBM 	    EQU     int_abort+10; critical section maintenance
			     C	;									   ;
			     C	;	     C	A  V  E  A  T	  P  R	O  G  R  A  M  M  E  R		   ;
			     C	;----+----+----+----+----+----+----+----+----+----+----+----+----+----+----;
			     C		ENDIF
			     C	
 = 0080                      C	addr_int_abort		EQU    4 * int_abort
 = 0084                      C	addr_int_command	EQU    4 * int_command
 = 0088                      C	addr_int_terminate	EQU    4 * int_terminate
 = 008C                      C	addr_int_ctrl_c 	EQU    4 * int_ctrl_c
 = 0090                      C	addr_int_fatal_abort	EQU    4 * int_fatal_abort
 = 0094                      C	addr_int_disk_read	EQU    4 * int_disk_read
 = 0098                      C	addr_int_disk_write	EQU    4 * int_disk_write
 = 009C                      C	addr_int_keep_process	EQU    4 * int_keep_process
			     C	;----+----+----+----+----+----+----+----+----+----+----+----+----+----+----;
			     C	;	     C	A  V  E  A  T	  P  R	O  G  R  A  M  M  E  R		   ;
			     C	;									   ;
 = 00A0                      C	addr_int_spooler	EQU    4 * int_spooler
 = 00A4                      C	addr_int_fastcon	EQU    4 * int_fastcon
 = 00A8                      C	addr_int_IBM		EQU    4 * int_IBM
			     C	;									   ;
			     C	;	     C	A  V  E  A  T	  P  R	O  G  R  A  M  M  E  R		   ;
			     C	;----+----+----+----+----+----+----+----+----+----+----+----+----+----+----;
				INCLUDE MULT.INC
			     C	;	SCCSID = @(#)mult.asm	1.2 85/04/12
			     C	Break <Critical section and Multiplex channels>
			     C	
			     C	;----+----+----+----+----+----+----+----+----+----+----+----+----+----+----;
			     C	;	     C	A  V  E  A  T	  P  R	O  G  R  A  M  M  E  R		   ;
			     C	;									   ;
			     C	; Critical section definitions
			     C	;
			     C	; These below are subject to leave-all sections
 = 0001                      C	critDisk    EQU     1			; Disk I/O critical section
 = 0002                      C	critDevice  EQU     2			; Device I/O critical section
 = 0001                      C	critShare   EQU     1			; Sharer I/O critical section
 = 0001                      C	critMem     EQU     1			; memory maintenance critical section
 = 0005                      C	critNet     EQU     5			; network critical section
Microsoft (R) Macro Assembler Version 5.10                  5/17/24 09:43:46
CONDEV  FANCY CONSOLE DRIVER                                Page     1-3
Critical section and Multiplex channels                     

 = 0001                      C	critSFT     EQU     1			; sft table allocation
 = 0006                      C	critIFS     EQU     6			; ifsfunc critical section
			     C	; These below are not subject to leave-all sections
 = 0008                      C	critASSIGN  EQU     8			; Assign has munged a system call
			     C	;									   ;
			     C	;	     C	A  V  E  A  T	  P  R	O  G  R  A  M  M  E  R		   ;
			     C	;----+----+----+----+----+----+----+----+----+----+----+----+----+----+----;
			     C	
			     C	;
			     C	; The current set of defined multiplex channels is (* means documented):
			     C	;
			     C	;   Channel(h)	Issuer		Receiver    Function
			     C	;      00	server		PSPRINT     print job control
			     C	;     *01	print/apps	PRINT	    Queueing of files
			     C	;      02	BIOS		REDIR	    signal open/close of printers
			     C	;
			     C	;      05	command 	REDIR	    obtain text of net int 24 message
			     C	;     *06	server/assign	ASSIGN	    Install check
			     C	;
			     C	;      08	external driver IBMBIO	    interface to internal routines
			     C	;
			     C	;      10	sharer/server	Sharer	    install check
			     C	;      11	DOS/server	Redir	    install check/redirection funcs
			     C	;      12	sharer/redir	DOS	    dos functions and structure maint
			     C	;      13	MSNET		MSNET	    movement of NCBs
			     C	;      13	external driver IBMBIO	    Reset_Int_13, allows installation
			     C	;					    of alternative INT_13 drivers after
			     C	;					    boot_up
			     C	;      14 (IBM) DOS		NLSFUNC     down load NLS country info,DOS 3.3
			     C	;      14 (MS)	APPS		POPUP	    MSDOS 4 popup screen functions
			     C	;      15	APPS		MSCDEX	    CD-ROM extensions interface
			     C	;      16	WIN386		WIN386	    Windows communications
			     C	;      17	Clipboard	WINDOWS     Clipboard interface
			     C	;     *18	Applications	MS-Manger   Toggle interface to manager
			     C	;      19	Shell
			     C	;      1A	Ansi.sys
			     C	;      1B	Fastopen,Vdisk	 IBMBIO     EMS INT 67H stub handler
			     C	;
			     C	;      AC	Graphics
			     C	;      AD	NLS (toronto)
			     C	;      AE
			     C	;      AF	Mode
			     C	;      B0	GRAFTABL	GRAFTABL
			     C	;
			     C	
			     C	
			     C	;MUX 00-3F reserverd for IBM
			     C	;MUX 80-BF reserverd for IBM
			     C	;MUX 40-7F reserved for Microsoft
			     C	;MUX C0-FF users
			     C	
			     C	
			     C	
 = 0010                      C	MultSHARE   EQU     10h 		; sharer
Microsoft (R) Macro Assembler Version 5.10                  5/17/24 09:43:46
CONDEV  FANCY CONSOLE DRIVER                                Page     1-4
Critical section and Multiplex channels                     

			     C	    ;	1   MFT_enter
			     C	    ;	2   MFTClose
			     C	    ;	3   MFTclU
			     C	    ;	4   MFTCloseP
			     C	    ;	5   MFTCloN
			     C	    ;	6   set_block
			     C	    ;	7   clr_block
			     C	    ;	8   chk_block
			     C	    ;	9   MFT_get
			     C	    ;	10  ShSave
			     C	    ;	11  ShChk
			     C	    ;	12  ShCol
			     C	    ;	13  ShCloseFile
			     C	
 = 0011                      C	MultNET     EQU     11h 		; Network support
 = 0011                      C	MultIFS     EQU     11h 		; Network support
			     C	    ;	1   IFS_RMDIR
			     C	    ;	2   IFS_SEQ_RMDIR
			     C	    ;	3   IFS_MKDIR
			     C	    ;	4   IFS_SEQ_MKDIR
			     C	    ;	5   IFS_CHDIR
			     C	    ;	6   IFS_CLOSE
			     C	    ;	7   IFS_COMMIT
			     C	    ;	8   IFS_READ
			     C	    ;	9   IFS_WRITE
			     C	    ;	10  IFS_LOCK
			     C	    ;	11  IFS_UNLOCK
			     C	    ;	12  IFS_DISK_INFO
			     C	    ;	13  IFS_SET_FILE_ATTRIBUTE
			     C	    ;	14  IFS_SEQ_SET_FILE_ATTRIBUTE
			     C	    ;	15  IFS_GET_FILE_INFO
			     C	    ;	16  IFS_SEQ_GET_FILE_INFO
			     C	    ;	17  IFS_RENAME
			     C	    ;	18  IFS_SEQ_RENAME
			     C	    ;	19  IFS_DELETE
			     C	    ;	20  IFS_SEQ_DELETE
			     C	    ;	21  IFS_OPEN
			     C	    ;	22  IFS_SEQ_OPEN
			     C	    ;	23  IFS_CREATE
			     C	    ;	24  IFS_SEQ_CREATE
			     C	    ;	25  IFS_SEQ_SEARCH_FIRST
			     C	    ;	26  IFS_SEQ_SEARCH_NEXT
			     C	    ;	27  IFS_SEARCH_FIRST
			     C	    ;	28  IFS_SEARCH_NEXT
			     C	    ;	29  IFS_ABORT
			     C	    ;	30  IFS_ASSOPER
			     C	    ;	31  Printer_SET_STRING
			     C	    ;	32  IFSFlushBuf
			     C	    ;	33  IFSBufWrite
			     C	    ;	34  IFSResetEnvironment
			     C	    ;	35  IFSSpoolCheck
			     C	    ;	36  IFSSpoolClose
			     C	
 = 0012                      C	MultDOS     EQU     12h 		; DOS call back
Microsoft (R) Macro Assembler Version 5.10                  5/17/24 09:43:46
CONDEV  FANCY CONSOLE DRIVER                                Page     1-5
Critical section and Multiplex channels                     

			     C	    ;	1   DOS_CLOSE
			     C	    ;	2   RECSET
			     C	    ;	3   Get DOSGROUP
			     C	    ;	4   PATHCHRCMP
			     C	    ;	5   OUT
			     C	    ;	6   NET_I24_ENTRY
			     C	    ;	7   PLACEBUF
			     C	    ;	8   FREE_SFT
			     C	    ;	9   BUFWRITE
			     C	    ;	10  SHARE_VIOLATION
			     C	    ;	11  SHARE_ERROR
			     C	    ;	12  SET_SFT_MODE
			     C	    ;	13  DATE16
			     C	    ;	14  SETVISIT
			     C	    ;	15  SCANPLACE
			     C	    ;	16  SKIPVISIT
			     C	    ;	17  StrCpy
			     C	    ;	18  StrLen
			     C	    ;	19  Ucase
			     C	    ;	20  POINTCOMP
			     C	    ;	21  CHECKFLUSH
			     C	    ;	22  SFFromSFN
			     C	    ;	23  GetCDSFromDrv
			     C	    ;	24  Get_User_Stack
			     C	    ;	25  GetThisDrv
			     C	    ;	26  DriveFromText
			     C	    ;	27  SETYEAR
			     C	    ;	28  DSUM
			     C	    ;	29  DSLIDE
			     C	    ;	30  StrCmp
			     C	    ;	31  initcds
			     C	    ;	32  pjfnfromhandle
			     C	    ;	33  $NameTrans
			     C	    ;	34  CAL_LK
			     C	    ;	35  DEVNAME
			     C	    ;	36  Idle
			     C	    ;	37  DStrLen
			     C	    ;	38  NLS_OPEN	  DOS 3.3
			     C	    ;	39  $CLOSE	  DOS 3.3
			     C	    ;	40  NLS_LSEEK	  DOS 3.3
			     C	    ;	41  $READ	  DOS 3.3
			     C	    ;	42  FastInit	  DOS 4.0
			     C	    ;	43  NLS_IOCTL	  DOS 3.3
			     C	    ;	44  GetDevList	  DOS 3.3
			     C	    ;	45  NLS_GETEXT	  DOS 3.3
			     C	    ;	46  MSG_RETRIEVAL DOS 4.0
			     C	    ;	47  FAKE_VERSION  DOS 4.0
			     C	    ;
 = 0014                      C	NLSFUNC     EQU     14h 		; NLSFUNC CALL , DOS 3.3
			     C	    ;	0   NLSInstall
			     C	    ;	1   ChgCodePage
			     C	    ;	2   GetExtInfo
			     C	    ;	3   SetCodePage
			     C	    ;	4   GetCntry
Microsoft (R) Macro Assembler Version 5.10                  5/17/24 09:43:46
CONDEV  FANCY CONSOLE DRIVER                                Page     1-6
Critical section and Multiplex channels                     

			     C	    ;
			     C	;FASTOPEN is not chained through INT 2F   ; DOS 3.3 F.C.
			     C	;	  it calls Multdos 42 to set up an entry routine address
			     C	    ;	0   Install status  (reserved)
			     C	    ;	1   Lookup
			     C	    ;	2   Insert
			     C	    ;	3   Delete
			     C	    ;	4   Purge	    (reserved)
				INCLUDE ANSI.INC                ; WGR equates and structures                             ;AN000;
			     C	;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
			     C	;
			     C	;   Equates and Strucs.
			     C	;
			     C	;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
			     C	;------------------------------------------------------------------------------
			     C	;AN001; D425 For OS2 compatibiltiy box, /L option status query     01/14/88 J.K.
			     C	;AN002; D493 New INIT request structure for error message          02/25/88 J.K.
			     C	;AN003; P4934 Change ANSI 2F function number t0 1Ah                05/20/88 F.G.
			     C	;------------------------------------------------------------------------------
			     C	;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
			     C	;
			     C	;      DEVICE  Header     DS:[SI]      -- to locate the next CON header
			     C	;      NEXT device header ES:[DI]
			     C	;
			     C	;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 = DS:[SI]                   C	HP      EQU     DS:[SI]                 ;                                      ;AN000;
 = ES:[DI]                   C	NHD     EQU     ES:[DI]                 ;                                      ;AN000;
			     C	                                        ;
 = 0008                      C	NAME_LEN EQU    8                       ;                                      ;AN000;
			     C	                                        ;
			     C	DHS     STRUC                           ;                                      ;AN000;
 0000  0000                  C	DH_NEXTO DW     ?                       ; offset of pointer to next header     ;AN000;
 0002  0000                  C	DH_NEXTS DW     ?                       ; segment of pointer to next header    ;AN000;
 0004  0000                  C	        DW      ?                       ; attribute                            ;AN000;
 0006  0000                  C	DH_STRAO DW     ?                       ; offset to strategy routine           ;AN000;
 0008  0000                  C	DH_INTRO DW     ?                       ; offset to interrupt routine          ;AN000;
 000A  0008[                 C	DH_NAME DB      NAME_LEN DUP(0)         ; device name in this header           ;AN000;
	   00                C	
			 ]   C	
			     C	
 0012                        C	DHS     ENDS                            ; end of common portion                ;AN000;
			     C	;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
			     C	;
			     C	; CON data structure  CS:[BX]
			     C	;
			     C	;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 = CS:[BX]                   C	CONPTR  EQU     CS:[BX]                 ;                                      ;AN000;
			     C	                                        ; STATES                               ;AN000;
			     C	BUF_DATA STRUC                          ;                                      ;AN000;
 0000  FFFF                  C	DEV_HDRO DW     -1                      ; device driver header offset          ;AN000;
 0002  FFFF                  C	DEV_HDRS DW     -1                      ;                                      ;AN000;
 0004  FFFF                  C	CON_STRAO DW    -1                      ; dos CON strategy offset              ;AN000;
 0006  FFFF                  C	CON_STRAS DW    -1                      ;                                      ;AN000;
 0008  FFFF                  C	CON_INTRO DW    -1                      ; dos CON strategy offset              ;AN000;
Microsoft (R) Macro Assembler Version 5.10                  5/17/24 09:43:46
CONDEV  FANCY CONSOLE DRIVER                                Page     1-7
Critical section and Multiplex channels                     

 000A  FFFF                  C	CON_INTRS DW    -1                      ;                                      ;AN000;
 000C                        C	BUF_DATA ENDS                           ;                                      ;AN000;
			     C	;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;                                      ;AN000;
			     C	;
			     C	;  INIT Structures and equates
			     C	;
			     C	;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 = 0040                      C	ROM_BIOS        EQU     40h             ; Segment of ROM_BIOS data area        ;AN000;
 = 0010                      C	EQUIP_FLAG      EQU     10h             ; equipment flag. (for LCD)            ;AN000;
 = 0096                      C	KBD_FLAG_3      EQU     96h             ; offset of KBD_FLAG_3 in data area    ;AN000;
 = 0084                      C	NUM_ROWS        EQU     84h             ; offset of number of rows in data area;AN000;
 = 0010                      C	EXT16_FLAG      EQU     00010000b       ; mask for Extended INT16 bit          ;AN000;
 = FFCF                      C	INIT_VID_MASK   EQU     0FFCFh          ; mask for equipment list              ;AN000;
 = 0020                      C	LCD_COLOR_MODE  EQU     20h             ; LCD as color                         ;AN000;
 = 0030                      C	LCD_MONO_MODE   EQU     30h             ; LCD as MONOchrome                    ;AN000;
 = 8103                      C	UNKNOWN_CMD     EQU     8103H           ; unknown command status byte          ;AN000;
 =-0001                      C	RC_EOL          EQU     -1              ; parser return code for EOL           ;AN000;
 = 0000                      C	RC_NO_ERROR     EQU     0               ; parser return code for not in switch list  ;AN000;
 = 000A                      C	INVALID_PARM    EQU     10              ; PARSE Invalid parameter message number     ;AN000;
 = 0003                      C	SSTRING         EQU     3               ; PARSE Too many parameters message    ;AN000;
 = 001B                      C	FUNC_CALL       EQU     1BH             ; VGA functionality call               ;AN000;
 = 0012                      C	ALT_SELECT      EQU     12H             ; EGA alternate select call            ;AN000;
 = 0010                      C	EGA_INFO        EQU     10H             ; EGA return information subcall       ;AN000;
 = 0020                      C	ALT_PRT_SC      EQU     20H             ; select alternate print screen subcall;AN000;
 = 0001                      C	MONOCHROME      EQU     1               ; monochrome attached to EGA           ;AN000;
 = 0000                      C	COLOR           EQU     0               ; some color attached to EGA           ;AN000;
 = 0007                      C	PS2_MONO        EQU     7               ; display adapter types...             ;AN000;
 = 0008                      C	PS2_COLOR       EQU     8               ;                                      ;AN000;
 = 000B                      C	MOD30_MONO      EQU     0BH             ;                                      ;AN000;
 = 000C                      C	MOD30_COLOR     EQU     0CH             ;                                      ;AN000;
 = 00F9                      C	LCD_MODEL       EQU     0F9H            ; Convertible model byte value         ;AN000;
 = 00C0                      C	GET_SYS_ID      EQU     0C0H            ; INT15H call for system identification;AN000;
 = 0043                      C	GET_STATUS      EQU     43H             ; read system status (Convertible)     ;AN000;
 = B000                      C	MONO_ADDRESS    EQU     0B000H          ; base address for monochrome          ;AN000;
 = B800                      C	COLOR_ADDRESS   EQU     0B800H          ; base address for CGA                 ;AN000;
 =-0001                      C	UNOCCUPIED      EQU     -1              ; value in VIDEO_MODE_TABLE if space unused  ;AN000;
 = 0001                      C	LCD_ACTIVE      EQU     00000001B       ; LCD adapter is present               ;AN000;
 = 0002                      C	MONO_ACTIVE     EQU     00000010B       ; monochrome adapter is present        ;AN000;
 = 0004                      C	CGA_ACTIVE      EQU     00000100B       ; CGA adapter is present               ;AN000;
 = 0008                      C	MCGA_ACTIVE     EQU     00001000B       ; MCGA is present                      ;AN000;
 = 0010                      C	E5151_ACTIVE    EQU     00010000B       ; EGA with monochrome is present       ;AN000;
 = 0020                      C	E5153_ACTIVE    EQU     00100000B       ; EGA with color display is present    ;AN000;
 = 0040                      C	E5154_ACTIVE    EQU     01000000B       ; EGA with enhanced color display is present ;AN000;
 = 0080                      C	VGA_ACTIVE      EQU     10000000B       ; VGA is present                       ;AN000;
 = 0040                      C	INT10_LOW       EQU     (4*10H)         ; interrupt 10 vector location         ;AN000;
 = 0042                      C	INT10_HI        EQU     (4*10H)+2       ;                                      ;AN000;
 = 00BC                      C	INT2F_LOW       EQU     (4*2FH)         ; interrupt 2F vector location         ;AN000;
 = 00BE                      C	INT2F_HI        EQU     (4*2FH)+2       ;                                      ;AN000;
 = 0001                      C	ONE             EQU     1               ;                                      ;AN000;
 = 0003                      C	THREE           EQU     3               ;                                      ;AN000;
 = 0008                      C	EIGHT           EQU     8               ;                                      ;AN000;
 = 0009                      C	NINE            EQU     9               ;                                      ;AN000;
 = 000E                      C	FOURTEEN        EQU     14              ;                                      ;AN000;
 = 0003                      C	REQ_CRSR_POS    EQU     3               ; function call to return cursor position    ;AN000;
Microsoft (R) Macro Assembler Version 5.10                  5/17/24 09:43:46
CONDEV  FANCY CONSOLE DRIVER                                Page     1-8
Critical section and Multiplex channels                     

 = 0007                      C	MODE7           EQU     7               ;                                      ;AN000;
 = 000D                      C	MODE13          EQU     13              ;                                      ;AN000;
 = 000F                      C	MODE15          EQU     15              ;                                      ;AN000;
 = 0013                      C	MODE19          EQU     19              ;                                      ;AN000;
			     C	                                        ;                                      ;AN000;
			     C	;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;                                      ;AN000;
			     C	;
			     C	;  Request Header Structure (INIT)
			     C	;
			     C	;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
			     C	INIT_REQ_HDR    STRUC                   ; INIT Request header structure        ;AN000;
 0000  000D[                 C	                DB   13 DUP(?)          ; standard request header              ;AN000;
	   ??                C	
			 ]   C	
			     C	
 000D  00                    C	NUM_UNITS       DB   ?                  ; number of units (N/A)                ;AN000;
 000E  0000                  C	END_ADDRESS_O   DW   ?                  ; ending address of resident code      ;AN000;
 0010  0000                  C	END_ADDRESS_S   DW   ?                  ;                                      ;AN000;
 0012  00000000              C	ARG_PTR         DD   ?                  ; ptr. to remaining arguments          ;AN000;
 0016  00                    C	DRIVE_NUM       DB   ?                  ; drive number (N/A)                   ;AN000;
 0017  0000                  C	CONFIG_ERRMSG   dw   0                  ;Flag to control "Error in CONFIG.SYS.." msg.;AN002;
 0019                        C	INIT_REQ_HDR    ENDS                    ;                                      ;AN000;
			     C	;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
			     C	;
			     C	; Information Block Structure
			     C	;    (for functionality call)
			     C	;
			     C	;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
			     C	INFO_BLOCK      STRUC                   ; information block for functionality call   ;AN000;
 0000  00000000              C	STATIC_ADDRESS  DD   ?                  ; address of static functionality table      ;AN000;
 0004  0021[                 C	                DB   33 DUP(?)          ; don't care                           ;AN000;
	   ??                C	
			 ]   C	
			     C	
 0025  00                    C	ACTIVE_DISPLAY  DB   ?                  ; active display code                  ;AN000;
 0026  00                    C	ALT_DISPLAY     DB   ?                  ; alternate display code               ;AN000;
 0027  0003[                 C	                DB   3  DUP(?)          ; don't care                           ;AN000;
	   ??                C	
			 ]   C	
			     C	
 002A  00                    C	CURRENT_SCANS   DB   ?                  ; current number of scan lines         ;AN000;
 002B  0002[                 C	                DB   2  DUP(?)          ; don't care                           ;AN000;
	   ??                C	
			 ]   C	
			     C	
 002D  00                    C	MISC_INFO       DB   ?                  ; miscellaneous state information      ;AN000;
 002E  0012[                 C	                DB   18 DUP(?)          ; don't care                           ;AN000;
	   ??                C	
			 ]   C	
			     C	
 0040                        C	INFO_BLOCK      ENDS                    ;                                      ;AN000;
			     C	;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
			     C	;
			     C	; Video table entry structure
Microsoft (R) Macro Assembler Version 5.10                  5/17/24 09:43:46
CONDEV  FANCY CONSOLE DRIVER                                Page     1-9
Critical section and Multiplex channels                     

			     C	;
			     C	;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
			     C	MODE_TABLE      STRUC                   ;                                      ;AN000;
 0000  FF                    C	V_MODE          DB    -1                ; video mode                           ;AN000;
 0001  FF                    C	D_MODE          DB    -1                ; display mode                         ;AN000;
 0002  00                    C	RESERVED_BYTE   DB    0                 ; reserved                             ;AN000;
 0003  FFFF                  C	COLORS          DW    -1                ; colors                               ;AN000;
 0005  FFFF                  C	SCR_WIDTH       DW    -1                ; screen width (pels)                  ;AN000;
 0007  FFFF                  C	SCR_LENGTH      DW    -1                ; screen length (pels)                 ;AN000;
 0009  FFFF                  C	SCR_COLS        DW    -1                ; number columns                       ;AN000;
 000B  FFFF                  C	SCR_ROWS        DW    -1                ; number rows                          ;AN000;
 000D                        C	MODE_TABLE      ENDS                    ;                                      ;AN000;
			     C	;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
			     C	;
			     C	; Structure of Static Block
			     C	;  (for functionality call
			     C	;
			     C	;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
			     C	STATIC_BLOCK    STRUC                   ; format of static functionality table ;AN000;
 0000  0007[                 C	                DB   7  DUP(?)          ; don't care                           ;AN000;
	   ??                C	
			 ]   C	
			     C	
 0007  00                    C	SCAN_TEXT       DB   ?                  ; available scan lines in text modes   ;AN000;
 0008                        C	STATIC_BLOCK    ENDS                    ;                                      ;AN000;
			     C	;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
			     C	;
			     C	; Structure of System ID call return block
			     C	;
			     C	;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
			     C	SYS_ID          STRUC                   ; format of return system config data  ;AN000;
 0000  0000                  C	                DW   ?                  ; don't care                           ;AN000;
 0002  00                    C	MODEL_BYTE      DB   ?                  ; model byte                           ;AN000;
 0003                        C	SYS_ID          ENDS                    ;                                      ;AN000;
			     C	
			     C	;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
			     C	;
			     C	; INT2f Strucs and Equates
			     C	;
			     C	;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 = 001A                      C	MULT_ANSI       EQU     1Ah             ; ANSI multiplex number                ;AC003;
			     C	;Catagory code
 = 0000                      C	INSTALL_CHECK   EQU     0               ; install check for ANSI               ;AN000;
 = 0001                      C	IOCTL_2F        EQU     1               ; 2F interface to IOCTL                ;AN000;
 = 0002                      C	DA_INFO_2F      EQU     2h              ;J.K. Information passing to ANSI.
			     C	;Subfunction code for IOCTL_2F
 = 007F                      C	GET_SUBFUNC   EQU    7FH                ; WGR Same structure as GET_IOCTL(ANSI);AN000;
			     C	
			     C	;Info Struture for DA_INFO_2F. (DS:DX point to this packet)
			     C	;J.K. Note: For DOS 4.00, DA_INFO_PACKET is used by DISPLAY.SYS to signal ANSI.SYS that
			     C	;DISPLAY.SYS is calling/finishing INT 10h SET MODE call.  ANSI.SYS needs this
			     C	;infomration since it also hooks INT 10h vector.
			     C	;For this DA_SETMODE_FLAG purpose, DA_INFO_LEVEL and DA_INFO_DIRECTION should always be
			     C	;set to 0.  This can be extended for another information passing scheme between
Microsoft (R) Macro Assembler Version 5.10                  5/17/24 09:43:46
CONDEV  FANCY CONSOLE DRIVER                                Page     1-10
Critical section and Multiplex channels                     

			     C	;DISPLAY.SYS and ANSI.SYS in the future version.
			     C	;For DA_SETMODE_FLAG, DISPLAY.SYS should be extremely careful that when it calls
			     C	;with DA_SETMODE_FLAG =1, then it should calls with DA_SETMODE_FLAG=0
			     C	;when it finished INT 10h function call. Otherwise, the system goes .....
			     C	;
			     C	;D425. At the request of OS2 compatibility box, when the user ask to ANSI
			     C	; with DA_INFO_LEVEL=1, then ANSI sets DA_OPTION_L_STATE based on /L option
			     C	; status.
			     C	
			     C	DA_INFO_PACKET   struc
 0000  00                    C	DA_INFO_LEVEL       db      0           ; 0=used for SET_MODE_FLAG 1=for OPTION_L_STATE
 0001  00                    C	DA_SETMODE_FLAG     db      0           ; 1: DISPLAY.SYS is calling INT 10h call, SET MODE. 0=finish
				ed.
 0002  00                    C	DA_OPTION_L_STATE   db      0           ; 1 = /L active, 0 = /L inactive
 0003                        C	DA_INFO_PACKET   ends
			     C	
			     C	;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
			     C	;
			     C	; GENERIC IOCTL Strucs and Equates
			     C	;
			     C	;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
			     C	                                        ;                                      ;AN000;
 = 0003                      C	DISPLAY_TYPE    EQU     3               ; MAJ_FUNC type for display            ;AN000;
 = 007F                      C	GET_FUNC        EQU     7FH             ; MIN_FUNC for get subfunction         ;AN000;
 = 005F                      C	SET_FUNC        EQU     5FH             ; MIN_FUNC for set subfunction         ;AN000;
 = 000F                      C	REQ_VID_MODE    EQU     0FH             ; request video mode INT10h function call    ;AN000;
 = 0100                      C	DONE            EQU     0100H           ; set done bit for IOCTL status        ;AN000;
 = 8000                      C	CMD_ERROR       EQU     8000H           ; set error bit for IOCTL status       ;AN000;
 = 0001                      C	INVALID_FUNC    EQU     1               ; invalid function                     ;AN000;
 = 000A                      C	NOT_SUPPORTED   EQU     10              ; return code non-supported ioctl function   ;AN000;
 = 000C                      C	NOT_AVAILABLE   EQU     12              ; return code for font not available   ;AN000;
 = 0001                      C	TEXT_MODE       EQU     1               ; text mode = 1 in request packet      ;AN000;
 = 0002                      C	GRAPHICS_MODE   EQU     2               ; graphics mode = 2                    ;AN000;
 = 0019                      C	DEFAULT_LENGTH  EQU     25              ; normal screen length                 ;AN000;
 = 0000                      C	OFF             EQU     0000H           ;                                      ;AN000;
 = 0001                      C	ON              EQU     0001H           ;                                      ;AN000;
 = 0020                      C	INT_BIT         EQU     00100000b       ; mask for int. bit from functionality call  ;AN000;
 = 0001                      C	FOUND           EQU     1               ; flag value for FOUND                 ;AN000;
 = 0000                      C	NOT_FOUND       EQU     0               ; flag value for not FOUND             ;AN000;
 = 0000                      C	SET_MODE        EQU     0               ; set mode INT10H function number      ;AN000;
 = AD00                      C	DISPLAY_CHECK   EQU     0AD00H          ; install check for DISPLAY.SYS        ;AN000;
 = AD02                      C	CHECK_ACTIVE    EQU     0AD02H          ; active code page check for DISPLAY.SY;AN000;
 = 00FF                      C	INSTALLED       EQU     0FFH            ; present in AL if installed           ;AN000;
 = 1112                      C	LOAD_8X8        EQU     1112H           ; register value for 8x8 ROM load      ;AN000;
 = 1103                      C	SET_BLOCK_0     EQU     1103H           ; activate block = 0.                  ;AN000;
 = AD10                      C	CHECK_FOR_FONT  EQU     0AD10H          ; check for 8x8 RAM font - DISPLAY.SYS ;AN000;
 = 0030                      C	SELECT_SCAN     EQU     30H             ; subfunction to set scan lines (VGA)  ;AN000;
 = 0000                      C	SET_INTENSIFY   EQU     0               ; value to enable intensify.           ;AN000;
 = 0001                      C	SET_BLINK       EQU     1               ; value to enable blink.               ;AN000;
 = 1003                      C	BLINK_TOGGLE    EQU     1003H           ; INT10 call to toggle int/blink bit.  ;AN000;
 = 0087                      C	CURSOR_FLAG     EQU     87H             ; cursor flag byte in ROM_BIOS         ;AN000;
 = 0001                      C	SET_CURSOR_CALL EQU     1               ; INT10 function call to set cursor typ;AN000;
 = 007F                      C	VIDEO_MASK      EQU     7FH             ; turn of clear buffer bit of mode value     ;AN000;
 = 001A                      C	MULT_ANSI       EQU     1Ah             ; ANSI multiplex number                ;AC003;
Microsoft (R) Macro Assembler Version 5.10                  5/17/24 09:43:46
CONDEV  FANCY CONSOLE DRIVER                                Page     1-11
Critical section and Multiplex channels                     

 = 0000                      C	INSTALL_CHECK   EQU     0               ; install check for ANSI               ;AN000;
 = 0001                      C	IOCTL_2F        EQU     1               ; 2F interface to IOCTL                ;AN000;
 = FFFE                      C	NOT_CY          EQU     0FFFEH          ; turn carry bit off                   ;AN000;
 = 0001                      C	CY              EQU     1               ; turn carry bit off                   ;AN000;
 = FFFE                      C	INVALID_FLAGS   EQU     0FFFEH          ; test for invalid flags in control word     ;AN000;
 = 00FE                      C	TURN_OFF        EQU     0FEH            ; values to turn off and on cursor..   ;AN000;
 = FF01                      C	TURN_ON         EQU     NOT TURN_OFF    ; emulation                            ;AN000;
 = 000B                      C	SUB_SIZE        EQU     11              ; sublist size                         ;AN000;
 = 0010                      C	LEFT_ASCIIZ     EQU     00010000B       ; left-aligned asciiz string           ;AN000;
 = 0000                      C	UNLIMITED       EQU     0               ; unlimited message size.              ;AN000;
			     C	                                        ;                                      ;AN000;
			     C	;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
			     C	;
			     C	;  Request Header Structure (Generic IOCTL)
			     C	;
			     C	;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
			     C	INIT_REQ_HDR    STRUC                   ;                                      ;AN000;
 0000  000D[                 C	                DB   13 DUP(?)          ; standard request header              ;AN000;
	   ??                C	
			 ]   C	
			     C	
 000D  00                    C	MAJ_FUNC        DB   ?                  ; major function                       ;AN000;
 000E  00                    C	MIN_FUNC        DB   ?                  ; minor function                       ;AN000;
 000F  0000                  C	IOCTL_SI        DW   ?                  ; contents of SI                       ;AN000;
 0011  0000                  C	IOCTL_DI        DW   ?                  ; contents of DI                       ;AN000;
 0013  00000000              C	REQ_PCKT_PTR    DD   ?                  ; pointer to request packet            ;AN000;
 0017                        C	INIT_REQ_HDR    ENDS                    ;                                      ;AN000;
			     C	;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
			     C	;
			     C	; REQUEST PACKET STRUCTURE (Generic IOCTL)
			     C	;
			     C	;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
			     C	REQ_PCKT        STRUC                   ;                                      ;AN000;
 0000  00                    C	INFO_LEVEL      DB   ?                  ; information level (should be 0)      ;AN000;
 0001  00                    C	                DB   ?                  ; reserved                             ;AN000;
 0002  0000                  C	DATA_LENGTH     DW   ?                  ; length of remaining data             ;AN000;
 0004  0000                  C	RP_FLAGS        DW   ?                  ; control flags                        ;AN000;
 0006  00                    C	RP_MODE         DB   ?                  ; display mode                         ;AN000;
 0007  00                    C	RESERVED2       DB   ?                  ; reserved                             ;AN000;
 0008  0000                  C	RP_COLORS       DW   ?                  ; # of colors                          ;AN000;
 000A  0000                  C	RP_WIDTH        DW   ?                  ; screen width                         ;AN000;
 000C  0000                  C	RP_LENGTH       DW   ?                  ; screen length                        ;AN000;
 000E  0000                  C	RP_COLS         DW   ?                  ; columns                              ;AN000;
 0010  0000                  C	RP_ROWS         DW   ?                  ; rows                                 ;AN000;
 0012                        C	REQ_PCKT        ENDS                    ;                                      ;AN000;
			     C	;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
			     C	;
			     C	; Scan Lines available structure
			     C	;
			     C	;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
			     C	SCAN_LINE_STR   STRUC                   ;                                      ;AN000;
 0000  0000                  C	NUM_LINES       DW   ?                  ; number of scan lines                 ;AN000;
 0002  00                    C	REP_1BH         DB   ?                  ; representation in 1Bh call           ;AN000;
 0003  00                    C	REP_12H         DB   ?                  ; representation in 12h call           ;AN000;
Microsoft (R) Macro Assembler Version 5.10                  5/17/24 09:43:46
CONDEV  FANCY CONSOLE DRIVER                                Page     1-12
Critical section and Multiplex channels                     

 0004                        C	SCAN_LINE_STR   ENDS                    ;                                      ;AN000;
			     C	;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
			     C	;
			     C	; SUBLIST struc
			     C	;
			     C	;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
			     C	SUB_STRUC       STRUC                   ;                                      ;AN000;
 0000  0002[                 C	                DB  2 DUP(?)            ;                                      ;AN000;
	   ??                C	
			 ]   C	
			     C	
 0002  0000                  C	SUB_PTR_O       DW  ?                   ;                                      ;AN000;
 0004  0000                  C	SUB_PTR_S       DW  ?                   ;                                      ;AN000;
 0006                        C	SUB_STRUC       ENDS                    ;                                      ;AN000;
			     C	;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
			     C	;
			     C	; RESULT BUFFER struc
			     C	;
			     C	;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
			     C	RESULT_STRUC    STRUC                   ;                                      ;AN000;
 0000  00                    C	RESULT_TYPE     DB  ?                   ;                                      ;AN000;
 0001  00                    C	                DB  ?                   ;                                      ;AN000;
 0002  0000                  C	RES_SYN_PTR     DW  ?                   ;                                      ;AN000;
 0004  00000000              C	RES_PTR         DD  ?                   ;                                      ;AN000;
 0008                        C	RESULT_STRUC    ENDS                    ;                                      ;AN000;
				.list
				
				BREAK <ANSI driver code>
				
 = 000D				        CR=13                   ;CARRIAGE RETURN
 = 0008				        BACKSP=8                ;BACKSPACE
 = 001B				        ESC_CHAR=1BH
 = 006C				        BRKADR=6CH              ;006C  BREAK VECTOR ADDRESS
 = 0190				        ASNMAX=400              ;WGR  (increased) SIZE OF KEY ASSIGNMENT BUFFER
				
				PUBLIC  SWITCH_X                ; WGR/X option for extended keyboard redefinition support;AN000;
				PUBLIC  SCAN_LINES              ; WGR                                                    ;AN000;
				PUBLIC  VIDEO_MODE_TABLE        ; WGR                                                    ;AN000;
				PUBLIC  VIDEO_TABLE_MAX         ; WGR                                                    ;AN000;
				public  MAX_VIDEO_TAB_NUM       ;P1767
				PUBLIC  PTRSAV                  ; WGR                                                    ;AN000;
				PUBLIC  ERR1                    ; WGR                                                    ;AN000;
				PUBLIC  ERR2                    ; WGR                                                    ;AN000;
				PUBLIC  EXT_16                  ; WGR                                                    ;AN000;
				PUBLIC  BRKADR                  ; WGR                                                    ;AN000;
				PUBLIC  BRKKY                   ; WGR                                                    ;AN000;
				PUBLIC  COUT                    ; WGR                                                    ;AN000;
				PUBLIC  BASE                    ; WGR                                                    ;AN000;
				PUBLIC  MODE                    ; WGR                                                    ;AN000;
				PUBLIC  MAXCOL                  ; WGR                                                    ;AN000;
				PUBLIC  TRANS                   ; WGR                                                    ;AN000;
				PUBLIC  STATUS                  ; WGR                                                    ;AN000;
				PUBLIC  EXIT                    ; WGR                                                    ;AN000;
				PUBLIC  NO_OPERATION            ; WGR                                                    ;AN000;
Microsoft (R) Macro Assembler Version 5.10                  5/17/24 09:43:46
CONDEV  FANCY CONSOLE DRIVER                                Page     1-13
ANSI driver code                                            

				PUBLIC  HDWR_FLAG               ; WGR                                                    ;AN000;
				public  Switch_L                ;AN004;
				public  Switch_K                ;AN005;
				                                                                                         ;AN000;
 0000				CODE    SEGMENT PUBLIC BYTE
				
				   ASSUME CS:CODE,DS:NOTHING,ES:NOTHING
				;-----------------------------------------------
				;
				;       C O N - CONSOLE DEVICE DRIVER
				;
				
				EXTRN   CON$INIT:NEAR           ; WGR ANSI initialization code
				EXTRN   GENERIC_IOCTL:NEAR      ; WGR Generic IOCTL code
				EXTRN   REQ_TXT_LENGTH:WORD     ; WGR current text length
				EXTRN   GRAPHICS_FLAG:BYTE      ; WGR graphics flag
				
 0000				CONDEV:                                 ;HEADER FOR DEVICE "CON"
 0000  FFFF FFFF		        DW      -1,-1
 0004  C053			        DW      1100000001010011B       ;WGR changed to match CON                        ;AC000;
 0006  00C1 R			        DW      STRATEGY
 0008  00CC R			        DW      ENTRY
 000A  43 4F 4E 20 20 20	        DB      'CON     '
       20 20			
				
				;--------------------------------------------------------------
				;
				;       COMMAND JUMP TABLES
 0012				CONTBL:
 0012  0000 E			        DW      CON$INIT
 0014  015C R			        DW      NO_OPERATION         ; WGR                                               ;AC000;
 0016  015C R			        DW      NO_OPERATION         ; WGR                                               ;AC000;
 0018  015C R			        DW      NO_OPERATION         ; WGR                                               ;AC000;
 001A  03AC R			        DW      CON$READ
 001C  046C R			        DW      CON$RDND
 001E  015C R			        DW      NO_OPERATION         ; WGR                                               ;AC000;
 0020  04E6 R			        DW      CON$FLSH
 0022  0512 R			        DW      CON$WRIT
 0024  0512 R			        DW      CON$WRIT
 0026  015C R			        DW      NO_OPERATION         ; WGR                                               ;AC000;
 0028  015C R			        DW      NO_OPERATION         ; WGR                                               ;AC000;
 002A  015C R			        DW      NO_OPERATION         ; WGR                                               ;AC000;
 002C  015C R			        DW      NO_OPERATION         ; WGR                                               ;AC000;
 002E  015C R			        DW      NO_OPERATION         ; WGR                                               ;AC000;
 0030  015C R			        DW      NO_OPERATION         ; WGR                                               ;AC000;
 0032  015C R			        DW      NO_OPERATION         ; WGR                                               ;AN000;
 0034  015C R			        DW      NO_OPERATION         ; WGR                                               ;AN000;
 0036  015C R			        DW      NO_OPERATION         ; WGR                                               ;AN000;
 0038  0000 E			        DW      GENERIC_IOCTL        ; WGR generic IOCTL routine offset                  ;AN000;
 = 0014				MAX_CMD  EQU  ($ - CONTBL)/2         ; WGR size of CONTBL                                ;AN000;
				
 003A  41			CMDTABL DB      'A'
 003B  0678 R			        DW      CUU             ;cursor up
 003D  42			        DB      'B'
Microsoft (R) Macro Assembler Version 5.10                  5/17/24 09:43:46
CONDEV  FANCY CONSOLE DRIVER                                Page     1-14
ANSI driver code                                            

 003E  0680 R			        DW      CUD             ;cursor down
 0040  43			        DB      'C'
 0041  0668 R			        DW      CUF             ;cursor forward
 0043  44			        DB      'D'
 0044  0673 R			        DW      CUB             ;cursor back
 0046  48			        DB      'H'
 0047  063A R			        DW      CUP             ;cursor position
 0049  4A			        DB      'J'
 004A  06F1 R			        DW      ED              ;erase display
 004C  4B			        DB      'K'
 004D  072E R			        DW      EL              ;erase line
 004F  52			        DB      'R'
 0050  0767 R			        DW      CPR             ;cursor postion report
 0052  66			        DB      'f'
 0053  063A R			        DW      CUP             ;cursor position
 0055  68			        DB      'h'
 0056  076E R			        DW      SM              ;set mode
 0058  6C			        DB      'l'
 0059  076A R			        DW      RM              ;reset mode
 005B  6D			        DB      'm'
 005C  06C1 R			        DW      SGR             ;select graphics rendition
 005E  6E			        DB      'n'
 005F  0742 R			        DW      DSR             ;device status report
 0061  70			        DB      'p'
 0062  07AB R			        DW      KEYASN          ;key assignment
 0064  71			        db      'q'             ;AN003; dynamic support of /X option through ansi sequence
 0065  0693 R			        dw      ExtKey          ;AN003; esc[0q = reset it. esc[1q = set it
 0067  73			        DB      's'
 0068  06AF R			        DW      PSCP            ;save cursor postion
 006A  75			        DB      'u'
 006B  06B8 R			        DW      PRCP            ;restore cursor position
 006D  00			        DB      00
				
 006E  00 00 07			GRMODE  DB      00,00000000B,00000111B
 0071  01 FF 08			        DB      01,11111111B,00001000B
 0074  04 F8 01			        DB      04,11111000B,00000001B
 0077  05 FF 80			        DB      05,11111111B,10000000B
 007A  07 F8 70			        DB      07,11111000B,01110000B
 007D  08 88 00			        DB      08,10001000B,00000000B
 0080  1E F8 00			        DB      30,11111000B,00000000B
 0083  1F F8 04			        DB      31,11111000B,00000100B
 0086  20 F8 02			        DB      32,11111000B,00000010B
 0089  21 F8 06			        DB      33,11111000B,00000110B
 008C  22 F8 01			        DB      34,11111000B,00000001B
 008F  23 F8 05			        DB      35,11111000B,00000101B
 0092  24 F8 03			        DB      36,11111000B,00000011B
 0095  25 F8 07			        DB      37,11111000B,00000111B
 0098  28 8F 00			        DB      40,10001111B,00000000B
 009B  29 8F 40			        DB      41,10001111B,01000000B
 009E  2A 8F 20			        DB      42,10001111B,00100000B
 00A1  2B 8F 60			        DB      43,10001111B,01100000B
 00A4  2C 8F 10			        DB      44,10001111B,00010000B
 00A7  2D 8F 50			        DB      45,10001111B,01010000B
 00AA  2E 8F 30			        DB      46,10001111B,00110000B
Microsoft (R) Macro Assembler Version 5.10                  5/17/24 09:43:46
CONDEV  FANCY CONSOLE DRIVER                                Page     1-15
ANSI driver code                                            

 00AD  2F 8F 70			        DB      47,10001111B,01110000B
 00B0  FF			        DB      0FFH
				
				;---------------------------------------------------
				;
				;       Device entry point
				;
 = 0000				CMDLEN  =       0       ;LENGTH OF THIS COMMAND
 = 0001				UNIT    =       1       ;SUB UNIT SPECIFIER
 = 0002				CMD     =       2       ;COMMAND CODE
 = 0003				STATUS  =       3       ;STATUS
 = 000D				MEDIA   =       13      ;MEDIA DESCRIPTOR
 = 000E				TRANS   =       14      ;TRANSFER ADDRESS
 = 0012				COUNT   =       18      ;COUNT OF BLOCKS OR CHARACTERS
 = 0014				START   =       20      ;FIRST BLOCK TO TRANSFER
				
 00B1  00000000			PTRSAV  DD      0
				
 00B5  FFFF			BUF1:      BUF_DATA <>                  ; WGR Next CON Buffer area                       ;AN000;
 00B7  FFFF			
 00B9  FFFF			
 00BB  FFFF			
 00BD  FFFF			
 00BF  FFFF			
				
				
 00C1				STRATP  PROC    FAR
				
 00C1				STRATEGY:
 00C1  2E: 89 1E 00B1 R		        MOV     WORD PTR CS:[PTRSAV],BX
 00C6  2E: 8C 06 00B3 R		        MOV     WORD PTR CS:[PTRSAV+2],ES
 00CB  CB			        RET
				
 00CC				STRATP  ENDP
				
 00CC				ENTRY:
 00CC  56			        PUSH    SI
 00CD  50			        PUSH    AX
 00CE  51			        PUSH    CX
 00CF  52			        PUSH    DX
 00D0  57			        PUSH    DI
 00D1  55			        PUSH    BP
 00D2  1E			        PUSH    DS
 00D3  06			        PUSH    ES
 00D4  53			        PUSH    BX
				;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
				;                                         WGR                                            ;AN000;
				; Check if header link has to be set      WGR (Code ported from                          ;AN000;
				;                                         WGR  DISPLAY.SYS)                              ;AN000;
				;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; WGR                                            ;AN000;
 00D5  8D 1E 00B5 R		        LEA     BX, BUF1                ; WGR                                            ;AN000;
 00D9  BF 0000 R		        MOV     DI,OFFSET CONDEV        ; WGR CON Device header                          ;AN000;
				                                        ; WGR                                            ;AN000;
 00DC  2E: 89 3F		        MOV     CONPTR.DEV_HDRO,DI      ; WGR                                            ;AN000;
Microsoft (R) Macro Assembler Version 5.10                  5/17/24 09:43:46
CONDEV  FANCY CONSOLE DRIVER                                Page     1-16
ANSI driver code                                            

 00DF  2E: 8C 4F 02		        MOV     CONPTR.DEV_HDRS,CS      ; WGR                                            ;AN000;
 00E3  FC			        CLD                             ; WGR all moves forward                          ;AN000;
				                                        ; WGR                                            ;AN000;
 00E4  2E: 83 7F 04 FF		        CMP     CONPTR.CON_STRAO, -1    ; WGR                                            ;AN000;
 00E9  75 4F			        JNE     L4                      ; WGR has been linked to DOS CON                 ;AN000;
 00EB  2E: 83 7F 06 FF		        CMP     CONPTR.CON_STRAS, -1    ; WGR                                            ;AN000;
 00F0  75 48			        JNE     L4                      ; WGR has been linked to DOS CON                 ;AN000;
				                                        ; WGR  next device header :  ES:[DI]             ;AN000;
 00F2  2E: C5 37		        LDS     SI,DWORD PTR CONPTR.DEV_HDRO;WGR                                         ;AN000;
 00F5  C4 3C			        LES     DI,DWORD PTR HP.DH_NEXTO; WGR                                            ;AN000;
				                                        ; WGR                                            ;AN000;
				;$SEARCH WHILE                          ; WGR  pointer to next device header is NOT      ;AN000;
 00F7				L1:                                     ; WGR                                            ;AN000;
 00F7  06			        PUSH    ES                      ; WGR  -1                                        ;AN000;
 00F8  58			        POP     AX                      ; WGR                                            ;AN000;
 00F9  3D FFFF			        CMP     AX,-1                   ; WGR                                            ;AN000;
				;$LEAVE  E,      AND                    ; WGR leave if both offset and segment are       ;AN000;
 00FC  75 05			        JNE     NOT0FFFF                ; WGR                                            ;AN000;
				                                        ; WGR                                            ;AN000;
 00FE  83 FF FF			        CMP     DI,-1                   ; WGR  0FFFFH                                    ;AN000;
				;$LEAVE  E                              ; WGR                                            ;AN000;
 0101  74 37			        JE      L4                      ; WGR                                            ;AN000;
 0103				NOT0FFFF:                               ; WGR                                            ;AN000;
 0103  57			        PUSH    DI                      ; WGR                                            ;AN000;
 0104  56			        PUSH    SI                      ; WGR                                            ;AN000;
 0105  B9 0008			        MOV     CX,NAME_LEN             ; WGR                                            ;AN000;
 0108  8D 7D 0A			        LEA     DI,NHD.DH_NAME          ; WGR                                            ;AN000;
 010B  8D 74 0A			        LEA     SI,HP.DH_NAME           ; WGR                                            ;AN000;
 010E  F3/ A6			        REPE    CMPSB                   ; WGR                                            ;AN000;
 0110  5E			        POP     SI                      ; WGR                                            ;AN000;
 0111  5F			        POP     DI                      ; WGR                                            ;AN000;
 0112  23 C9			        AND     CX,CX                   ; WGR                                            ;AN000;
				;$EXITIF Z                              ; WGR Exit if name is found in linked hd.        ;AN000;
 0114  75 1F			        JNZ     L3                      ; WGR Name is not found                          ;AN000;
				                                        ; WGR Name is found in the linked header         ;AN000;
 0116  26: 8B 45 06		        MOV     AX,NHD.DH_STRAO         ; WGR Get the STRATEGY address                   ;AN000;
 011A  2E: 89 47 04		        MOV     CONPTR.CON_STRAO,AX     ; WGR                                            ;AN000;
 011E  8C C0			        MOV     AX,ES                   ; WGR                                            ;AN000;
 0120  2E: 89 47 06		X1:     MOV     CONPTR.CON_STRAS,AX     ; WGR                                            ;AN000;
				                                        ; WGR                                            ;AN000;
 0124  26: 8B 45 08		        MOV     AX,NHD.DH_INTRO         ; WGR Get the INTERRUPT address                  ;AN000;
 0128  2E: 89 47 08		        MOV     CONPTR.CON_INTRO,AX     ; WGR                                            ;AN000;
 012C  8C C0			        MOV     AX,ES                   ; WGR                                            ;AN000;
 012E  2E: 89 47 0A		X2:     MOV     CONPTR.CON_INTRS,AX     ; WGR                                            ;AN000;
				                                        ; WGR                                            ;AN000;
				;$ORELSE                                ; WGR FInd next header to have the same          ;AN000;
 0132  EB 06 90			        JMP     L4                      ; WGR Device Name                                ;AN000;
 0135				L3:                                     ; WGR                                            ;AN000;
 0135  26: C4 3D		        LES     DI,DWORD PTR NHD.DH_NEXTO;WGR                                            ;AN000;
				;$ENDLOOP                               ; WGR                                            ;AN000;
 0138  EB BD			        JMP     L1                      ; WGR                                            ;AN000;
 013A				L4:                                     ; WGR                                            ;AN000;
				
 013A  2E: C5 1E 00B1 R		        LDS     BX,CS:[PTRSAV]     ;GET PONTER TO I/O PACKET
Microsoft (R) Macro Assembler Version 5.10                  5/17/24 09:43:46
CONDEV  FANCY CONSOLE DRIVER                                Page     1-17
ANSI driver code                                            

				
 013F  8B 4F 12			        MOV     CX,WORD PTR DS:[BX].COUNT    ;CX = COUNT
				
 0142  8A 47 02			        MOV     AL,BYTE PTR DS:[BX].CMD
 0145  98			        CBW
 0146  BE 0012 R		        MOV     SI,OFFSET CONTBL
 0149  03 F0			        ADD     SI,AX
 014B  03 F0			        ADD     SI,AX
 014D  3C 14			        CMP     AL,MAX_CMD              ; WGR not a call for ANSI...chain to lower device;AC000;
 014F  77 0B			        JA      NO_OPERATION
				
 0151  C4 7F 0E			        LES     DI,DWORD PTR DS:[BX].TRANS
				
 0154  0E			        PUSH    CS
 0155  1F			        POP     DS
				
				        ASSUME  DS:CODE
				
 0156  FF 24			        JMP     WORD PTR [SI]              ;GO DO COMMAND
				
				;=====================================================
				;=
				;=      SUBROUTINES SHARED BY MULTIPLE DEVICES
				;=
				;=====================================================
				;----------------------------------------------------------
				;
				;       EXIT - ALL ROUTINES RETURN THROUGH THIS PATH
				;
 0158				BUS$EXIT:                               ;DEVICE BUSY EXIT
 0158  B4 03			        MOV     AH,00000011B
 015A  EB 0B			        JMP     SHORT ERR1
				
 015C				NO_OPERATION:                           ; WGR                                            ;AN000;
 015C  E8 0179 R		        CALL    PASS_CONTROL            ; WGR Pass control to lower CON                  ;AN000;
 015F  EB 0E			        JMP     SHORT ERR2              ; WGR                                            ;AN000;
				
 0161				ERR$EXIT:
 0161  B4 81			        MOV     AH,10000001B            ;MARK ERROR RETURN
 0163  EB 02			        JMP     SHORT ERR1
				
 0165				EXITP   PROC    FAR
				
 0165  B4 01			EXIT:   MOV     AH,00000001B
 0167  2E: C5 1E 00B1 R		ERR1:   LDS     BX,CS:[PTRSAV]
 016C  89 47 03			        MOV     WORD PTR [BX].STATUS,AX      ;MARK OPERATION COMPLETE
 016F				ERR2:
 016F  5B			        POP     BX                      ; WGR                                            ;AN000;
 0170  07			        POP     ES
 0171  1F			        POP     DS
 0172  5D			        POP     BP
 0173  5F			        POP     DI
 0174  5A			        POP     DX
 0175  59			        POP     CX
Microsoft (R) Macro Assembler Version 5.10                  5/17/24 09:43:46
CONDEV  FANCY CONSOLE DRIVER                                Page     1-18
ANSI driver code                                            

 0176  58			        POP     AX
 0177  5E			        POP     SI
 0178  CB			        RET                             ;RESTORE REGS AND RETURN
 0179				EXITP   ENDP
				;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
				;                                         WGR                                            ;AN000;
				;       PASS CONTROL                      WGR                                            ;AN000;
				;                                         WGR                                            ;AN000;
				;       This calls the attached device to perform any further                            ;AN000;
				;       action on the call!               WGR                                            ;AN000;
				;                                         WGR                                            ;AN000;
				;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; WGR                                            ;AN000;
 0179				PASS_CONTROL    PROC                    ; WGR                                            ;AN000;
 0179  8D 36 00B5 R		        LEA     SI,BUF1                 ; WGR                                            ;AN000;
 017D  2E: C4 1E 00B1 R		        LES     BX,CS:[PTRSAV]          ; WGR pass the request header to the             ;AN000;
 0182  2E: FF 5C 04		        CALL    DWORD PTR CS:[SI].CON_STRAO ; CON strategy routine.                      ;AN000;
 0186  2E: FF 5C 08		        CALL    DWORD PTR CS:[SI].CON_INTRO ; WGR interrupt the CON                      ;AN000;
 018A  C3			        RET                             ; WGR                                            ;AN000;
 018B				PASS_CONTROL    ENDP                    ; WGR                                            ;AN000;
				;-----------------------------------------------                                         ;AN000;
				;
				;       BREAK KEY HANDLING
				;
 018B				BRKKY:
 018B  2E: C6 06 01AD R 03	        MOV     CS:ALTAH,3              ;INDICATE BREAK KEY SET
       90			
 0192  CF			INTRET: IRET
				
				;
				;       WARNING - Variables are very order dependent, be careful
				;                 when adding new ones!  - c.p.
				;
 0193  00			WRAP    DB      0               ; 0 = WRAP, 1 = NO WRAP
 0194  0004			ASNPTR  DW      4
 0196  0613 R			STATE   DW      S1
 0198  03			MODE    DB      3               ;*
 0199  4F			MAXCOL  DB      79              ;*
 019A  00			COL     DB      0
 019B  00			ROW     DB      0
 019C  0000			SAVCR   DW      0
 019E  00			INQ     DB      0
 019F				PRMCNT  LABEL   BYTE
 019F  0000			PRMCNTW DW      0
 01A1  00			KEYCNT  DB      0
 01A2  0827 R			KEYPTR  DW      BUF
 01A4  1B 5B 30 30 3B 30	REPORT  DB      ESC_CHAR,'[00;00R',CR        ;CURSOR POSTION REPORT BUFFER
       30 52 0D			
 01AD  00			ALTAH   DB      0                       ;Special key handling
				
 01AE  00			EXT_16       DB      0                  ; WGR Extended INT 16h flag                      ;AN000;
 01AF  00			Switch_X     DB      OFF                ; WGR /X flag                                    ;AN000;
 01B0  00			Switch_L     db      OFF                ;DCR397; 1= /L flag entered.
 01B1  00			Switch_K     db      OFF                ;AN005; To control EXT_16
 01B2  00			SCAN_LINES   DB      ?                  ; WGR flag for available scan lines (VGA)        ;AN000;
Microsoft (R) Macro Assembler Version 5.10                  5/17/24 09:43:46
CONDEV  FANCY CONSOLE DRIVER                                Page     1-19
ANSI driver code                                            

 01B3  0000			HDWR_FLAG    DW      0                  ; WGR byte of flags indicating video support     ;AN000;
				
 01B5				VIDEO_MODE_TABLE   LABEL   BYTE         ; WGR table containing applicable                ;AN000;
 01B5  FF			MODE_TABLE   <>                         ; WGR video modes and corresponding              ;AN000;
 01B6  FF			
 01B7  00			
 01B8  FFFF			
 01BA  FFFF			
 01BC  FFFF			
 01BE  FFFF			
 01C0  FFFF			
				
 01C2  FF			MODE_TABLE   <>                         ; WGR data.                                      ;AN000;
 01C3  FF			
 01C4  00			
 01C5  FFFF			
 01C7  FFFF			
 01C9  FFFF			
 01CB  FFFF			
 01CD  FFFF			
				
 01CF  FF			MODE_TABLE   <>                         ; WGR this table is initialized at               ;AN000;
 01D0  FF			
 01D1  00			
 01D2  FFFF			
 01D4  FFFF			
 01D6  FFFF			
 01D8  FFFF			
 01DA  FFFF			
				
 01DC  FF			MODE_TABLE   <>                         ; WGR INIT time                                  ;AN000;
 01DD  FF			
 01DE  00			
 01DF  FFFF			
 01E1  FFFF			
 01E3  FFFF			
 01E5  FFFF			
 01E7  FFFF			
				
 01E9  FF			MODE_TABLE   <>                         ; WGR                                            ;AN000;
 01EA  FF			
 01EB  00			
 01EC  FFFF			
 01EE  FFFF			
 01F0  FFFF			
 01F2  FFFF			
 01F4  FFFF			
				
 01F6  FF			MODE_TABLE   <>                         ; WGR                                            ;AN000;
 01F7  FF			
 01F8  00			
 01F9  FFFF			
 01FB  FFFF			
 01FD  FFFF			
Microsoft (R) Macro Assembler Version 5.10                  5/17/24 09:43:46
CONDEV  FANCY CONSOLE DRIVER                                Page     1-20
ANSI driver code                                            

 01FF  FFFF			
 0201  FFFF			
				
 0203  FF			MODE_TABLE   <>                         ; WGR                                            ;AN000;
 0204  FF			
 0205  00			
 0206  FFFF			
 0208  FFFF			
 020A  FFFF			
 020C  FFFF			
 020E  FFFF			
				
 0210  FF			MODE_TABLE   <>                         ; WGR                                            ;AN000;
 0211  FF			
 0212  00			
 0213  FFFF			
 0215  FFFF			
 0217  FFFF			
 0219  FFFF			
 021B  FFFF			
				
 021D  FF			MODE_TABLE   <>                         ; WGR                                            ;AN000;
 021E  FF			
 021F  00			
 0220  FFFF			
 0222  FFFF			
 0224  FFFF			
 0226  FFFF			
 0228  FFFF			
				
 022A  FF			MODE_TABLE   <>                         ; WGR                                            ;AN000;
 022B  FF			
 022C  00			
 022D  FFFF			
 022F  FFFF			
 0231  FFFF			
 0233  FFFF			
 0235  FFFF			
				
 0237  FF			MODE_TABLE   <>                         ; WGR                                            ;AN000;
 0238  FF			
 0239  00			
 023A  FFFF			
 023C  FFFF			
 023E  FFFF			
 0240  FFFF			
 0242  FFFF			
				
 0244  FF			MODE_TABLE   <>                         ; WGR                                            ;AN000;
 0245  FF			
 0246  00			
 0247  FFFF			
 0249  FFFF			
 024B  FFFF			
Microsoft (R) Macro Assembler Version 5.10                  5/17/24 09:43:46
CONDEV  FANCY CONSOLE DRIVER                                Page     1-21
ANSI driver code                                            

 024D  FFFF			
 024F  FFFF			
				
 0251  FF			MODE_TABLE   <>                         ; WGR                                            ;AN000;
 0252  FF			
 0253  00			
 0254  FFFF			
 0256  FFFF			
 0258  FFFF			
 025A  FFFF			
 025C  FFFF			
				
 025E  FF			MODE_TABLE   <>                         ; WGR                                            ;AN000;
 025F  FF			
 0260  00			
 0261  FFFF			
 0263  FFFF			
 0265  FFFF			
 0267  FFFF			
 0269  FFFF			
				
 026B  FF			MODE_TABLE   <>                         ; WGR                                            ;AN000;
 026C  FF			
 026D  00			
 026E  FFFF			
 0270  FFFF			
 0272  FFFF			
 0274  FFFF			
 0276  FFFF			
				
 = 0278				VIDEO_TABLE_MAX     EQU  $              ; WGR maximum address for video table            ;AN000;
 = 000F				MAX_VIDEO_TAB_NUM   EQU  ($-VIDEO_MODE_TABLE)/TYPE MODE_TABLE ;P1767 Max number of table
				                                                                                         ;AN000;
				;-------------------------------------------------------------
				;
				;       CHROUT - WRITE OUT CHAR IN AL USING CURRENT ATTRIBUTE
				;
 0278				ATTRW   LABEL   WORD
 0278  07			ATTR    DB      00000111B       ;CHARACTER ATTRIBUTE
 0279  00			BPAGE   DB      0               ;BASE PAGE
 027A  B800			base       dw   0b800h
 027C  0000			screen_seg dw   00000h
				
 027E  3C 0D			chrout: cmp     al,13
 0280  75 07			        jnz     trylf
 0282  C6 06 019A R 00		        mov     [col],0
 0287  EB 7D			        jmp     short setit
				
 0289  3C 0A			trylf:  cmp     al,10
 028B  74 4A			        jz      lf
 028D  3C 07			        cmp     al,7
 028F  75 0C			        jnz     tryback
 0291				torom:
 0291  8B 1E 0278 R		        mov     bx,[attrw]
Microsoft (R) Macro Assembler Version 5.10                  5/17/24 09:43:46
CONDEV  FANCY CONSOLE DRIVER                                Page     1-22
ANSI driver code                                            

 0295  80 E3 07			        and     bl,7
 0298  B4 0E			        mov     ah,14
 029A  CD 10			        int     10h
 029C  C3			ret5:   ret
				
 029D				tryback:
 029D  3C 08			        cmp     al,8
 029F  75 0D			        jnz     outchr
 02A1  80 3E 019A R 00		        cmp     [col],0
 02A6  74 F4			        jz      ret5
 02A8  FE 0E 019A R		        dec     [col]
 02AC  EB 58			        jmp     short setit
				
 02AE				outchr:
 02AE  8B 1E 0278 R		        mov     bx,[attrw]
 02B2  B9 0001			        mov     cx,1
 02B5  B4 09			        mov     ah,9
 02B7  CD 10			        int     10h
 02B9  FE 06 019A R		        inc     [col]
 02BD  A0 019A R		        mov     al,[col]
 02C0  3A 06 0199 R		        cmp     al,[maxcol]
 02C4  76 40			        jbe     setit
 02C6  80 3E 0193 R 00		        cmp     [wrap],0
 02CB  74 05			        jz      outchr1
 02CD  FE 0E 019A R		        dec     [col]
 02D1  C3			        ret
 02D2				outchr1:
 02D2  C6 06 019A R 00		        mov     [col],0
 02D7  FE 06 019B R		lf:     inc     [row]
 02DB  B4 1E			        MOV     AH,30                   ; GHG  Fix for ROUNDUP/PALACE
 02DD  A0 0198 R		        MOV     AL,MODE                 ; GHG  Fix for ROUNDUP/PALACE
 02E0  3C 11			        CMP     AL,11H                  ; GHG  Fix for ROUNDUP/PALACE
 02E2  74 13			        JE      LF2                     ; GHG  Fix for ROUNDUP/PALACE
 02E4  3C 12			        CMP     AL,12H                  ; GHG  Fix for ROUNDUP/PALACE
 02E6  74 0F			        JE      LF2                     ; GHG  Fix for ROUNDUP/PALACE
				        .IF <GRAPHICS_FLAG EQ GRAPHICS_MODE> ; WGR                                       ;AN000;
 02E8  80 3E 0000 E 02       3						cmp GRAPHICS_FLAG,GRAPHICS_MODE 
 02ED  75 04                 6						jne $l2 
 02EF  B4 19			          MOV     AH,DEFAULT_LENGTH     ; WGR                                            ;AN000;
				        .ELSE                           ; WGR                                            ;AN000;
 02F1  EB 04                 3						jmp short $l1 
 02F3                        2	$l2: 
 02F3  8A 26 0000 E		          MOV     AH,BYTE PTR [REQ_TXT_LENGTH] ; GHG  Fix for ROUNDUP/PALACE
				        .ENDIF                          ; WGR                                            ;AN000;
 02F7                        2	$l1: 
 02F7				LF2:                                    ; GHG  Fix for ROUNDUP/PALACE
 02F7  38 26 019B R		        cmp     [row],AH                ; GHG  Fix for ROUNDUP/PALACE
 02FB  72 09			        jb      setit
 02FD  FE CC			        DEC     AH                      ; GHG  Fix for ROUNDUP/PALACE
 02FF  88 26 019B R		        mov     [row],AH                ; GHG  Fix for ROUNDUP/PALACE
 0303  E8 0317 R		        call    scroll
				
 0306  8A 36 019B R		setit:  mov     dh,row
 030A  8A 16 019A R		        mov     dl,col
Microsoft (R) Macro Assembler Version 5.10                  5/17/24 09:43:46
CONDEV  FANCY CONSOLE DRIVER                                Page     1-23
ANSI driver code                                            

 030E  8A 3E 0279 R		        mov     bh,[bpage]
 0312  B4 02			        mov     ah,2
 0314  CD 10			        int     10h
 0316  C3			        ret
				
				;AN006;Writing a LF char through Teletype function to scroll the screen
				;has a side effect of changing the color of the cursor when the PROMPT
				;setting in PTM P4241 is used. AN001 uses this method to fix the strobing
				;problem of the palace machine.  The old method of scrolling used to directly
				;write into video buffer.  The old method has been used by AN001 for
				;CGA adater of mode 2 or 3 only.
				;To solve P4241, but to maintain the fix of the strobing problem of palace
				;machine, we return back to the old logic but the old logic has to be
				;Revised for the displays above CGA level.  For the adapters above
				;CGA display, we don't need to turn off/on the video - this will causes
				;a strobing, if you use do this,  for Palace machine.
				;This logic will be only applied to mode 2 and 3 only.
				
 0317				scroll:
				;AN006;AN008; Myscroll is only for Mode 2 and 3 of all display unit.
				;        .IF <BIT HDWR_FLAG eq CGA_ACTIVE>     ; GHG is this the CGA?            ;AN000;
				           .IF < MODE eq 2 > or
 0317  80 3E 0198 R 02       3						cmp MODE,2 
 031C  74 07                 6						je $l7 
				           .IF < MODE eq 3 >
 031E  80 3E 0198 R 03       3						cmp MODE,3 
 0323  75 03                 6						jne $l5 
 0325                        3	$l7: 
 0325  EB 06 90			              jmp     myscroll
				           .ENDIF
 0328                        2	$l5: 
				;        .ENDIF
				;AN006;AN008; Other modes (=APA mode) use TeleType function of
				; writing LF to scroll the screen!.
 0328  B0 0A			        mov     al,10                           ; GHG
 032A  E9 0291 R		        jmp     torom                           ; GHG
				
 032D				myscroll:
 032D  8A 3E 0278 R		        mov     bh,[attr]
 0331  B3 20			        mov     bl,' '
 0333  A0 0199 R		        MOV     AL,[MAXCOL]                     ; WGR                                    ;AN000;
 0336  98			        CBW                                     ; WGR                                    ;AN000;
 0337  40			        INC     AX                              ; WGR                                    ;AN000;
 0338  8B E8			        MOV     BP,AX                           ; WGR                                    ;AN000;
 033A  8B F5			        MOV     SI,BP                           ; WGR                                    ;AN000;
 033C  03 F5			        ADD     SI,BP                           ; WGR                                    ;AN000;
				        .IF <GRAPHICS_FLAG EQ GRAPHICS_MODE>    ; WGR                                    ;AN000;
 033E  80 3E 0000 E 02       3						cmp GRAPHICS_FLAG,GRAPHICS_MODE 
 0343  75 05                 6						jne $l9 
 0345  B8 0019			          MOV     AX,DEFAULT_LENGTH             ; WGR                                    ;AN000;
				        .ELSE                                   ; WGR                                    ;AN000;
 0348  EB 03                 3						jmp short $l8 
 034A                        2	$l9: 
 034A  A1 0000 E		          MOV     AX,[REQ_TXT_LENGTH]           ; WGR                                    ;AN000;
Microsoft (R) Macro Assembler Version 5.10                  5/17/24 09:43:46
CONDEV  FANCY CONSOLE DRIVER                                Page     1-24
ANSI driver code                                            

				        .ENDIF                                  ; WGR                                    ;AN000;
 034D                        2	$l8: 
 034D  48			        DEC     AX                              ; WGR                                    ;AN000;
 034E  F7 E5			        MUL     BP                              ; WGR                                    ;AN000;
 0350  8B C8			        MOV     CX,AX                           ; WGR                                    ;AN000;
 0352  A1 027A R		        mov     ax,[base]
 0355  03 06 027C R		        add     ax,[screen_seg]
 0359  8E C0			        mov     es,ax
 035B  8E D8			        mov     ds,ax
 035D  33 FF			        xor     di,di
 035F  FC			        cld
 0360  2E: 81 3E 027A R B800	        cmp     cs:[base],0b800h
 0367  74 0B			        jz      colorcard
				
 0369  F3/ A5			        rep     movsw
 036B  8B C3			        mov     ax,bx
 036D  8B CD			        mov     cx,bp
 036F  F3/ AB			        rep     stosw
 0371  0E			sret:   push    cs
 0372  1F			        pop     ds
 0373  C3			        ret
				
 0374				colorcard:
				; We must protect this with a critical section
				;
				;   INT 29H calls to device drivers do not enter CritDevice
				;   The user MIGHT hit Ctrl-NumLock in the middle of this
				;       which will leave the screen blanked.
 0374  B8 8002			        mov     ax,8000H + CritDevice     ; Enter Device critical section
 0377  CD 2A			        int     int_IBM
				
 0379  2E: 83 3E 01B3 R 08	        cmp     cs:[Hdwr_Flag], MCGA_ACTIVE ;AN006;AN007;above CGA level?
 037F  73 0E			        jae     Skip_Video_Off            ;AN006;AN007;
				
 0381  BA 03DA			        mov     dx,3dah
 0384  EC			wait2:  in      al,dx
 0385  A8 08			        test    al,8
 0387  74 FB			        jz      wait2
 0389  B0 25			        mov     al,25h
 038B  BA 03D8			        mov     dx,3d8h
 038E  EE			        out     dx,al                     ;turn off video
 038F				Skip_Video_Off:                           ;AN006;
 038F  F3/ A5			        rep     movsw
 0391  8B C3			        mov     ax,bx
 0393  8B CD			        mov     cx,bp
 0395  F3/ AB			        rep     stosw
 0397  2E: 83 3E 01B3 R 08	        cmp     cs:[Hdwr_Flag], MCGA_ACTIVE ;AN006;AN007;
 039D  73 06			        jae     Skip_Video_On             ;AN006;AN007;
 039F  B0 29			        mov     al,29h
 03A1  BA 03D8			        mov     dx,3d8h
 03A4  EE			        out     dx,al                     ;turn on video
				
 03A5				Skip_Video_On:                            ;AN006;
 03A5  B8 8102			        mov     ax,8100H + CritDevice     ; Leave Device critical section
Microsoft (R) Macro Assembler Version 5.10                  5/17/24 09:43:46
CONDEV  FANCY CONSOLE DRIVER                                Page     1-25
ANSI driver code                                            

 03A8  CD 2A			        int     int_IBM
				
 03AA  EB C5			       jmp     sret
				
				;------------------------------------------------------
				;
				;       CONSOLE READ ROUTINE
				;
 03AC				CON$READ:
 03AC  E3 08			        JCXZ    CON$EXIT
 03AE				CON$LOOP:
 03AE  51			        PUSH    CX              ;SAVE COUNT
 03AF  E8 03B9 R		        CALL    CHRIN           ;GET CHAR IN AL
 03B2  59			        POP     CX
 03B3  AA			        STOSB                   ;STORE CHAR AT ES:DI
 03B4  E2 F8			        LOOP    CON$LOOP
 03B6				CON$EXIT:
 03B6  E9 0165 R		        JMP     EXIT
				;---------------------------------------------------------
				;
				;       INPUT SINGLE CHAR INTO AL
				;
 03B9  33 C0			CHRIN:  XOR     AX,AX
 03BB  86 06 01AD R		        XCHG    AL,ALTAH     ;GET CHARACTER & ZERO ALTAH
 03BF  0A C0			        OR      AL,AL
 03C1  75 64			        JNZ     KEYRET
				
 03C3  80 3E 01A1 R 00		INAGN:  CMP     KEYCNT,0
 03C8  75 4E			        JNZ     KEY5A
				
 03CA  32 E4			        XOR     AH,AH
				        .IF  <EXT_16 EQ ON>          ; WGR extended interrupt available?                 ;AN000;
 03CC  80 3E 01AE R 01       3						cmp EXT_16,ON 
 03D1  75 21                 6						jne $l13 
 03D3  B4 10			           MOV    AH,10h             ; WGR yes..perform extended call                    ;AN000;
 03D5  CD 16			           INT    16H                ; WGR                                               ;AN000;
				           .IF  <SWITCH_X EQ OFF>    ; WGR /X switch used?                               ;AN000;
 03D7  80 3E 01AF R 00       3						cmp SWITCH_X,OFF 
 03DC  75 03                 6						jne $l15 
 03DE  E8 081C R		              CALL   CHECK_FOR_REMAP ; WGR no....map to normal call                      ;AN000;
				           .ENDIF                    ; WGR                                               ;AN000;
 03E1                        2	$l15: 
 03E1  E8 0441 R		           CALL    SCAN              ; WGR check for redefinition                        ;AN000;
				           .IF  NZ  AND              ; WGR no redefinition?...and                        ;AN000;
 03E4  74 13                 6						jz $l12 
				           .IF  <SWITCH_X EQ ON>     ; WGR /X switch used?                               ;AN000;
 03E6  80 3E 01AF R 01       3						cmp SWITCH_X,ON 
 03EB  75 0C                 6						jne $l12 
 03ED  E8 081C R		              CALL   CHECK_FOR_REMAP ; WGR then remap..                                  ;AN000;
 03F0  0B DB			              OR     BX,BX           ; WGR reset zero flag for jump test in old code     ;AN000;
				           .ENDIF                    ; WGR                                               ;AN000;
				        .ELSE                        ; WGR extended interrupt not available              ;AN000;
 03F2  EB 05                 3						jmp short $l12 
 03F4                        2	$l13: 
Microsoft (R) Macro Assembler Version 5.10                  5/17/24 09:43:46
CONDEV  FANCY CONSOLE DRIVER                                Page     1-26
ANSI driver code                                            

 03F4  CD 16			           INT   16H                 ; WGR                                               ;AN000;
 03F6  E8 0441 R		           CALL    SCAN              ; WGR check for redefinition                        ;AN000;
				        .ENDIF                       ; WGR                                               ;AN000;
 03F9                        2	$l12: 
 03F9  75 20			        JNZ     ALT10           ;IF NO MATCH JUST RETURN IT
				
 03FB  49			        DEC     CX
 03FC  49			        DEC     CX
 03FD  43			        INC     BX
 03FE  43			        INC     BX
				        .IF  <AL EQ 0> OR              ; WGR check whether the                           ;AN000;
 03FF  3C 00                 3						cmp AL,0 
 0401  74 0B                 6						je $l24 
				        .IF  <AL EQ 0E0H> AND          ; WGR keypacket is an extended one?               ;AN000;
 0403  3C E0                 3						cmp AL,0E0H 
 0405  75 09                 6						jne $l22 
				        .IF  <SWITCH_X EQ 1>           ; WGR switch must be set for 0E0h extended        ;AN000;
 0407  80 3E 01AF R 01       3						cmp SWITCH_X,1 
 040C  75 02                 6						jne $l22 
 040E                        3	$l24: 
 040E  49			           DEC     CX                  ; WGR adjust pointers                             ;AN000;
 040F  43			           INC     BX                  ; WGR appropiately                                ;AN000;
				        .ENDIF
 0410                        2	$l22: 
 0410  88 0E 01A1 R		        MOV     KEYCNT,CL
 0414  89 1E 01A2 R		        MOV     KEYPTR,BX
 0418				KEY5A:                          ; Jmp here to get rest of translation
 0418  E8 0428 R		        CALL    KEY5            ;GET FIRST KEY FROM TRANSLATION
 041B				ALT10:
 041B  0B C0			        OR      AX,AX           ;Check for non-key after BREAK
 041D  74 A4			        JZ      INAGN
 041F  0A C0			        OR      AL,AL           ;SPECIAL CASE?
 0421  75 04			        JNZ     KEYRET
 0423  88 26 01AD R		        MOV     ALTAH,AH        ;STORE SPECIAL KEY
 0427  C3			KEYRET: RET
				
 0428  8B 1E 01A2 R		KEY5:   MOV     BX,KEYPTR       ;GET A KEY FROM TRANSLATION TABLE
 042C  8B 07			        MOV     AX,WORD PTR [BX]
 042E  FE 0E 01A1 R		        DEC     KEYCNT
 0432  43			        INC     BX
 0433  0A C0			        OR      AL,AL
 0435  75 05			        JNZ     KEY6
 0437  43			        INC     BX
 0438  FE 0E 01A1 R		        DEC     KEYCNT
 043C  89 1E 01A2 R		KEY6:   MOV     KEYPTR,BX
 0440  C3			        RET
				
 0441  BB 0827 R		SCAN:   MOV     BX,OFFSET BUF
 0444  8A 0F			KEYLP:  MOV     CL,BYTE PTR [BX]
 0446  32 ED			        XOR     CH,CH
 0448  0B C9			        OR      CX,CX
 044A  74 1D			        JZ      NOTFND
				        .IF  <AL EQ 0> OR              ; WGR check whether the                           ;AN000;
 044C  3C 00                 3						cmp AL,0 
Microsoft (R) Macro Assembler Version 5.10                  5/17/24 09:43:46
CONDEV  FANCY CONSOLE DRIVER                                Page     1-27
ANSI driver code                                            

 044E  74 0B                 6						je $l27 
				        .IF  <AL EQ 0E0H> AND          ; WGR keypacket is an extended one.               ;AN000;
 0450  3C E0                 3						cmp AL,0E0H 
 0452  75 0C                 6						jne $l26 
				        .IF  <SWITCH_X EQ ON>          ; WGR switch must be set for 0E0h extended        ;AN000;
 0454  80 3E 01AF R 01       3						cmp SWITCH_X,ON 
 0459  75 05                 6						jne $l26 
 045B                        3	$l27: 
 045B  3B 47 01			           CMP     AX,WORD PTR [BX+1]  ; WGR yes...compare the word                      ;AN000;
				        .ELSE                          ; WGR                                             ;AN000;
 045E  EB 03                 3						jmp short $l25 
 0460                        2	$l26: 
 0460  3A 47 01			           CMP     AL,BYTE PTR [BX+1]  ; WGR no...compare the byte                       ;AN000;
				        .ENDIF                         ; WGR                                             ;AN000;
 0463                        2	$l25: 
 0463  74 06			        JZ      MATCH
 0465  03 D9			        ADD     BX,CX
 0467  EB DB			        JMP     KEYLP
 0469  0B DB			NOTFND: OR      BX,BX
 046B  C3			MATCH:  RET
				;--------------------------------------------------------------
				;
				;       KEYBOARD NON DESTRUCTIVE READ, NO WAIT
				;
 046C				CON$RDND:
 046C  A0 01AD R		        MOV     AL,[ALTAH]
 046F  0A C0			        OR      AL,AL
 0471  75 66			        JNZ     RDEXIT
				
 0473  80 3E 01A1 R 00		        CMP     [KEYCNT],0
 0478  74 08			        JZ      RD1
 047A  8B 1E 01A2 R		        MOV     BX,[KEYPTR]
 047E  8A 07			        MOV     AL,BYTE PTR [BX]
 0480  EB 57			        JMP     SHORT RDEXIT
				
 0482  B4 01			RD1:    MOV     AH,1
				        .IF   <EXT_16 EQ ON>  ; WGR extended INT16 available?                            ;AN000;
 0484  80 3E 01AE R 01       3						cmp EXT_16,ON 
 0489  75 03                 6						jne $l29 
 048B  80 C4 10			           ADD     AH,10H     ; WGR yes....adjust to extended call                       ;AN000;
				        .ENDIF
 048E                        2	$l29: 
 048E  CD 16			        INT     16H
 0490  74 51			        JZ      CONBUS
 0492  0B C0			        OR      AX,AX
 0494  75 1D			        JNZ     RD2
 0496  B4 00			        MOV     AH,0
				        .IF  <EXT_16 EQ ON>          ; WGR extended interrupt available?                 ;AN000;
 0498  80 3E 01AE R 01       3						cmp EXT_16,ON 
 049D  75 10                 6						jne $l33 
 049F  B4 10			           MOV    AH,10h             ; WGR yes..perform extended call                    ;AN000;
 04A1  CD 16			           INT    16H                ; WGR                                               ;AN000;
				           .IF  <SWITCH_X EQ OFF>    ; WGR /X switch used?                               ;AN000;
 04A3  80 3E 01AF R 00       3						cmp SWITCH_X,OFF 
Microsoft (R) Macro Assembler Version 5.10                  5/17/24 09:43:46
CONDEV  FANCY CONSOLE DRIVER                                Page     1-28
ANSI driver code                                            

 04A8  75 07                 6						jne $l32 
 04AA  E8 081C R		              CALL   CHECK_FOR_REMAP ; WGR no....map to normal call                      ;AN000;
				           .ENDIF                    ; WGR                                               ;AN000;
				        .ELSE                        ; WGR                                               ;AN000;
 04AD  EB 02                 3						jmp short $l32 
 04AF                        2	$l33: 
 04AF  CD 16			           INT    16H                ; WGR                                               ;AN000;
				        .ENDIF                       ; WGR                                               ;AN000;
 04B1                        2	$l32: 
 04B1  EB B9			        JMP     CON$RDND
				
 04B3  E8 0441 R		RD2:    CALL    SCAN
				        .IF  NZ  AND                 ; WGR if no redefinition                            ;AN000;
 04B6  74 13                 6						jz $l39 
				        .IF  <EXT_16 EQ ON> AND      ; WGR and extended INT16 used                       ;AN000;
 04B8  80 3E 01AE R 01       3						cmp EXT_16,ON 
 04BD  75 0C                 6						jne $l39 
				        .IF  <SWITCH_X EQ ON>        ; WGR and /x used ....then                          ;AN000;
 04BF  80 3E 01AF R 01       3						cmp SWITCH_X,ON 
 04C4  75 05                 6						jne $l39 
 04C6  E8 081C R		           CALL   CHECK_FOR_REMAP    ; WGR remap to standard call                        ;AN000;
 04C9  0B DB			           OR     BX,BX              ; WGR reset zero flag for jump test in old code     ;AN000;
				        .ENDIF
 04CB                        2	$l39: 
 04CB  75 0C			        JNZ     RDEXIT
				
 04CD  8A 47 02			        MOV     AL,BYTE PTR [BX+2]
 04D0  80 7F 01 00		        CMP     BYTE PTR [BX+1],0
 04D4  75 03			        JNZ     RDEXIT
 04D6  8A 47 03			        MOV     AL,BYTE PTR [BX+3]
 04D9  C5 1E 00B1 R		RDEXIT: LDS     BX,[PTRSAV]
 04DD  88 47 0D			        MOV     [BX].MEDIA,AL
 04E0  E9 0165 R		EXVEC:  JMP     EXIT
 04E3  E9 0158 R		CONBUS: JMP     BUS$EXIT
				;--------------------------------------------------------------
				;
				;       KEYBOARD FLUSH ROUTINE
				;
 04E6				CON$FLSH:
 04E6  C6 06 01AD R 00		        MOV     [ALTAH],0                 ;Clear out holding buffer
 04EB  C6 06 01A1 R 00		        MOV     [KEYCNT],0
				
				;       PUSH    DS
				;       XOR     BP,BP
				;       MOV     DS,BP                   ;Select segment 0
				;       MOV     DS:BYTE PTR 41AH,1EH    ; Reset KB queue head pointer
				;       MOV     DS:BYTE PTR 41CH,1EH    ;Reset tail pointer
				;       POP     DS
				
 04F0  B4 01			Flush:  mov     ah,1
				        .IF  <EXT_16 EQ ON>     ; WGR is extended call available?                        ;AN000;
 04F2  80 3E 01AE R 01       3						cmp EXT_16,ON 
 04F7  75 03                 6						jne $l42 
 04F9  80 C4 10			           ADD    AH,10H        ; WGR yes....adjust for extended                         ;AN000;
Microsoft (R) Macro Assembler Version 5.10                  5/17/24 09:43:46
CONDEV  FANCY CONSOLE DRIVER                                Page     1-29
ANSI driver code                                            

				        .ENDIF                  ; WGR                                                    ;AN000;
 04FC                        2	$l42: 
 04FC  CD 16			        int     16h
 04FE  74 10			        jz      FlushDone
 0500  B4 00			        mov     ah,0
				        .IF  <EXT_16 EQ ON>     ; WGR is extended call available?                        ;AN000;
 0502  80 3E 01AE R 01       3						cmp EXT_16,ON 
 0507  75 03                 6						jne $l45 
 0509  80 C4 10			           ADD    AH,10H        ; WGR yes....adjust for extended                         ;AN000;
				        .ENDIF                  ; WGR                                                    ;AN000;
 050C                        2	$l45: 
 050C  CD 16			        int     16h
 050E  EB E0			        jmp     Flush
 0510				FlushDone:
				
 0510  EB CE			        JMP     EXVEC
				;----------------------------------------------------------
				;
				;       CONSOLE WRITE ROUTINE
				;
 0512				CON$WRIT:
 0512  E3 CC			        JCXZ    EXVEC
				
 0514  26: 8A 05		CON$LP: MOV     AL,ES:[DI]      ;GET CHAR
 0517  47			        INC     DI
 0518  E8 0528 R		        CALL    OUTC            ;OUTPUT CHAR
 051B  E2 F7			        LOOP    CON$LP          ;REPEAT UNTIL ALL THROUGH
 051D  EB C1			        JMP     EXVEC
				
 051F  FB			COUT:   STI
 0520  1E			        PUSH    DS
 0521  0E			        PUSH    CS
 0522  1F			        POP     DS
 0523  E8 0528 R		        CALL    OUTC
 0526  1F			        POP     DS
 0527  CF			        IRET
				
 0528  50			OUTC:   PUSH    AX
 0529  53			        PUSH    BX
 052A  51			        PUSH    CX
 052B  52			        PUSH    DX
 052C  56			        PUSH    SI
 052D  57			        PUSH    DI
 052E  06			        PUSH    ES
 052F  55			        PUSH    BP
				
 0530  C7 06 027A R B800	        MOV     [BASE],0B800H
 0536  96			        XCHG    AX,SI                   ; SAVE CHARACTER TO STUFF
 0537  B8 0040			        MOV     AX,40H                  ; POINT TO ROS BIOS
 053A  8E D8			        MOV     DS,AX
 053C  A1 0049			        MOV     AX,DS:[49H]             ; AL=MODE, AH=MAX COL
 053F  FE CC			        DEC     AH                      ; ANSI NEEDS 0-79 OR 0-39
 0541  2E: A3 0198 R		        MOV     WORD PTR CS:[MODE],AX   ; SAVE MODE AND MAX COL
 0545  3C 07			        CMP     AL,7
Microsoft (R) Macro Assembler Version 5.10                  5/17/24 09:43:46
CONDEV  FANCY CONSOLE DRIVER                                Page     1-30
ANSI driver code                                            

 0547  75 07			        JNZ     NOT_BW
 0549  2E: C7 06 027A R B000	        MOV     WORD PTR CS:[BASE],0B000H
 0550  A0 0062			NOT_BW: MOV     AL,DS:[62H]             ; GET ACTIVE PAGE
 0553  2E: A2 0279 R		        MOV     CS:[BPAGE],AL
 0557  98			        CBW
 0558  03 C0			        ADD     AX,AX
 055A  8B D8			        MOV     BX,AX
 055C  8B 47 50			        MOV     AX,DS:[BX+50H]          ; AL=COL, AH=ROW
 055F  2E: A3 019A R		        MOV     WORD PTR CS:[COL],AX    ; SAVE ROW AND COLUMN
 0563  A1 004E			        MOV     AX,DS:[4EH]             ; GET START OF SCREEN SEG
 0566  B1 04			        MOV     CL,4
 0568  D3 E8			        SHR     AX,CL                   ; CONVERT TO A SEGMENT
 056A  0E			        PUSH    CS
 056B  1F			        POP     DS
 056C  A3 027C R		        MOV     [SCREEN_SEG],AX
 056F  96			        XCHG    AX,SI                   ; GET BACK CHARACTER IN AL
				
 0570  E8 057C R		        CALL    VIDEO
 0573  5D			        POP     BP
 0574  07			        POP     ES
 0575  5F			        POP     DI
 0576  5E			        POP     SI
 0577  5A			        POP     DX
 0578  59			        POP     CX
 0579  5B			        POP     BX
 057A  58			        POP     AX
 057B  C3			        RET
				
				
				;----------------------------------------------------------
				;
				;       OUTPUT SINGLE CHAR IN AL TO VIDEO DEVICE
				;
 057C  BE 0196 R		VIDEO:  MOV     SI,OFFSET STATE
 057F  FF 24			        JMP     [SI]
				
 0581  3C 5B			S2:     CMP     AL,'['
 0583  74 03			        JZ      S22
 0585  E9 0613 R		        JMP     S1
 0588  C7 04 0594 R		S22:    MOV     WORD PTR [SI],OFFSET S3
 058C  33 DB			        XOR     BX,BX
 058E  89 1E 019E R		        MOV     WORD PTR INQ,BX
 0592  EB 08			        JMP     SHORT S3B
				
 0594  3C 3B			S3:     CMP     AL,';'
 0596  75 0C			        JNZ     S3C
 0598  FE 06 019F R		S3A:    INC     PRMCNT
 059C  E8 0802 R		S3B:    CALL    GETPTR
 059F  33 C0			        XOR     AX,AX
 05A1  89 07			        MOV     WORD PTR [BX],AX    ;DEFAULT VALUE IS ZERO
 05A3  C3			        RET
				
 05A4  3C 30			S3C:    CMP     AL,'0'
 05A6  72 12			        JB      S3D
Microsoft (R) Macro Assembler Version 5.10                  5/17/24 09:43:46
CONDEV  FANCY CONSOLE DRIVER                                Page     1-31
ANSI driver code                                            

 05A8  3C 39			        CMP     AL,'9'
 05AA  77 0E			        JA      S3D
 05AC  E8 0802 R		        CALL    GETPTR
 05AF  2C 30			        SUB     AL,'0'
 05B1  86 07			        XCHG    AL,BYTE PTR [BX]
 05B3  B4 0A			        MOV     AH,10
 05B5  F6 E4			        MUL     AH                      ;*10
 05B7  00 07			        ADD     BYTE PTR [BX],AL        ;MOVE IN DIGIT
 05B9  C3			        RET
				
 05BA  3C 3D			S3D:    CMP     AL,'='
 05BC  74 13			        JZ      S3RET
 05BE  3C 3F			        CMP     AL,'?'
 05C0  74 0F			        JZ      S3RET
 05C2  3C 22			        CMP     AL,'"'                  ;BEGIN QUOTED STRING
 05C4  74 04			        JZ      S3E
 05C6  3C 27			        CMP     AL,"'"
 05C8  75 22			        JNZ     S7
 05CA  C7 04 05D2 R		S3E:    MOV     WORD PTR [SI],OFFSET S4
 05CE  A2 019E R		        MOV     [INQ],AL
 05D1  C3			S3RET:  RET
				
				;
				;   ENTER QUOTED STRINGS
				;
				
 05D2  3A 06 019E R		S4:     CMP     AL,[INQ]                ;CHECK FOR STRING TERMINATOR
 05D6  75 09			        JNZ     S4A
 05D8  FE 0E 019F R		        DEC     PRMCNT                  ;TERMINATE STRING
 05DC  C7 04 0594 R		        MOV     WORD PTR [SI],OFFSET S3
 05E0  C3			        RET
				
 05E1  E8 0802 R		S4A:    CALL    GETPTR
 05E4  88 07			        MOV     BYTE PTR [BX],AL
 05E6  C7 04 05D2 R		        MOV     WORD PTR [SI],OFFSET S4
 05EA  EB AC			        JMP     S3A
				;
				;  LOOK FOR ANSI COMMAND SPECIFIED IN AL
				;
				
 05EC  BB 0037 R		S7:     MOV     BX,OFFSET CMDTABL-3
				;
 05EF  83 C3 03			S7A:    ADD     BX,3
 05F2  80 3F 00			        CMP     BYTE PTR [BX],0
 05F5  74 25			        JZ      S1B
 05F7  38 07			        CMP     BYTE PTR [BX],AL
 05F9  75 F4			        JNZ     S7A
				;
 05FB  8B 47 01			S7B:    MOV     AX,WORD PTR [BX+1]     ;AX = JUMP ADDRESS
 05FE  BB 0827 R		        MOV     BX,OFFSET BUF
 0601  43			        INC     BX
 0602  03 1E 0194 R		        ADD     BX,ASNPTR              ;BX = PTR TO PARM LIST
 0606  8A 17			        MOV     DL,BYTE PTR [BX]
 0608  32 F6			        XOR     DH,DH                  ;DX = FIRST PARAMETER
Microsoft (R) Macro Assembler Version 5.10                  5/17/24 09:43:46
CONDEV  FANCY CONSOLE DRIVER                                Page     1-32
ANSI driver code                                            

 060A  8B CA			        MOV     CX,DX
 060C  0B C9			        OR      CX,CX
 060E  75 01			        JNZ     S7C
 0610  41			        INC     CX                     ;CX = DX, CX=1 IF DX=0
 0611  FF E0			S7C:    JMP     AX                     ;AL = COMMAND
				
 0613  3C 1B			S1:     CMP     AL,ESC_CHAR            ;ESCAPE SEQUENCE?
 0615  75 05			        JNZ     S1B
 0617  C7 04 0581 R		        MOV     WORD PTR [SI],OFFSET S2
 061B  C3			        RET
				
 061C  E8 027E R		S1B:    CALL    CHROUT
 061F  C7 06 0196 R 0613 R	S1A:    MOV     WORD PTR [STATE],OFFSET S1
 0625  C3			        RET
				
 0626  38 27			MOVCUR: CMP     BYTE PTR [BX],AH
 0628  74 04			        JZ      SETCUR
 062A  00 07			        ADD     BYTE PTR [BX],AL
 062C  E2 F8			        LOOP    MOVCUR
 062E  8B 16 019A R		SETCUR: MOV     DX,WORD PTR COL
 0632  33 DB			        XOR     BX,BX
 0634  B4 02			        MOV     AH,2
 0636  CD 10			        INT     16
 0638  EB E5			        JMP     S1A
				
 063A				CUP:    .IF <GRAPHICS_FLAG EQ GRAPHICS_MODE>   ; WGR                                     ;AN000;
 063A  80 3E 0000 E 02       3						cmp GRAPHICS_FLAG,GRAPHICS_MODE 
 063F  75 05                 6						jne $l49 
 0641  80 F9 19			          CMP     CL,DEFAULT_LENGTH            ; WGR                                     ;AN000;
				        .ELSE                                  ; WGR                                     ;AN000;
 0644  EB 04                 3						jmp short $l48 
 0646                        2	$l49: 
 0646  3A 0E 0000 E		          CMP     CL,BYTE PTR [REQ_TXT_LENGTH] ; WGR                                     ;AN000;
				        .ENDIF                                 ; WGR                                     ;AN000;
 064A                        2	$l48: 
 064A  77 E2			        JA      SETCUR
 064C  A0 0199 R		        MOV     AL,MAXCOL
 064F  8A 6F 01			        MOV     CH,BYTE PTR [BX+1]
 0652  0A ED			        OR      CH,CH
 0654  74 02			        JZ      CUP1
 0656  FE CD			        DEC     CH
 0658  3A C5			CUP1:   CMP     AL,CH
 065A  77 02			        JA      CUP2
 065C  8A E8			        MOV     CH,AL
 065E  86 CD			CUP2:   XCHG    CL,CH
 0660  FE CD			        DEC     CH
 0662  89 0E 019A R		        MOV     WORD PTR COL,CX
 0666  EB C6			        JMP     SETCUR
				
 0668  8A 26 0199 R		CUF:    MOV     AH,MAXCOL
 066C  B0 01			        MOV     AL,1
 066E  BB 019A R		CUF1:   MOV     BX,OFFSET COL
 0671  EB B3			        JMP     MOVCUR
				
Microsoft (R) Macro Assembler Version 5.10                  5/17/24 09:43:46
CONDEV  FANCY CONSOLE DRIVER                                Page     1-33
ANSI driver code                                            

 0673  B8 00FF			CUB:    MOV     AX,00FFH
 0676  EB F6			        JMP     CUF1
				
 0678  B8 00FF			CUU:    MOV     AX,00FFH
 067B  BB 019B R		CUU1:   MOV     BX,OFFSET ROW
 067E  EB A6			        JMP     MOVCUR
				
 0680				CUD:    .IF <GRAPHICS_FLAG EQ GRAPHICS_MODE>   ; WGR                                     ;AN000;
 0680  80 3E 0000 E 02       3						cmp GRAPHICS_FLAG,GRAPHICS_MODE 
 0685  75 04                 6						jne $l53 
 0687  B4 19			          MOV     AH,DEFAULT_LENGTH            ; WGR                                     ;AN000;
				        .ELSE                                  ; WGR                                     ;AN000;
 0689  EB 04                 3						jmp short $l52 
 068B                        2	$l53: 
 068B  8A 26 0000 E		          MOV     AH,BYTE PTR [REQ_TXT_LENGTH] ; WGR                                     ;AN000;
				        .ENDIF                                 ; WGR                                     ;AN000;
 068F                        2	$l52: 
 068F  B0 01			        MOV     AL,1                           ; WGR                                     ;AN000;
 0691  EB E8			        JMP     CUU1
				
 0693				ExtKey:                                         ;AN003;
 0693  80 FA 00			        cmp     dl, 0                           ;AN003; DL = previous parameter
 0696  75 07			        jne     ExtKey_1                        ;AN003;
 0698  C6 06 01AF R 00		        mov     Switch_X, OFF                   ;AN003; reset it if 0.
 069D  EB 80			        jmp     S1A                             ;AN003;
 069F				ExtKey_1:                                       ;AN003;
 069F  80 FA 01			        cmp     dl, 1                           ;AN003; 1 ?
 06A2  74 03			        je      SetExtKey                       ;AN003;
 06A4  E9 061F R		        jmp     S1A                             ;AN003; ignore it
 06A7				SetExtKey:                                      ;AN003;
 06A7  C6 06 01AF R 01		        mov     Switch_X, ON                    ;AN003; set it if 1.
 06AC  E9 061F R		        jmp     S1A                             ;AN003;
				
 06AF  A1 019A R		PSCP:   MOV     AX,WORD PTR COL
 06B2  A3 019C R		        MOV     SAVCR,AX
 06B5  E9 062E R		        JMP     SETCUR
				
 06B8  A1 019C R		PRCP:   MOV     AX,SAVCR
 06BB  A3 019A R		        MOV     WORD PTR COL,AX
 06BE  E9 062E R		        JMP     SETCUR
				
 06C1  33 C9			SGR:    XOR     CX,CX
 06C3  86 0E 019F R		        XCHG    CL,PRMCNT
 06C7  E8 0802 R		        CALL    GETPTR
 06CA  41			        INC     CX
 06CB  8A 07			SGR1:   MOV     AL,BYTE PTR [BX]
 06CD  53			        PUSH    BX
 06CE  BB 006E R		        MOV     BX,OFFSET GRMODE
 06D1  8A 27			SGR2:   MOV     AH,BYTE PTR [BX]
 06D3  83 C3 03			        ADD     BX,3
 06D6  80 FC FF			        CMP     AH,0FFH
 06D9  74 0F			        JZ      SGR3
 06DB  3A E0			        CMP     AH,AL
 06DD  75 F2			        JNZ     SGR2
Microsoft (R) Macro Assembler Version 5.10                  5/17/24 09:43:46
CONDEV  FANCY CONSOLE DRIVER                                Page     1-34
ANSI driver code                                            

 06DF  8B 47 FE			        MOV     AX,WORD PTR [BX-2]
 06E2  20 06 0278 R		        AND     ATTR,AL
 06E6  08 26 0278 R		        OR      ATTR,AH
 06EA  5B			SGR3:   POP     BX
 06EB  43			        INC     BX
 06EC  E2 DD			        LOOP    SGR1
 06EE  E9 062E R		        JMP     SETCUR
				
 06F1  33 C9			ED:     XOR     CX,CX
 06F3  89 0E 019A R		        MOV     WORD PTR COL,CX
 06F7  B6 1E			        MOV     DH,30                   ;                                      ;AN009;
 06F9  A0 0198 R		        MOV     AL,MODE                 ;                                      ;AN009;
 06FC  3C 11			        CMP     AL,11H                  ;                                      ;AN009;
 06FE  74 13			        JE      ERASE                   ;                                      ;AN009;
 0700  3C 12			        CMP     AL,12H                  ;                                      ;AN009;
 0702  74 0F			        JE      ERASE                   ;                                      ;AN009;
				        .IF <GRAPHICS_FLAG EQ GRAPHICS_MODE>      ; WGR                                  ;AN000;
 0704  80 3E 0000 E 02       3						cmp GRAPHICS_FLAG,GRAPHICS_MODE 
 0709  75 04                 6						jne $l57 
 070B  B6 19			          MOV     DH,DEFAULT_LENGTH               ; WGR                                  ;AN000;
				        .ELSE                                     ; WGR                                  ;AN000;
 070D  EB 04                 3						jmp short $l56 
 070F                        2	$l57: 
 070F  8A 36 0000 E		          MOV     DH,BYTE PTR [REQ_TXT_LENGTH]    ; WGR                                  ;AN000;
				        .ENDIF                                    ; WGR                                  ;AN000;
 0713                        2	$l56: 
 0713  8A 16 0199 R		ERASE:  MOV     DL,MAXCOL
				        .IF <GRAPHICS_FLAG EQ GRAPHICS_MODE>      ; WGR if we are in a graphics mode..   ;AN000;
 0717  80 3E 0000 E 02       3						cmp GRAPHICS_FLAG,GRAPHICS_MODE 
 071C  75 04                 6						jne $l61 
 071E  32 FF			          XOR    BH,BH                            ; WGR then use 0 as attribute...       ;AN000;
				        .ELSE                                     ; WGR else...                          ;AN000;
 0720  EB 04                 3						jmp short $l60 
 0722                        2	$l61: 
 0722  8A 3E 0278 R		          MOV     BH,ATTR                         ; WGR ...use active attribute         ;AC000;
				        .ENDIF                                    ; WGR                                  ;AN000;
 0726                        2	$l60: 
 0726  B8 0600			        MOV     AX,0600H
 0729  CD 10			        INT     16
 072B  E9 062E R		ED3:    JMP     SETCUR
				
 072E  8B 0E 019A R		EL:     MOV     CX,WORD PTR COL
 0732  8A F5			        MOV     DH,CH
 0734  EB DD			        JMP     ERASE
				
 0736  B2 0A			BIN2ASC:MOV     DL,10
 0738  FE C0			        INC     AL
 073A  32 E4			        XOR     AH,AH
 073C  F6 F2			        DIV     DL
 073E  05 3030			        ADD     AX,'00'
 0741  C3			        RET
 0742  B4 03			DSR:    MOV     AH,REQ_CRSR_POS         ; WGR                                            ;AN000;
 0744  53			        PUSH    BX                      ; WGR                                            ;AN000;
 0745  32 FF			        XOR     BH,BH                   ; WGR                                            ;AN000;
Microsoft (R) Macro Assembler Version 5.10                  5/17/24 09:43:46
CONDEV  FANCY CONSOLE DRIVER                                Page     1-35
ANSI driver code                                            

 0747  CD 10			        INT     10H                     ; WGR                                            ;AN000;
 0749  5B			        POP     BX                      ; WGR                                            ;AN000;
 074A  52			        PUSH    DX                      ; WGR                                            ;AN000;
 074B  8A C6			        MOV     AL,DH                   ;REPORT CURRENT CURSOR POSITION
 074D  E8 0736 R		        CALL    BIN2ASC
 0750  A3 01A6 R		        MOV     WORD PTR REPORT+2,AX
 0753  5A			        POP     DX                      ; WGR                                            ;AN000;
 0754  8A C2			        MOV     AL,DL                   ; WGR                                            ;AN000;
 0756  E8 0736 R		        CALL    BIN2ASC
 0759  A3 01A9 R		        MOV     WORD PTR REPORT+5,AX
 075C  C6 06 01A1 R 09		        MOV     [KEYCNT],9
 0761  C7 06 01A2 R 01A4 R	        MOV     [KEYPTR],OFFSET REPORT
 0767  E9 061F R		CPR:    JMP     S1A
				
 076A  B1 01			RM:     MOV     CL,1
 076C  EB 02			        JMP     SHORT SM1
				
 076E  33 C9			SM:     XOR     CX,CX
 0770  8A C2			SM1:    MOV     AL,DL
				        .IF <AL LT MODE7> OR        ;; WGR check to see if valid mode..                  ;AN000;
 0772  3C 07                 3						cmp AL,MODE7 
 0774  7C 08                 6						jl $l66 
				        .IF <AL GE MODE13> AND      ;; WGR  (0-6,13-19)                                  ;AN000;
 0776  3C 0D                 3						cmp AL,MODE13 
 0778  7C 27                 5						jnGE $l65 
				        .IF <AL LE MODE19>          ;; WGR                                               ;AN000;
 077A  3C 13                 3						cmp AL,MODE19 
 077C  7F 23                 5						jnLE $l65 
 077E                        3	$l66: 
				          .IF <BIT HDWR_FLAG AND LCD_ACTIVE> ;; WGR is this the LCD?                     ;AN000;
 077E  F7 06 01B3 R 0001     3						test HDWR_FLAG,LCD_ACTIVE 
 0784  74 15                 6						jz $l67 
 0786  1E			            PUSH   DS                 ;; WGR yes...                                      ;AN000;
 0787  50			            PUSH   AX                 ;; WGR save mode                                   ;AN000;
 0788  B8 0040			            MOV    AX,ROM_BIOS        ;; WGR                                             ;AN000;
 078B  8E D8			            MOV    DS,AX              ;; WGR get equipment status flag..                 ;AN000;
 078D  A1 0010			            MOV    AX,DS:[EQUIP_FLAG] ;; WGR                                             ;AN000;
 0790  25 FFCF			            AND    AX,INIT_VID_MASK   ;; WGR clear initial video bits..                  ;AN000;
 0793  0D 0020			            OR     AX,LCD_COLOR_MODE  ;; WGR .....set bits as color                      ;AN000;
 0796  A3 0010			            MOV    DS:[EQUIP_FLAG],AX ;; WGR replace updated flag.                       ;AN000;
 0799  58			            POP    AX                 ;; WGR restore mode.                               ;AN000;
 079A  1F			            POP    DS                 ;; WGR                                             ;AN000;
				          .ENDIF                      ;; WGR                                             ;AN000;
 079B                        2	$l67: 
 079B  B4 00			          MOV     AH,SET_MODE       ;; WGR yes....set mode..                             ;AN000;
 079D  CD 10			          INT     10H               ;; WGR                                               ;AN000;
				        .ELSE                       ;; WGR no...check for 7 (wrap at EOL)                ;AN000;
 079F  EB 08                 3						jmp short $l64 
 07A1                        2	$l65: 
				          .IF <AL EQ 7>             ;; WGR                                               ;AN000;
 07A1  3C 07                 3						cmp AL,7 
 07A3  75 04                 6						jne $l64 
 07A5  88 0E 0193 R		            MOV    [WRAP],CL        ;; WGR yes....wrap...                                ;AN000;
				          .ENDIF                    ;; WGR                                               ;AN000;
Microsoft (R) Macro Assembler Version 5.10                  5/17/24 09:43:46
CONDEV  FANCY CONSOLE DRIVER                                Page     1-36
ANSI driver code                                            

				        .ENDIF                      ;; WGR                                               ;AN000;
 07A9                        2	$l64: 
 07A9  EB BC			        JMP     CPR
				
 07AB  33 D2			KEYASN: XOR     DX,DX
 07AD  86 16 019F R		        XCHG    DL,PRMCNT               ;GET CHARACTER COUNT
 07B1  42			        INC     DX
 07B2  42			        INC     DX
				
 07B3  E8 0802 R		        CALL    GETPTR
 07B6  8B 07			        MOV     AX,WORD PTR [BX]        ;GET CHARACTER TO BE ASSIGNED
 07B8  E8 0441 R		        CALL    SCAN                    ;LOOK IT UP
 07BB  75 1B			        JNZ     KEYAS1
				
 07BD  8B FB			        MOV     DI,BX                   ;DELETE OLD DEFINITION
 07BF  29 0E 0194 R		        SUB     ASNPTR,CX
 07C3  C6 06 01A1 R 00		        MOV     KEYCNT,0        ; This delete code shuffles the
				                                ;   key definition table all around.
				                                ;   This will cause all sorts of trouble
				                                ;   if we are in the middle of expanding
				                                ;   one of the definitions being shuffled.
				                                ;   So shut off the expansion.
 07C8  8B F7			        MOV     SI,DI
 07CA  03 F1			        ADD     SI,CX
 07CC  B9 09B7 R		        MOV     CX,OFFSET BUF+ASNMAX
 07CF  2B CE			        SUB     CX,SI
 07D1  FC			        CLD
 07D2  06			        PUSH    ES              ;SAVE USER'S ES
 07D3  0E			        PUSH    CS
 07D4  07			        POP     ES              ;SET UP ES ADDRESSABILITY
 07D5  F3/ A4			        REP     MOVSB
 07D7  07			        POP     ES              ;RESTORE ES
				
 07D8  E8 0802 R		KEYAS1: CALL    GETPTR
 07DB  80 FA 03			        CMP     DL,3
 07DE  72 17			        JB      KEYAS3
 07E0  88 57 FF			        MOV     BYTE PTR [BX-1],DL      ;SET LENGTH
 07E3  01 16 0194 R		        ADD     ASNPTR,DX               ;REMEMBER END OF LIST
 07E7  03 DA			        ADD     BX,DX
 07E9  81 3E 0194 R 0190	        CMP     ASNPTR,ASNMAX           ; Too much???
 07EF  72 06			        JB      KEYAS3                  ; No
 07F1  2B DA			        SUB     BX,DX                   ; Next three instructions undo the above
 07F3  29 16 0194 R		        SUB     ASNPTR,DX
 07F7  C6 47 FF 00		KEYAS3: MOV     BYTE PTR [BX-1],00
 07FB  C7 06 0196 R 0613 R	        MOV     STATE,OFFSET S1         ;RETURN
 0801  C3			        RET
				
 0802  8B 1E 0194 R		GETPTR: MOV     BX,ASNPTR
 0806  43			        INC     BX
 0807  03 1E 019F R		        ADD     BX,PRMCNTW
 080B  81 FB 0198		        CMP     BX,ASNMAX + 8
 080F  72 06			        JB      GET1
 0811  FE 0E 019F R		        DEC     PRMCNT
 0815  EB EB			        JMP     GETPTR
Microsoft (R) Macro Assembler Version 5.10                  5/17/24 09:43:46
CONDEV  FANCY CONSOLE DRIVER                                Page     1-37
ANSI driver code                                            

 0817  81 C3 0827 R		GET1:   ADD     BX,OFFSET BUF
 081B  C3			        RET
				
				
				;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; WGR                          ;AN000;
				;                                                           WGR                          ;AN000;
				; CHECK_FOR_REMAP:                                          WGR                          ;AN000;
				;                                                           WGR                          ;AN000;
				;   This function esnures that the keypacket                WGR                          ;AN000;
				;   passed to it in AX is mapped to a standard INT16h call  WGR                          ;AN000;
				;                                                           WGR                          ;AN000;
				;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; WGR                          ;AN000;
				                                                                                         ;AN000;
 081C				CHECK_FOR_REMAP PROC NEAR     ; WGR                                                      ;AN000;
				        .IF  <AL EQ 0E0h>     ; WGR is this an extended key?                             ;AN000;
 081C  3C E0                 3						cmp AL,0E0h 
 081E  75 06                 6						jne $l74 
 0820  0A E4			           OR   AH,AH         ; WGR probably...but check for alpha character             ;AN000;
				           .IF  NZ            ; WGR if it's not an alpha character ....then              ;AN000;
 0822  74 02                 6						jz $l74 
 0824  32 C0			              XOR   AL,AL     ; WGR map extended to standard                             ;AN000;
				           .ENDIF             ; WGR                                                      ;AN000;
				        .ENDIF                ; WGR                                                      ;AN000;
 0826                        2	$l74: 
 0826  C3			        RET                   ; WGR                                                      ;AN000;
 0827				CHECK_FOR_REMAP ENDP          ; WGR                                                      ;AN000;
				
				
 0827  04 00 72 10 00		BUF     DB      4,00,72H,16,0
 082C  0193[			        DB      ASNMAX+8-5 DUP (?)
	   ??			
			 ]	
				
				
 09BF				CODE    ENDS
				        END

Microsoft (R) Macro Assembler Version 5.10                  5/17/24 09:43:46
CONDEV  FANCY CONSOLE DRIVER                                Symbols-1


Macros:

		N a m e			Lines

.ELSE  . . . . . . . . . . . . .  	  21
.ELSEIF  . . . . . . . . . . . .  	  16
.ENDIF . . . . . . . . . . . . .  	  11
.ENDSELECT . . . . . . . . . . .  	  15
.ENDWHILE  . . . . . . . . . . .  	  10
.FOR . . . . . . . . . . . . . .  	  23
.IF  . . . . . . . . . . . . . .  	  13
.LEAVE . . . . . . . . . . . . .  	   1
.LOOP  . . . . . . . . . . . . .  	  12
.NEXT  . . . . . . . . . . . . .  	  20
.OTHERWISE . . . . . . . . . . .  	  21
.REPEAT  . . . . . . . . . . . .  	   9
.SELECT  . . . . . . . . . . . .  	   4
.THEN  . . . . . . . . . . . . .  	   6
.UNTIL . . . . . . . . . . . . .  	   1
.WHEN  . . . . . . . . . . . . .  	  24
.WHILE . . . . . . . . . . . . .  	  14
ASMVAR . . . . . . . . . . . . .  	   3
ASMVARS  . . . . . . . . . . . .  	   3
BREAK  . . . . . . . . . . . . .  	   2

Structures and Records:

                N a m e                 Width   # fields
                                        Shift   Width   Mask    Initial

BUF_DATA . . . . . . . . . . . .  	000C	0006
  DEV_HDRO . . . . . . . . . . .  	0000
  DEV_HDRS . . . . . . . . . . .  	0002
  CON_STRAO  . . . . . . . . . .  	0004
  CON_STRAS  . . . . . . . . . .  	0006
  CON_INTRO  . . . . . . . . . .  	0008
  CON_INTRS  . . . . . . . . . .  	000A
DA_INFO_PACKET . . . . . . . . .  	0003	0003
  DA_INFO_LEVEL  . . . . . . . .  	0000
  DA_SETMODE_FLAG  . . . . . . .  	0001
  DA_OPTION_L_STATE  . . . . . .  	0002
DHS  . . . . . . . . . . . . . .  	0012	0006
  DH_NEXTO . . . . . . . . . . .  	0000
  DH_NEXTS . . . . . . . . . . .  	0002
  DH_STRAO . . . . . . . . . . .  	0006
  DH_INTRO . . . . . . . . . . .  	0008
  DH_NAME  . . . . . . . . . . .  	000A
INFO_BLOCK . . . . . . . . . . .  	0040	0009
  STATIC_ADDRESS . . . . . . . .  	0000
  ACTIVE_DISPLAY . . . . . . . .  	0025
  ALT_DISPLAY  . . . . . . . . .  	0026
  CURRENT_SCANS  . . . . . . . .  	002A
  MISC_INFO  . . . . . . . . . .  	002D
INIT_REQ_HDR . . . . . . . . . .  	0017	0006
Microsoft (R) Macro Assembler Version 5.10                  5/17/24 09:43:46
CONDEV  FANCY CONSOLE DRIVER                                Symbols-2


  MAJ_FUNC . . . . . . . . . . .  	000D
  MIN_FUNC . . . . . . . . . . .  	000E
  IOCTL_SI . . . . . . . . . . .  	000F
  IOCTL_DI . . . . . . . . . . .  	0011
  REQ_PCKT_PTR . . . . . . . . .  	0013
MODE_TABLE . . . . . . . . . . .  	000D	0008
  V_MODE . . . . . . . . . . . .  	0000
  D_MODE . . . . . . . . . . . .  	0001
  RESERVED_BYTE  . . . . . . . .  	0002
  COLORS . . . . . . . . . . . .  	0003
  SCR_WIDTH  . . . . . . . . . .  	0005
  SCR_LENGTH . . . . . . . . . .  	0007
  SCR_COLS . . . . . . . . . . .  	0009
  SCR_ROWS . . . . . . . . . . .  	000B
REQ_PCKT . . . . . . . . . . . .  	0012	000B
  INFO_LEVEL . . . . . . . . . .  	0000
  DATA_LENGTH  . . . . . . . . .  	0002
  RP_FLAGS . . . . . . . . . . .  	0004
  RP_MODE  . . . . . . . . . . .  	0006
  RESERVED2  . . . . . . . . . .  	0007
  RP_COLORS  . . . . . . . . . .  	0008
  RP_WIDTH . . . . . . . . . . .  	000A
  RP_LENGTH  . . . . . . . . . .  	000C
  RP_COLS  . . . . . . . . . . .  	000E
  RP_ROWS  . . . . . . . . . . .  	0010
RESULT_STRUC . . . . . . . . . .  	0008	0004
  RESULT_TYPE  . . . . . . . . .  	0000
  RES_SYN_PTR  . . . . . . . . .  	0002
  RES_PTR  . . . . . . . . . . .  	0004
SCAN_LINE_STR  . . . . . . . . .  	0004	0003
  NUM_LINES  . . . . . . . . . .  	0000
  REP_1BH  . . . . . . . . . . .  	0002
  REP_12H  . . . . . . . . . . .  	0003
STATIC_BLOCK . . . . . . . . . .  	0008	0002
  SCAN_TEXT  . . . . . . . . . .  	0007
SUB_STRUC  . . . . . . . . . . .  	0006	0003
  SUB_PTR_O  . . . . . . . . . .  	0002
  SUB_PTR_S  . . . . . . . . . .  	0004
SYS_ID . . . . . . . . . . . . .  	0003	0002
  MODEL_BYTE . . . . . . . . . .  	0002

Segments and Groups:

                N a m e         	Length	 Align	Combine Class

CODE . . . . . . . . . . . . . .  	09BF	BYTE	PUBLIC	

Symbols:            

                N a m e         	Type	 Value	 Attr

ADDR_INT_ABORT . . . . . . . . .  	NUMBER	0080	
ADDR_INT_COMMAND . . . . . . . .  	NUMBER	0084	
ADDR_INT_CTRL_C  . . . . . . . .  	NUMBER	008C	
Microsoft (R) Macro Assembler Version 5.10                  5/17/24 09:43:46
CONDEV  FANCY CONSOLE DRIVER                                Symbols-3


ADDR_INT_DISK_READ . . . . . . .  	NUMBER	0094	
ADDR_INT_DISK_WRITE  . . . . . .  	NUMBER	0098	
ADDR_INT_FASTCON . . . . . . . .  	NUMBER	00A4	
ADDR_INT_FATAL_ABORT . . . . . .  	NUMBER	0090	
ADDR_INT_IBM . . . . . . . . . .  	NUMBER	00A8	
ADDR_INT_KEEP_PROCESS  . . . . .  	NUMBER	009C	
ADDR_INT_SPOOLER . . . . . . . .  	NUMBER	00A0	
ADDR_INT_TERMINATE . . . . . . .  	NUMBER	0088	
ALT10  . . . . . . . . . . . . .  	L NEAR	041B	CODE
ALTAH  . . . . . . . . . . . . .  	L BYTE	01AD	CODE
ALTVECT  . . . . . . . . . . . .  	NUMBER	0000	
ALT_PRT_SC . . . . . . . . . . .  	NUMBER	0020	
ALT_SELECT . . . . . . . . . . .  	NUMBER	0012	
ARG_PTR  . . . . . . . . . . . .  		0012	
ASNMAX . . . . . . . . . . . . .  	NUMBER	0190	
ASNPTR . . . . . . . . . . . . .  	L WORD	0194	CODE
ATTR . . . . . . . . . . . . . .  	L BYTE	0278	CODE
ATTRW  . . . . . . . . . . . . .  	L WORD	0278	CODE

BACKSP . . . . . . . . . . . . .  	NUMBER	0008	
BASE . . . . . . . . . . . . . .  	L WORD	027A	CODE	Global
BIN2ASC  . . . . . . . . . . . .  	L NEAR	0736	CODE
BLINK_TOGGLE . . . . . . . . . .  	NUMBER	1003	
BPAGE  . . . . . . . . . . . . .  	L BYTE	0279	CODE
BRKADR . . . . . . . . . . . . .  	NUMBER	006C		Global
BRKKY  . . . . . . . . . . . . .  	L NEAR	018B	CODE	Global
BUF  . . . . . . . . . . . . . .  	L BYTE	0827	CODE
BUF1 . . . . . . . . . . . . . .  	L NEAR	00B5	CODE
BUS$EXIT . . . . . . . . . . . .  	L NEAR	0158	CODE

CGA_ACTIVE . . . . . . . . . . .  	NUMBER	0004	
CHECK_ACTIVE . . . . . . . . . .  	NUMBER	AD02	
CHECK_FOR_FONT . . . . . . . . .  	NUMBER	AD10	
CHECK_FOR_REMAP  . . . . . . . .  	N PROC	081C	CODE	Length = 000B
CHRIN  . . . . . . . . . . . . .  	L NEAR	03B9	CODE
CHROUT . . . . . . . . . . . . .  	L NEAR	027E	CODE
CMD  . . . . . . . . . . . . . .  	NUMBER	0002	
CMDLEN . . . . . . . . . . . . .  	NUMBER	0000	
CMDTABL  . . . . . . . . . . . .  	L BYTE	003A	CODE
CMD_ERROR  . . . . . . . . . . .  	NUMBER	8000	
COL  . . . . . . . . . . . . . .  	L BYTE	019A	CODE
COLOR  . . . . . . . . . . . . .  	NUMBER	0000	
COLORCARD  . . . . . . . . . . .  	L NEAR	0374	CODE
COLOR_ADDRESS  . . . . . . . . .  	NUMBER	B800	
CON$EXIT . . . . . . . . . . . .  	L NEAR	03B6	CODE
CON$FLSH . . . . . . . . . . . .  	L NEAR	04E6	CODE
CON$INIT . . . . . . . . . . . .  	L NEAR	0000	CODE	External
CON$LOOP . . . . . . . . . . . .  	L NEAR	03AE	CODE
CON$LP . . . . . . . . . . . . .  	L NEAR	0514	CODE
CON$RDND . . . . . . . . . . . .  	L NEAR	046C	CODE
CON$READ . . . . . . . . . . . .  	L NEAR	03AC	CODE
CON$WRIT . . . . . . . . . . . .  	L NEAR	0512	CODE
CONBUS . . . . . . . . . . . . .  	L NEAR	04E3	CODE
CONDEV . . . . . . . . . . . . .  	L NEAR	0000	CODE
Microsoft (R) Macro Assembler Version 5.10                  5/17/24 09:43:46
CONDEV  FANCY CONSOLE DRIVER                                Symbols-4


CONFIG_ERRMSG  . . . . . . . . .  		0017	
CONPTR . . . . . . . . . . . . .  	TEXT  CS:[BX]		
CONTBL . . . . . . . . . . . . .  	L NEAR	0012	CODE
COUNT  . . . . . . . . . . . . .  	NUMBER	0012	
COUT . . . . . . . . . . . . . .  	L NEAR	051F	CODE	Global
CPR  . . . . . . . . . . . . . .  	L NEAR	0767	CODE
CR . . . . . . . . . . . . . . .  	NUMBER	000D	
CRITASSIGN . . . . . . . . . . .  	NUMBER	0008	
CRITDEVICE . . . . . . . . . . .  	NUMBER	0002	
CRITDISK . . . . . . . . . . . .  	NUMBER	0001	
CRITIFS  . . . . . . . . . . . .  	NUMBER	0006	
CRITMEM  . . . . . . . . . . . .  	NUMBER	0001	
CRITNET  . . . . . . . . . . . .  	NUMBER	0005	
CRITSFT  . . . . . . . . . . . .  	NUMBER	0001	
CRITSHARE  . . . . . . . . . . .  	NUMBER	0001	
CUB  . . . . . . . . . . . . . .  	L NEAR	0673	CODE
CUD  . . . . . . . . . . . . . .  	L NEAR	0680	CODE
CUF  . . . . . . . . . . . . . .  	L NEAR	0668	CODE
CUF1 . . . . . . . . . . . . . .  	L NEAR	066E	CODE
CUP  . . . . . . . . . . . . . .  	L NEAR	063A	CODE
CUP1 . . . . . . . . . . . . . .  	L NEAR	0658	CODE
CUP2 . . . . . . . . . . . . . .  	L NEAR	065E	CODE
CURSOR_FLAG  . . . . . . . . . .  	NUMBER	0087	
CUU  . . . . . . . . . . . . . .  	L NEAR	0678	CODE
CUU1 . . . . . . . . . . . . . .  	L NEAR	067B	CODE
CY . . . . . . . . . . . . . . .  	NUMBER	0001	

DA_INFO_2F . . . . . . . . . . .  	NUMBER	0002	
DEFAULT_LENGTH . . . . . . . . .  	NUMBER	0019	
DISPLAY_CHECK  . . . . . . . . .  	NUMBER	AD00	
DISPLAY_TYPE . . . . . . . . . .  	NUMBER	0003	
DONE . . . . . . . . . . . . . .  	NUMBER	0100	
DRIVE_NUM  . . . . . . . . . . .  		0016	
DSR  . . . . . . . . . . . . . .  	L NEAR	0742	CODE

E5151_ACTIVE . . . . . . . . . .  	NUMBER	0010	
E5153_ACTIVE . . . . . . . . . .  	NUMBER	0020	
E5154_ACTIVE . . . . . . . . . .  	NUMBER	0040	
ED . . . . . . . . . . . . . . .  	L NEAR	06F1	CODE
ED3  . . . . . . . . . . . . . .  	L NEAR	072B	CODE
EGA_INFO . . . . . . . . . . . .  	NUMBER	0010	
EIGHT  . . . . . . . . . . . . .  	NUMBER	0008	
EL . . . . . . . . . . . . . . .  	L NEAR	072E	CODE
END_ADDRESS_O  . . . . . . . . .  		000E	
END_ADDRESS_S  . . . . . . . . .  		0010	
ENTRY  . . . . . . . . . . . . .  	L NEAR	00CC	CODE
ENTRYPOINT . . . . . . . . . . .  	NUMBER	00C0	
EQUIP_FLAG . . . . . . . . . . .  	NUMBER	0010	
ERASE  . . . . . . . . . . . . .  	L NEAR	0713	CODE
ERR$EXIT . . . . . . . . . . . .  	L NEAR	0161	CODE
ERR1 . . . . . . . . . . . . . .  	L NEAR	0167	CODE	Global
ERR2 . . . . . . . . . . . . . .  	L NEAR	016F	CODE	Global
ESC_CHAR . . . . . . . . . . . .  	NUMBER	001B	
EXIT . . . . . . . . . . . . . .  	L NEAR	0165	CODE	Global
Microsoft (R) Macro Assembler Version 5.10                  5/17/24 09:43:46
CONDEV  FANCY CONSOLE DRIVER                                Symbols-5


EXITP  . . . . . . . . . . . . .  	F PROC	0165	CODE	Length = 0014
EXT16_FLAG . . . . . . . . . . .  	NUMBER	0010	
EXTKEY . . . . . . . . . . . . .  	L NEAR	0693	CODE
EXTKEY_1 . . . . . . . . . . . .  	L NEAR	069F	CODE
EXT_16 . . . . . . . . . . . . .  	L BYTE	01AE	CODE	Global
EXVEC  . . . . . . . . . . . . .  	L NEAR	04E0	CODE

FALSE  . . . . . . . . . . . . .  	NUMBER	0000	
FLUSH  . . . . . . . . . . . . .  	L NEAR	04F0	CODE
FLUSHDONE  . . . . . . . . . . .  	L NEAR	0510	CODE
FOUND  . . . . . . . . . . . . .  	NUMBER	0001	
FOURTEEN . . . . . . . . . . . .  	NUMBER	000E	
FUNC_CALL  . . . . . . . . . . .  	NUMBER	001B	

GENERIC_IOCTL  . . . . . . . . .  	L NEAR	0000	CODE	External
GET1 . . . . . . . . . . . . . .  	L NEAR	0817	CODE
GETPTR . . . . . . . . . . . . .  	L NEAR	0802	CODE
GET_FUNC . . . . . . . . . . . .  	NUMBER	007F	
GET_STATUS . . . . . . . . . . .  	NUMBER	0043	
GET_SUBFUNC  . . . . . . . . . .  	NUMBER	007F	
GET_SYS_ID . . . . . . . . . . .  	NUMBER	00C0	
GRAPHICS_FLAG  . . . . . . . . .  	V BYTE	0000	CODE	External
GRAPHICS_MODE  . . . . . . . . .  	NUMBER	0002	
GRMODE . . . . . . . . . . . . .  	L BYTE	006E	CODE

HDWR_FLAG  . . . . . . . . . . .  	L WORD	01B3	CODE	Global
HP . . . . . . . . . . . . . . .  	TEXT  DS:[SI]		

INAGN  . . . . . . . . . . . . .  	L NEAR	03C3	CODE
INIT_VID_MASK  . . . . . . . . .  	NUMBER	FFCF	
INQ  . . . . . . . . . . . . . .  	L BYTE	019E	CODE
INSTALLED  . . . . . . . . . . .  	NUMBER	00FF	
INSTALL_CHECK  . . . . . . . . .  	NUMBER	0000	
INT10_HI . . . . . . . . . . . .  	NUMBER	0042	
INT10_LOW  . . . . . . . . . . .  	NUMBER	0040	
INT2F_HI . . . . . . . . . . . .  	NUMBER	00BE	
INT2F_LOW  . . . . . . . . . . .  	NUMBER	00BC	
INTBASE  . . . . . . . . . . . .  	NUMBER	0080	
INTRET . . . . . . . . . . . . .  	L NEAR	0192	CODE
INTTAB . . . . . . . . . . . . .  	NUMBER	0020	
INT_ABORT  . . . . . . . . . . .  	ALIAS	 INTTAB		
INT_BIT  . . . . . . . . . . . .  	NUMBER	0020	
INT_COMMAND  . . . . . . . . . .  	NUMBER	0021	
INT_CTRL_C . . . . . . . . . . .  	NUMBER	0023	
INT_DISK_READ  . . . . . . . . .  	NUMBER	0025	
INT_DISK_WRITE . . . . . . . . .  	NUMBER	0026	
INT_FASTCON  . . . . . . . . . .  	NUMBER	0029	
INT_FATAL_ABORT  . . . . . . . .  	NUMBER	0024	
INT_IBM  . . . . . . . . . . . .  	NUMBER	002A	
INT_KEEP_PROCESS . . . . . . . .  	NUMBER	0027	
INT_SPOOLER  . . . . . . . . . .  	NUMBER	0028	
INT_TERMINATE  . . . . . . . . .  	NUMBER	0022	
INVALID_FLAGS  . . . . . . . . .  	NUMBER	FFFE	
INVALID_FUNC . . . . . . . . . .  	NUMBER	0001	
Microsoft (R) Macro Assembler Version 5.10                  5/17/24 09:43:46
CONDEV  FANCY CONSOLE DRIVER                                Symbols-6


INVALID_PARM . . . . . . . . . .  	NUMBER	000A	
IOCTL_2F . . . . . . . . . . . .  	NUMBER	0001	

KBD_FLAG_3 . . . . . . . . . . .  	NUMBER	0096	
KEY5 . . . . . . . . . . . . . .  	L NEAR	0428	CODE
KEY5A  . . . . . . . . . . . . .  	L NEAR	0418	CODE
KEY6 . . . . . . . . . . . . . .  	L NEAR	043C	CODE
KEYAS1 . . . . . . . . . . . . .  	L NEAR	07D8	CODE
KEYAS3 . . . . . . . . . . . . .  	L NEAR	07F7	CODE
KEYASN . . . . . . . . . . . . .  	L NEAR	07AB	CODE
KEYCNT . . . . . . . . . . . . .  	L BYTE	01A1	CODE
KEYLP  . . . . . . . . . . . . .  	L NEAR	0444	CODE
KEYPTR . . . . . . . . . . . . .  	L WORD	01A2	CODE
KEYRET . . . . . . . . . . . . .  	L NEAR	0427	CODE

L1 . . . . . . . . . . . . . . .  	L NEAR	00F7	CODE
L3 . . . . . . . . . . . . . . .  	L NEAR	0135	CODE
L4 . . . . . . . . . . . . . . .  	L NEAR	013A	CODE
LCD_ACTIVE . . . . . . . . . . .  	NUMBER	0001	
LCD_COLOR_MODE . . . . . . . . .  	NUMBER	0020	
LCD_MODEL  . . . . . . . . . . .  	NUMBER	00F9	
LCD_MONO_MODE  . . . . . . . . .  	NUMBER	0030	
LEFT_ASCIIZ  . . . . . . . . . .  	NUMBER	0010	
LF . . . . . . . . . . . . . . .  	L NEAR	02D7	CODE
LF2  . . . . . . . . . . . . . .  	L NEAR	02F7	CODE
LOAD_8X8 . . . . . . . . . . . .  	NUMBER	1112	

MATCH  . . . . . . . . . . . . .  	L NEAR	046B	CODE
MAXCOL . . . . . . . . . . . . .  	L BYTE	0199	CODE	Global
MAX_CMD  . . . . . . . . . . . .  	NUMBER	0014	
MAX_VIDEO_TAB_NUM  . . . . . . .  	NUMBER	000F		Global
MCGA_ACTIVE  . . . . . . . . . .  	NUMBER	0008	
MEDIA  . . . . . . . . . . . . .  	NUMBER	000D	
MOD30_COLOR  . . . . . . . . . .  	NUMBER	000C	
MOD30_MONO . . . . . . . . . . .  	NUMBER	000B	
MODE . . . . . . . . . . . . . .  	L BYTE	0198	CODE	Global
MODE13 . . . . . . . . . . . . .  	NUMBER	000D	
MODE15 . . . . . . . . . . . . .  	NUMBER	000F	
MODE19 . . . . . . . . . . . . .  	NUMBER	0013	
MODE7  . . . . . . . . . . . . .  	NUMBER	0007	
MONOCHROME . . . . . . . . . . .  	NUMBER	0001	
MONO_ACTIVE  . . . . . . . . . .  	NUMBER	0002	
MONO_ADDRESS . . . . . . . . . .  	NUMBER	B000	
MOVCUR . . . . . . . . . . . . .  	L NEAR	0626	CODE
MULTDOS  . . . . . . . . . . . .  	NUMBER	0012	
MULTIFS  . . . . . . . . . . . .  	NUMBER	0011	
MULTNET  . . . . . . . . . . . .  	NUMBER	0011	
MULTSHARE  . . . . . . . . . . .  	NUMBER	0010	
MULT_ANSI  . . . . . . . . . . .  	NUMBER	001A	
MYSCROLL . . . . . . . . . . . .  	L NEAR	032D	CODE

NAME_LEN . . . . . . . . . . . .  	NUMBER	0008	
NHD  . . . . . . . . . . . . . .  	TEXT  ES:[DI]		
NINE . . . . . . . . . . . . . .  	NUMBER	0009	
Microsoft (R) Macro Assembler Version 5.10                  5/17/24 09:43:46
CONDEV  FANCY CONSOLE DRIVER                                Symbols-7


NLSFUNC  . . . . . . . . . . . .  	NUMBER	0014	
NOT0FFFF . . . . . . . . . . . .  	L NEAR	0103	CODE
NOTFND . . . . . . . . . . . . .  	L NEAR	0469	CODE
NOT_AVAILABLE  . . . . . . . . .  	NUMBER	000C	
NOT_BW . . . . . . . . . . . . .  	L NEAR	0550	CODE
NOT_CY . . . . . . . . . . . . .  	NUMBER	FFFE	
NOT_FOUND  . . . . . . . . . . .  	NUMBER	0000	
NOT_SUPPORTED  . . . . . . . . .  	NUMBER	000A	
NO_OPERATION . . . . . . . . . .  	L NEAR	015C	CODE	Global
NUM_ROWS . . . . . . . . . . . .  	NUMBER	0084	
NUM_UNITS  . . . . . . . . . . .  		000D	

OFF  . . . . . . . . . . . . . .  	NUMBER	0000	
ON . . . . . . . . . . . . . . .  	NUMBER	0001	
ONE  . . . . . . . . . . . . . .  	NUMBER	0001	
OUTC . . . . . . . . . . . . . .  	L NEAR	0528	CODE
OUTCHR . . . . . . . . . . . . .  	L NEAR	02AE	CODE
OUTCHR1  . . . . . . . . . . . .  	L NEAR	02D2	CODE

PASS_CONTROL . . . . . . . . . .  	N PROC	0179	CODE	Length = 0012
PRCP . . . . . . . . . . . . . .  	L NEAR	06B8	CODE
PRMCNT . . . . . . . . . . . . .  	L BYTE	019F	CODE
PRMCNTW  . . . . . . . . . . . .  	L WORD	019F	CODE
PS2_COLOR  . . . . . . . . . . .  	NUMBER	0008	
PS2_MONO . . . . . . . . . . . .  	NUMBER	0007	
PSCP . . . . . . . . . . . . . .  	L NEAR	06AF	CODE
PTRSAV . . . . . . . . . . . . .  	L DWORD	00B1	CODE	Global

RC_EOL . . . . . . . . . . . . .  	NUMBER	-0001	
RC_NO_ERROR  . . . . . . . . . .  	NUMBER	0000	
RD1  . . . . . . . . . . . . . .  	L NEAR	0482	CODE
RD2  . . . . . . . . . . . . . .  	L NEAR	04B3	CODE
RDEXIT . . . . . . . . . . . . .  	L NEAR	04D9	CODE
REPORT . . . . . . . . . . . . .  	L BYTE	01A4	CODE
REQ_CRSR_POS . . . . . . . . . .  	NUMBER	0003	
REQ_TXT_LENGTH . . . . . . . . .  	V WORD	0000	CODE	External
REQ_VID_MODE . . . . . . . . . .  	NUMBER	000F	
RET5 . . . . . . . . . . . . . .  	L NEAR	029C	CODE
RM . . . . . . . . . . . . . . .  	L NEAR	076A	CODE
ROM_BIOS . . . . . . . . . . . .  	NUMBER	0040	
ROW  . . . . . . . . . . . . . .  	L BYTE	019B	CODE

S1 . . . . . . . . . . . . . . .  	L NEAR	0613	CODE
S1A  . . . . . . . . . . . . . .  	L NEAR	061F	CODE
S1B  . . . . . . . . . . . . . .  	L NEAR	061C	CODE
S2 . . . . . . . . . . . . . . .  	L NEAR	0581	CODE
S22  . . . . . . . . . . . . . .  	L NEAR	0588	CODE
S3 . . . . . . . . . . . . . . .  	L NEAR	0594	CODE
S3A  . . . . . . . . . . . . . .  	L NEAR	0598	CODE
S3B  . . . . . . . . . . . . . .  	L NEAR	059C	CODE
S3C  . . . . . . . . . . . . . .  	L NEAR	05A4	CODE
S3D  . . . . . . . . . . . . . .  	L NEAR	05BA	CODE
S3E  . . . . . . . . . . . . . .  	L NEAR	05CA	CODE
S3RET  . . . . . . . . . . . . .  	L NEAR	05D1	CODE
Microsoft (R) Macro Assembler Version 5.10                  5/17/24 09:43:46
CONDEV  FANCY CONSOLE DRIVER                                Symbols-8


S4 . . . . . . . . . . . . . . .  	L NEAR	05D2	CODE
S4A  . . . . . . . . . . . . . .  	L NEAR	05E1	CODE
S7 . . . . . . . . . . . . . . .  	L NEAR	05EC	CODE
S7A  . . . . . . . . . . . . . .  	L NEAR	05EF	CODE
S7B  . . . . . . . . . . . . . .  	L NEAR	05FB	CODE
S7C  . . . . . . . . . . . . . .  	L NEAR	0611	CODE
SAVCR  . . . . . . . . . . . . .  	L WORD	019C	CODE
SCAN . . . . . . . . . . . . . .  	L NEAR	0441	CODE
SCAN_LINES . . . . . . . . . . .  	L BYTE	01B2	CODE	Global
SCREEN_SEG . . . . . . . . . . .  	L WORD	027C	CODE
SCROLL . . . . . . . . . . . . .  	L NEAR	0317	CODE
SELECT_SCAN  . . . . . . . . . .  	NUMBER	0030	
SETCUR . . . . . . . . . . . . .  	L NEAR	062E	CODE
SETEXTKEY  . . . . . . . . . . .  	L NEAR	06A7	CODE
SETIT  . . . . . . . . . . . . .  	L NEAR	0306	CODE
SET_BLINK  . . . . . . . . . . .  	NUMBER	0001	
SET_BLOCK_0  . . . . . . . . . .  	NUMBER	1103	
SET_CURSOR_CALL  . . . . . . . .  	NUMBER	0001	
SET_FUNC . . . . . . . . . . . .  	NUMBER	005F	
SET_INTENSIFY  . . . . . . . . .  	NUMBER	0000	
SET_MODE . . . . . . . . . . . .  	NUMBER	0000	
SGR  . . . . . . . . . . . . . .  	L NEAR	06C1	CODE
SGR1 . . . . . . . . . . . . . .  	L NEAR	06CB	CODE
SGR2 . . . . . . . . . . . . . .  	L NEAR	06D1	CODE
SGR3 . . . . . . . . . . . . . .  	L NEAR	06EA	CODE
SKIP_VIDEO_OFF . . . . . . . . .  	L NEAR	038F	CODE
SKIP_VIDEO_ON  . . . . . . . . .  	L NEAR	03A5	CODE
SM . . . . . . . . . . . . . . .  	L NEAR	076E	CODE
SM1  . . . . . . . . . . . . . .  	L NEAR	0770	CODE
SRET . . . . . . . . . . . . . .  	L NEAR	0371	CODE
SSTRING  . . . . . . . . . . . .  	NUMBER	0003	
START  . . . . . . . . . . . . .  	NUMBER	0014	
STATE  . . . . . . . . . . . . .  	L 0002	0196	CODE
STATUS . . . . . . . . . . . . .  	NUMBER	0003		Global
STRATEGY . . . . . . . . . . . .  	L NEAR	00C1	CODE
STRATP . . . . . . . . . . . . .  	F PROC	00C1	CODE	Length = 000B
SUB_SIZE . . . . . . . . . . . .  	NUMBER	000B	
Switch_K . . . . . . . . . . . .  	L BYTE	01B1	CODE	Global
Switch_L . . . . . . . . . . . .  	L BYTE	01B0	CODE	Global
SWITCH_X . . . . . . . . . . . .  	L BYTE	01AF	CODE	Global

TEXT_MODE  . . . . . . . . . . .  	NUMBER	0001	
THREE  . . . . . . . . . . . . .  	NUMBER	0003	
TOROM  . . . . . . . . . . . . .  	L NEAR	0291	CODE
TRANS  . . . . . . . . . . . . .  	NUMBER	000E		Global
TRUE . . . . . . . . . . . . . .  	NUMBER	FFFF	
TRYBACK  . . . . . . . . . . . .  	L NEAR	029D	CODE
TRYLF  . . . . . . . . . . . . .  	L NEAR	0289	CODE
TURN_OFF . . . . . . . . . . . .  	NUMBER	00FE	
TURN_ON  . . . . . . . . . . . .  	NUMBER	FF01	

UNIT . . . . . . . . . . . . . .  	NUMBER	0001	
UNKNOWN_CMD  . . . . . . . . . .  	NUMBER	8103	
UNLIMITED  . . . . . . . . . . .  	NUMBER	0000	
Microsoft (R) Macro Assembler Version 5.10                  5/17/24 09:43:46
CONDEV  FANCY CONSOLE DRIVER                                Symbols-9


UNOCCUPIED . . . . . . . . . . .  	NUMBER	-0001	

VGA_ACTIVE . . . . . . . . . . .  	NUMBER	0080	
VIDEO  . . . . . . . . . . . . .  	L NEAR	057C	CODE
VIDEO_MASK . . . . . . . . . . .  	NUMBER	007F	
VIDEO_MODE_TABLE . . . . . . . .  	L BYTE	01B5	CODE	Global
VIDEO_TABLE_MAX  . . . . . . . .  	NEAR	0278	CODE	Global

WAIT2  . . . . . . . . . . . . .  	L NEAR	0384	CODE
WRAP . . . . . . . . . . . . . .  	L BYTE	0193	CODE

X1 . . . . . . . . . . . . . . .  	L NEAR	0120	CODE
X2 . . . . . . . . . . . . . . .  	L NEAR	012E	CODE

$L1  . . . . . . . . . . . . . .  	L NEAR	02F7	CODE
$L12 . . . . . . . . . . . . . .  	L NEAR	03F9	CODE
$L13 . . . . . . . . . . . . . .  	L NEAR	03F4	CODE
$L15 . . . . . . . . . . . . . .  	L NEAR	03E1	CODE
$L2  . . . . . . . . . . . . . .  	L NEAR	02F3	CODE
$L22 . . . . . . . . . . . . . .  	L NEAR	0410	CODE
$L24 . . . . . . . . . . . . . .  	L NEAR	040E	CODE
$L25 . . . . . . . . . . . . . .  	L NEAR	0463	CODE
$L26 . . . . . . . . . . . . . .  	L NEAR	0460	CODE
$L27 . . . . . . . . . . . . . .  	L NEAR	045B	CODE
$L29 . . . . . . . . . . . . . .  	L NEAR	048E	CODE
$L32 . . . . . . . . . . . . . .  	L NEAR	04B1	CODE
$L33 . . . . . . . . . . . . . .  	L NEAR	04AF	CODE
$L39 . . . . . . . . . . . . . .  	L NEAR	04CB	CODE
$L42 . . . . . . . . . . . . . .  	L NEAR	04FC	CODE
$L45 . . . . . . . . . . . . . .  	L NEAR	050C	CODE
$L48 . . . . . . . . . . . . . .  	L NEAR	064A	CODE
$L49 . . . . . . . . . . . . . .  	L NEAR	0646	CODE
$L5  . . . . . . . . . . . . . .  	L NEAR	0328	CODE
$L52 . . . . . . . . . . . . . .  	L NEAR	068F	CODE
$L53 . . . . . . . . . . . . . .  	L NEAR	068B	CODE
$L56 . . . . . . . . . . . . . .  	L NEAR	0713	CODE
$L57 . . . . . . . . . . . . . .  	L NEAR	070F	CODE
$L60 . . . . . . . . . . . . . .  	L NEAR	0726	CODE
$L61 . . . . . . . . . . . . . .  	L NEAR	0722	CODE
$L64 . . . . . . . . . . . . . .  	L NEAR	07A9	CODE
$L65 . . . . . . . . . . . . . .  	L NEAR	07A1	CODE
$L66 . . . . . . . . . . . . . .  	L NEAR	077E	CODE
$L67 . . . . . . . . . . . . . .  	L NEAR	079B	CODE
$L7  . . . . . . . . . . . . . .  	L NEAR	0325	CODE
$L74 . . . . . . . . . . . . . .  	L NEAR	0826	CODE
$L8  . . . . . . . . . . . . . .  	L NEAR	034D	CODE
$L9  . . . . . . . . . . . . . .  	L NEAR	034A	CODE
$LL1 . . . . . . . . . . . . . .  	NUMBER	0001	
$LL12  . . . . . . . . . . . . .  	NUMBER	000C	
$LL15  . . . . . . . . . . . . .  	NUMBER	000F	
$LL22  . . . . . . . . . . . . .  	NUMBER	0016	
$LL25  . . . . . . . . . . . . .  	NUMBER	0019	
$LL29  . . . . . . . . . . . . .  	NUMBER	001D	
$LL32  . . . . . . . . . . . . .  	NUMBER	0020	
Microsoft (R) Macro Assembler Version 5.10                  5/17/24 09:43:46
CONDEV  FANCY CONSOLE DRIVER                                Symbols-10


$LL39  . . . . . . . . . . . . .  	NUMBER	0027	
$LL42  . . . . . . . . . . . . .  	NUMBER	002A	
$LL45  . . . . . . . . . . . . .  	NUMBER	002D	
$LL48  . . . . . . . . . . . . .  	NUMBER	0030	
$LL5 . . . . . . . . . . . . . .  	NUMBER	0005	
$LL52  . . . . . . . . . . . . .  	NUMBER	0034	
$LL56  . . . . . . . . . . . . .  	NUMBER	0038	
$LL60  . . . . . . . . . . . . .  	NUMBER	003C	
$LL64  . . . . . . . . . . . . .  	NUMBER	0040	
$LL67  . . . . . . . . . . . . .  	NUMBER	0043	
$LL74  . . . . . . . . . . . . .  	NUMBER	004A	
$LL8 . . . . . . . . . . . . . .  	NUMBER	0008	
@CPU . . . . . . . . . . . . . .  	TEXT  0101h		
@FILENAME  . . . . . . . . . . .  	TEXT  ansi		
@VERSION . . . . . . . . . . . .  	TEXT  510		


   2439 Source  Lines
  14035 Total   Lines
    621 Symbols

  45988 + 159812 Bytes symbol space free

      0 Warning Errors
      0 Severe  Errors
