Microsoft (R) Macro Assembler Version 5.10                  5/17/24 09:44:02
DOS - Code Page Switching - Printer Device Driver           Page     1-1


				PAGE	,132
				TITLE	DOS - Code Page Switching - Printer Device Driver
				;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
				;;
				;;  FILENAME:		CPS Printer Device Driver Main Code
				;;  MODULE NAME:
				;;  TYPE:		Assemble file  (resident code)
				;;  LINK PROCEDURE:	Link CPSPMnn+CPSFONT+CPSPInn into .EXE format. CPSPM01
				;;			must be first.	CPSPInn must be last.  Everything
				;;			before CPSPInn will be resident.
				;;  INCLUDE FILES:
				;;			CPSPEQU.INC
				;;
				;;
				;;  This routine is structured as a DOS Device Driver.
				;;  IE it is installed via the CONFIG.SYS command:
				;;
				;;  The following device commands are supported:
				;;
				;;  0 - INIT
				;;  --------
				;;
				;;  8 - OUTPUT
				;;  9 - OUTPUT
				;;  --------
				;;  Supported in between Designate-start and the Designate_end commands.
				;;
				;;
				;;  12 - IOCTL OUTPUT
				;;  -----------------
				;;  CPS Function request :  Major function =	05	-- printer device
				;;			    Minor functions =	4CH	-- designate start
				;;						4DH	-- designate end
				;;						4AH	-- invoke
				;;						6AH	-- query-invoked
				;;						6BH	-- query-list
				;;
				;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
				;*Modification history ********************************************************
				;AN001; p2685  Long delay on CHCP before failure message	   12/10/87 J.K.
				;******************************************************************************
									;;
				INCLUDE CPSPEQU.INC			;;
			     C	
			     C		PAGE	,132
			     C	
			     C	;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
			     C	;;
			     C	;;  FILENAME:	  CPS Printer Device Driver EQUAL Include
			     C	;;  MODULE NAME:  CPSEQU
			     C	;;  TYPE:	  Include File
			     C	;;
			     C	;;  LINK PROCEDURE:  See CPSPx.ASM
			     C	;;
Microsoft (R) Macro Assembler Version 5.10                  5/17/24 09:44:02
DOS - Code Page Switching - Printer Device Driver           Page     1-2


			     C	;;  INCLUDE FILES:
			     C	;;
			     C	;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
			     C						;;
			     C	;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
			     C	;;
			     C	;;	Request Header (Common portion)
			     C	;;
			     C	;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
			     C						;;
 = ES:[DI]                   C	RH	EQU	ES:[DI] 		;; addressability to Request Header
			     C						;;
			     C	RHC	STRUC				;; fields common to all request types
 0000  00                    C	RHC_LEN DB	?			;; length of Request Header
 0001  00                    C		DB	?			;; unit code (subunit)
 0002  00                    C	RHC_CMD DB	?			;; command code
 0003  0000                  C	RHC_STA DW	?			;; status
 0005  0000000000000000      C		DQ	?			;; reserved for DOS
 000D                        C	RHC	ENDS				;; end of common portion
			     C						;;
			     C						;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
			     C						;;
			     C						;; Command in the Request Header
			     C						;; (see CMD_CODES table)
			     C						;;
			     C						;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
			     C						;;
 = 0000                      C	CMD_INI EQU	0			;; init  command
 = 0008                      C	CMD_WRT EQU	8			;; write command
 = 0013                      C	CMD_GIO EQU	19			;; generic IOCTL command
			     C						;; (see major/minor GIO functions)
			     C						;;
			     C						;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
			     C						;;
			     C						;; status values for RHC_STA
			     C						;;
			     C						;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
			     C						;;
 = 0001                      C	STAT_DONE EQU	01H			;; function complete - high order byte
 = 8003                      C	STAT_CMDERR EQU 8003H			;; invalid command code error
 = 8000                      C	STAT_ERROR EQU	8000H			;; error returned by normal driver
			     C						;;
			     C	;; see Generic IOCTL Request Header section
			     C	;; for more errorneous status.		;;
			     C						;;
			     C	;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
			     C	;;
			     C	;;	Request Header for INIT
			     C	;;
			     C	;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
			     C						;;
			     C						;;
			     C	RH0	STRUC				;;
 0000  000D[                 C		DB	(TYPE RHC) DUP (?)	;; common portion
Microsoft (R) Macro Assembler Version 5.10                  5/17/24 09:44:02
DOS - Code Page Switching - Printer Device Driver           Page     1-3


	   ??                C	
			 ]   C	
			     C	
			     C						;;
 000D  00                    C		DB	?			;; not used for CHAR devices
 000E  0000                  C	RH0_ENDO DW	?			;; offset  of ending address
 0010  0000                  C	RH0_ENDS DW	?			;; segment of ending address
 0012  00000000              C	RH0_BPBA DD	?			;; pointer to BPBA
 0016  00                    C		db	?
 0017  0000                  C	RH0_CONFIG_ERRMSG dw 0			;DCR D493 "Error in CONFIG.SYS..." msg flag.
 0019                        C	RH0	ENDS				;;
			     C						;;
			     C	;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
			     C	;;
			     C	;;	Request Header for IOCTL
			     C	;;
			     C	;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
			     C						;;
			     C	RH3	STRUC				;;
 0000  000D[                 C		DB	(TYPE RHC) DUP (?)	;; common portion
	   ??                C	
			 ]   C	
			     C	
			     C						;;
			     C						;;
 000D  00                    C		DB	?			;; media descriptor
 000E  0000                  C	RH3_DTAO DW	?			;; offset  of transfer address
 0010  0000                  C	RH3_DTAS DW	?			;; segment of transfer address
 0012  0000                  C	RH3_CNT DW	?			;; byte count
 0014                        C	RH3	ENDS				;;
			     C						;;
			     C						;;
			     C	;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
			     C	;;
			     C	;;	Request Header for GENERIC IOCTL
			     C	;;
			     C	;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
			     C						;;
			     C	GIH	STRUC				;;
 0000  000D[                 C		DB	(TYPE RHC) DUP (?)	;; common portion
	   ??                C	
			 ]   C	
			     C	
			     C						;;
			     C						;;
 000D  00                    C	GIH_MAF DB	?			;; major function
 000E  00                    C	GIH_MIF DB	?			;; minor function
 000F  0000                  C	GIH_SI	DW	?			;; content of SI
 0011  0000                  C	GIH_DI	DW	?			;; content of DI
 0013  00000000              C	GIH_GBA DD	?			;; Address of Generic Buffer
 0017                        C	GIH	ENDS				;;
			     C						;;
			     C						;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
			     C						;;
Microsoft (R) Macro Assembler Version 5.10                  5/17/24 09:44:02
DOS - Code Page Switching - Printer Device Driver           Page     1-4


			     C						;; GIO major/minor functions
			     C						;; (see GIO_CODES table)
			     C						;;
			     C						;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 = 0003                      C	MAF_CON EQU	03			;; major function for CON  device
 = 0005                      C	MAF_PTR EQU	05			;; major function for LPTX device
			     C						;;
 = 004C                      C	MIF_DST EQU	4CH			;; minor function : designate start
 = 004D                      C	MIF_DEN EQU	4DH			;;		    designate end
 = 004A                      C	MIF_IVK EQU	4AH			;;		    invoke
 = 006A                      C	MIF_QIV EQU	6AH			;;		    query-invoked
 = 006B                      C	MIF_QLS EQU	6BH			;;		    query-list
			     C						;;
			     C						;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
			     C						;; Designate Start (MIF_DST)Flags
			     C						;; see GBIS structure
			     C						;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
			     C						;;
 = 8000                      C	DSF_FIFOCP EQU	08000H			;; Single code page FIFO command
 = 0001                      C	DSF_CARTCP EQU	00001H			;; Code page for Cartridge/semi-
			     C						;; hardware RAM
			     C						;;
			     C						;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
			     C						;; Generic IOCTL errorneous status
			     C						;; upon return
			     C						;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
			     C						;;
 = 8000                      C	STAT_DELETE EQU 08000H			;; previous degignate deleted (DST)
			     C						;; STAT_DELETE : only for FIFO
 = 8008                      C	STAT_NOFIND EQU 08008H			;; codepage,device not found  (DST)
 = 800A                      C	STAT_DEVERR EQU 0800AH			;; Device error (DST,IVK,QIV,QLS,WRT)
 = 800C                      C	STAT_BADATA EQU 0800CH			;; bad font file (DST)
 = 800C                      C	STAT_NOBUFF EQU 0800CH			;; no font buffer for (REFRESH)
 = 800C                      C	STAT_BADDEN EQU 0800CH			;; no DST (DEN)
 = 8000                      C	STAT_bffDEN EQU 08000H			;; bad font file (DEN)
 = 800A                      C	STAT_TOMANY EQU 0800aH			;; too manay codepages (DST)
 = 800A                      C	STAT_DUPLCP EQU 0800aH			;; too manay codepages (DST)
 = 8007                      C	STAT_NOCPIV EQU 08007H			;; no codepage designated/invoked
 = 8007                      C	STAT_NOCP EQU	08007H			;; no codepage designated/invoked
			     C						;; (IVK, QIV, QLS)
			     C						;;
			     C	;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
			     C	;;
			     C	;;	Generic IOCTL Buffer   DS:[SI]
			     C	;;
			     C	;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 = DS:[SI]                   C	GIOB	EQU	DS:[SI] 		;;
			     C						;;
			     C	GB1S	STRUC				;;
 0000  0000                  C	GB1_FLAG DW	?			;; flag
 0002  0000                  C	GB1_LEN DW	?			;; length
 0004  0000                  C	GB1_NUM DW	?			;; length
 0006  0000                  C	GB1_CP	DW	?			;;
 0008                        C	GB1S	ENDS				;;
Microsoft (R) Macro Assembler Version 5.10                  5/17/24 09:44:02
DOS - Code Page Switching - Printer Device Driver           Page     1-5


			     C						;;
			     C						;;
			     C	GB2S	STRUC				;;
 0000  0000                  C	GB2_LEN DW	?			;; length
 0002  0000                  C	GB2_CP	DW	?			;;
 0004                        C	GB2S	ENDS				;;
			     C						;;
			     C						;;
			     C	GB3S	STRUC				;;
 0000  0000                  C	GB3_LEN DW	?			;; length
 0002  0000                  C	GB3_GBL DW	?			;; hardware code page number
 0004                        C	GB3S	ENDS				;;
			     C						;;
 = 0004                      C	GB3_MINILEN EQU 4			;; minimium length of GB3
			     C						;;
			     C	GBLS	STRUC				;;
 0000  0000                  C	GBL_LEN DW	?			;; length
 0002  0000                  C	GBL_CP	DW	?			;; hardware code page number
 0004                        C	GBLS	ENDS				;;
			     C						;;
			     C	;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
			     C	;;
			     C	;;	DEVICE	Header	   DS:[SI]	-- to locate the next LPTn header
			     C	;;	NEXT device header ES:[DI]
			     C	;;
			     C	;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 = DS:[SI]                   C	HP	EQU	DS:[SI] 		;;
 = ES:[DI]                   C	NHD	EQU	ES:[DI] 		;;
			     C						;;
 = 0008                      C	NAME_LEN EQU	8			;;
			     C						;;
			     C	DHS	STRUC				;;
 0000  0000                  C	DH_NEXTO DW	?			;; offset of pointer to next header
 0002  0000                  C	DH_NEXTS DW	?			;; segment of pointer to next header
 0004  0000                  C		DW	?			;; attribute
 0006  0000                  C	DH_STRAO DW	?			;; offset to strategy routine
 0008  0000                  C	DH_INTRO DW	?			;; offset to interrupt routine
 000A  0008[                 C	DH_NAME DB	NAME_LEN DUP(0) 	;; device name in this header
	   00                C	
			 ]   C	
			     C	
 0012                        C	DHS	ENDS				;; end of common portion
			     C						;;
			     C	;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
			     C	;;
			     C	;;	FONT_PARSER data
			     C	;;
			     C	;;	-- Interface table : FTABLE
			     C	;;
			     C	;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
			     C						;;
 = DS:[SI]                   C	FPKT	EQU	DS:[SI] 		;;
			     C						;;
 = ES:[BX]                   C	FTP	EQU	ES:[BX] 		;;
Microsoft (R) Macro Assembler Version 5.10                  5/17/24 09:44:02
DOS - Code Page Switching - Printer Device Driver           Page     1-6


			     C						;; ( I=Input  O=Output )
			     C	FTBLK	STRUC				;;
 0000  002A                  C	FTB_LENGTH DW	TYPE FTBLK		;; (NOT TO BE CHANGED)
 0002  FFFF                  C	FTB_STATUS DW	0FFFFH			;; (O) parsing compelte
 0004  0000                  C	FTB_TYPE DW	0			;; (O)
 0006  0008[                 C	FTB_TID DB	8   DUP(?)		;; (I)
	   ??                C	
			 ]   C	
			     C	
 000E  FFFF                  C	FTB_CP	DW	0FFFFH			;; (I)
 0010  0000                  C	FTB_MOD DW	0			;; (O)
 0012  0000                  C	FTB_FONTS DW	0			;; (O)
 0014  00                    C	FTB_ROWS  DB	0			;; (O) DISPLAY TYPE DEVICE
 0015  00                    C	FTB_COLS  DB	0			;; (O) DISPLAY TYPE DEVICE
 0016  00                    C	FTB_X	  DB	0			;; (O) DISPLAY TYPE DEVICE
 0017  00                    C	FTB_Y	  DB	0			;; (O) DISPLAY TYPE DEVICE
 0018  0000                  C	FTB_COUNT DW	0			;; (O) DISPLAY TYPE DEVICE
 001A  0000                  C	FTB_SELECT DW	0			;; (O) PRINTER TYPE DEVICE
 001C  0000                  C	FTB_SELLEN DW	0			;; (O) PRINTER TYPE DEVICE
 001E  0000                  C	FTB_DLEFT DW	0			;; (O)	=0, none to come
 0020  0000                  C	FTB_DLEN DW	0			;; (O)	=0, not in this packet
 0022  0000                  C	FTB_DALO DW	0			;; (O)	in the DOS "packet" buffer
 0024  0000                  C	FTB_DAHI DW	0			;; (O)	"  "   "    "       "
 0026  0000                  C	TARGET_LO DW	0			;;  internal registers
 0028  0000                  C	TARGET_HI DW	0			;;  internal registers
 002A                        C	FTBLK	ENDS				;;
			     C						;;
 = 0001                      C	TYPE_DISPLAY EQU 01H			;; display type device
 = 0002                      C	TYPE_PRINTER EQU 02H			;; printer type device
			     C						;;
			     C	FBUFS	STRUC				;;
 0000  0000                  C	FLAG	DW	0			;;
 0002  0000                  C	BUFFER_LEN DW	0			;;
 0004  00000000              C	BUFFER_ADDR DD	0			;;
 0008  0000                  C	NUM_FTBLK DW	0			;; no. of FTBKL entries
 000A                        C	FBUFS	ENDS				;;
			     C						;;
			     C						;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
			     C						;; FLAGS :
 = 0001                      C	FLAG_RESTART EQU 000001H		;; bit 1 = restart the parsing
			     C						;;
			     C						;;
			     C						;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
			     C						;; STATUS : (in FTB_STATUS)
			     C						;;
 = FFFF                      C	FSTAT_COMPLETE EQU 0FFFFH		;; parsing compeleted. (good status)
 = FFFE                      C	FSTAT_FONT  EQU 0FFFEH			;; font data is defined and returned
 = FFFD                      C	FSTAT_FOUND EQU 0FFFDH			;; informations including font-length
 = FFFC                      C	FSTAT_MATCH EQU 0FFFCH			;; font header matches	FTBLK
 = FFFB                      C	FSTAT_SEARCH EQU 0FFFBH 		;; seraching for header & font
 = FFF0                      C	FSTAT_BOTTOM EQU 0FFF0H 		;; below this are the DOS_STATUS.
			     C						;;
			     C	;; the FSTAT with value lower than 0FFF0H is to be returned to the DOS
			     C						;;
Microsoft (R) Macro Assembler Version 5.10                  5/17/24 09:44:02
DOS - Code Page Switching - Printer Device Driver           Page     1-7


			     C	;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
			     C	;
			     C	;	DEVICE Command Parser Table   ES:[DI]
			     C	;
			     C	;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
			     C						;;
 = 0122                      C	table_len	equ	290		;;
			     C						;;
 = ES:[DI]                   C	PSE	EQU	ES:[DI] 		;;
			     C						;;
			     C	PAR_OT	STRUC				;;
 0000  0000                  C	PAR_DEV_NUM DW	?			;;
 0002  0000                  C	PAR_OFF DW	?			;;
 0004                        C	PAR_OT	ENDS				;;
			     C						;;
			     C	PAR_DEVOT STRUC 			;; OFFSET to the parameters of a device
 0000  0000                  C	PAR_onum DW	?			;; number of offsets in the table
 0002  0000                  C	PAR_DNMO DW	?			;; device-name table offset
 0004  0000                  C	PAR_DIDO DW	?			;; device-id table offset
 0006  0000                  C	PAR_HWCPO DW	?			;; hwcp table offset
 0008  0000                  C	PAR_DESGO DW	?			;; designate table offset
 000A  0000                  C	PAR_PARMO DW	?			;; parameter table offset
 000C                        C	PAR_DEVOT ENDS				;;
			     C						;;
			     C	PAR_DNMT STRUC				;; DEVICE NAME table
 0000  0000                  C	PAR_DNML DW	?			;; length of device name
 0002  00                    C	PAR_DNM DB	?			;; device name
 0003                        C	PAR_DNMT ENDS				;;
			     C						;;
			     C	PAR_DIDT STRUC				;; DEVICE ID table
 0000  0000                  C	PAR_DIDL DW	?			;; device ID length
 0002  00                    C	PAR_DID DB	?			;; device ID
 0003                        C	PAR_DIDT ENDS				;;
			     C						;;
			     C	PAR_HWCPT STRUC 			;; hwcp table
 0000  0000                  C	PAR_HWCPL DW	?			;; hwcp entry number
 0002  0000                  C	PAR_HWCP DW	?			;; hwcp
 0004                        C	PAR_HWCPT ENDS				;;
			     C						;;
			     C						;;
			     C	PAR_DESGT STRUC 			;; DESIGNATE table
 0000  0000                  C	PAR_DESGL DW	?			;; entry number
 0002  0000                  C	PAR_DESG DW	?			;; designate
 0004  0000                  C	PAR_FONT DW	?			;; fonts
 0006                        C	PAR_DESGT ENDS				;;
			     C						;;
			     C						;;
			     C	PAR_PARMT STRUC 			;; parameter table
 0000  0000                  C	PAR_PARML DW	?			;; length
 0002  0000                  C	PAR_PARM DW	?			;;
 0004                        C	PAR_PARMT ENDS				;;
			     C						;;
			     C						;;
			     C	;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Microsoft (R) Macro Assembler Version 5.10                  5/17/24 09:44:02
DOS - Code Page Switching - Printer Device Driver           Page     1-8


			     C	;
			     C	; LPTn	printer data structure	CS:[BX]
			     C	;
			     C	;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
			     C						;;
 = CS:[BX]                   C	BUF	EQU	CS:[BX] 		;;
			     C						;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
			     C						;; STATES
			     C						;;
 = 0000                      C	NORMAL	EQU	0			;; normal state
 = 0001                      C	CPSW	EQU	1			;;
 = 0002                      C	DESG_WR EQU	2			;; designate write
 = 0003                      C	DESG_END EQU	3			;; designate end
 = 0004                      C	LOCKED	 EQU	4			;; WGR locked
			     C						;;
			     C						;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 = 0000                      C	GOOD	EQU	0			;; STATUS :
 = 8000                      C	REPLX	EQU	8000H			;; codepage replaced in DST
 = 4000                      C	FAIL	EQU	4000H			;; fail in designate
 = 2000                      C	LOADED	EQU	2000H			;; the font has just been loaded to
 = 0800                      C	REFRESH EQU	0800H			;; there was a refresh via DST
			     C						;;
			     C						;; also
			     C						;; -- DSF_CARTCP
			     C						;;
			     C						;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
			     C						;;
			     C						;; for BFLAG :
 = 0000                      C	BF_PRN	EQU	0			;;  0 = PRN  initialized (interrupt)
 = 0001                      C	BF_LPT1 EQU	1			;;  1 = LPT1 initialized (interrupt)
 = 0002                      C	BF_LPT2 EQU	2			;;  2 = LPT2 initialized (interrupt)
 = 0003                      C	BF_LPT3 EQU	3			;;  3 = LPT3 initialized (interrupt)
 = 8000                      C	BF_MEM_DONE  EQU 08000H 		;;  memory done for this device
			     C						;;
			     C						;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
			     C						;; BUFFER DATA structure
			     C	BUF_DATA STRUC				;;.................................
 0000  FFFF                  C	BFLAG	 DW	-1			;; buf flag for initialisation
			     C						;; -1 = buf not yet initialised
			     C						;; (see BF_PRN, BF_LPT's)
			     C						;;
 0002  FFFF                  C	DEV_HDRO DW	-1			;; device driver n header offset
 0004  FFFF                  C	DEV_HDRS DW	-1			;;
 0006  FFFF                  C	LPT_STRAO DW	-1			;; dos lptn strategy offset
 0008  FFFF                  C	LPT_STRAS DW	-1			;;
 000A  FFFF                  C	LPT_INTRO DW	-1			;; dos lptn strategy offset
 000C  FFFF                  C	LPT_INTRS DW	-1			;;
 000E  FFFF                  C	RH_PTRO DW	-1			;; request header offset
 0010  FFFF                  C	RH_PTRS DW	-1			;; segment ....................(unique)
			     C						;;
			     C						;; (following is replicated for LPT1 )
			     C						;;
 0012  FFFF                  C	RNORMO	DW	-1			;; request-normal driver header offset
 0014  FFFF                  C	prn_bufo dw	-1			;; offset to prn buffer
Microsoft (R) Macro Assembler Version 5.10                  5/17/24 09:44:02
DOS - Code Page Switching - Printer Device Driver           Page     1-9


 0016  0000                  C	did_prn  dw	 0			;; where PRN is in the DID order
 0018  0000                  C	PCLASS	 DW	 0			;;
 001A  0000                  C	STATE	DW	NORMAL			;;
 001C  0000                  C	STATUS	DW	GOOD			;;
			     C						;; (the followings should be used
			     C						;;  IFF BUT.STATE <> NORMAL : )
			     C						;;
 001E  FFFF                  C	PDESCO	DW	-1			;; offset to printer description table.
			     C						;;
			     C						;;===== hwcp and designated slots ====
 0020  0000                  C	HSLMX	DW	0			;; HSLMX is the size of HARDslot (at
			     C						;; HARDSO) and the buffer(at HRBUFO)
			     C						;;
 0022  0000                  C	HARDMX	DW	0			;; no. of HWCP+cart slots supported
			     C						;; (less than or equal to .HSLOTS)
 0024  FFFF                  C	HARDSO	DW	-1			;; offset to hardware slots n
			     C						;;
 0026  0000                  C	HCARMX	DW	0			;; no. of cart slots supported
 0028  FFFF                  C	HRBUFO	DW	-1			;; offset to cart slots' buffer
			     C						;;
			     C						;;===== physical and designated RAM ===
			     C						;;
 002A  0000                  C	RSLMX	DW	0			;; RSLMX is the size of RAMslot (at
			     C						;; RAMSO) and the RAM buffer(at RMBUFO)
			     C						;;
			     C						;;
 002C  0000                  C	RAMMX	DW	0			;; no. of physical RAM slots(max.=1)
 002E  FFFF                  C	RAMSO	DW	-1			;; offset to RAM slots(incl. designated
			     C						;;
 0030  0000                  C	RBUFMX	DW	0			;; no. of designated RAM slots supported
 0032  FFFF                  C	RMBUFO	DW	-1			;; offset to RAM slots's buffer
			     C						;;
 0034  FFFF                  C	FTSZPA	DW	-1			;; font buffer in paragraph = FONTSZ
 0036  0000                  C	FTSIZE	DW	0			;; font buffer size = FTSZPA x 16
 0038  FFFF                  C	FTSTART DW	-1			;; start of font buffer
 003A  FFFF                  C	FTSLOTO DW	-1			;; segment address of font buffer
			     C						;; -- of the one to be designated to
 003C  FFFF                  C	FTDLO	DW	-1			;; offset to where the FTSTART:OFFSET
			     C						;; (next destination = total length
			     C						;;		       so far)
 003E  0000                  C	FSELEN	DW	0			;; length of selection control copied
			     C						;; to the selection buffer
			     C						;; (USED BY SELECT TYPE = 1 ONLY)
			     C						;; -- initialized to 0, if selection
			     C						;;    is not 0, copied the selection
			     C						;;    from the font file until the
			     C						;;    length is reached. After copying
			     C						;;    to selection buffer, reset to 0
 0040  0000                  C	FSELMAX DW	0			;; max. room reserved for selection
			     C						;; controls.
			     C						;;
 0042  000C[                 C	PAR_EXTRACTO DB (TYPE PAR_DEVOT) DUP (-1);; Offset to parameter extracts
	   FF                C	
			 ]   C	
Microsoft (R) Macro Assembler Version 5.10                  5/17/24 09:44:02
DOS - Code Page Switching - Printer Device Driver           Page     1-10


			     C	
 004E  FFFF                  C	SAVED_CP    DW	-1			;; WGR saved code page during lock	    ;AN000;
 0050  0000                  C	BUFEND	DW	0			;; END OF BUFFER, for LPT1 copy.
 0052                        C	BUF_DATA ENDS				;;
			     C						;;
			     C	;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
			     C	;
			     C	;	Printer Description Table
			     C	;
			     C	;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
			     C						;;
 = 0008                      C	DEVN_LEN EQU	8			;; device name (type-id) length
			     C						;;
			     C	PDSH	STRUC				;;
 0000  001E                  C	PD_LEN	DW	30			;; length of each entry
 0002  20 20 20 20 20 20     C	TYPEID	DB	'        '              ;; device name (id), length DEVN_LEN
       20 20                 C	
 000A  00                    C	VMINOR	DB	0			;; version :  .00
 000B  01                    C	VMAJOR	DB	1			;; version : 1.
 000C  0000                  C	CLASS	DW	?			;; reserved
 000E  0000                  C	FONTSZ	DW	?			;; font buffer size in paragraph (max)
 0010  0000                  C	HSLOTS	DW	?			;; hard-slots number (max # of Hslots)
 0012  0000                  C	HWCPMIN DW	?			;; what left by min_hwcp can be cart.
 0014  0000                  C	RSLOTS	DW	?			;; ram-slots number  (max # of Rslots)
 0016                        C	PDSH	ENDS				;; the SELH_O, and SELR_O are defined
			     C						;; in the next two entries in PDS
			     C						;;
			     C						;;
			     C	PDS	STRUC				;;
 0000  0016[                 C		DB	(TYPE PDSH) DUP (?)	;; common portion
	   ??                C	
			 ]   C	
			     C	
 0016  0000                  C	SELH_O	DW	?			;; offset to select controls on Hslots
 0018  0000                  C	SELR_O	DW	?			;; offset to select controls on Rslots
 001A  0000                  C	SELB_O	DW	?			;; offset to buffered select controls
 001C                        C	PDS	ENDS				;;
			     C						;;
			     C						;;
			     C	;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
			     C	;
			     C	;	HARD / RAM slots table structure/constants
			     C	;
			     C	;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
			     C						;; NOTE : must be only FOUR bytes for
			     C						;;	  codepage positioning
			     C						;;	  calculation as compared
			     C						;;	  with each entry in FTDL_OFF
			     C						;;
			     C	SLTS	STRUC				;; slots-table structure
 0000  FFFF                  C	SLT_CP	DW	-1			;; code page : no code page
 0002  0000                  C	SLT_AT	DW	0			;; attribute : empty
 0004                        C	SLTS	ENDS				;;
			     C						;;
Microsoft (R) Macro Assembler Version 5.10                  5/17/24 09:44:02
DOS - Code Page Switching - Printer Device Driver           Page     1-11


			     C						;; ATTRIBUTES :
 = 0001                      C	AT_RAM1 EQU	 00001H 		;; in the 1st physical RAM slot
 = 0002                      C	AT_RAM2 EQU	 00002H 		;; in the 2nd physical RAM slot
 = 0004                      C	AT_RAM3 EQU	 00004H 		;; in the 3rd physical RAM slot
 = 0008                      C	AT_RAM4 EQU	 00008H 		;; in the 4th physical RAM slot
 = 000F                      C	AT_RAMS EQU	 0000FH 		;;(note the current logic supports
			     C						;; only ONE physical RAM slot)
			     C						;;
 = 1000                      C	AT_OCC	EQU	 01000H 		;; slot occupied
 = 2000                      C	AT_ACT	EQU	 02000H 		;; slot active
 = 4000                      C	AT_HWCP EQU	 04000H 		;; slot is hwcp
 = 8000                      C	AT_OLD	EQU	 08000H 		;; codepage in buffer is not newly
			     C						;; designated.
 = 0100                      C	AT_LOAD EQU	 00100H 		;; slot with font to be loaded
 = 0200                      C	AT_FONT EQU	 00200H 		;; font in this slot has been loaded
 = FEFF                      C	AT_NO_LOAD	EQU	NOT  AT_LOAD	;; to reset the bit
 = FDFF                      C	AT_NO_FONT	EQU	NOT  AT_FONT	;; to reset the bit
 = 0400                      C	AT_SELECT EQU	 00400H 		;; for SELECT TYPE = 1
			     C						;; -- mark the FTBLK where control is
			     C						;;    copied from.
			     C	;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
			     C						;; constants on SLOTS
 = 000C                      C	HARDSL_MAX EQU	12			;;
			     C						;;
 = 000C                      C	RAMSL_MAX EQU	12			;;
			     C						;;
 = 0020                      C	CTL_MAX 	EQU	32		;; max.length of each selection control
 = 0008                      C	CTL5202_OFFS	EQU	8		;; offset to CTL5202_H for codepage
			     C						;;
			     C	;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
			     C	;
			     C	;	General Constants
			     C	;
			     C	;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
			     C						;;
 = 0028                      C	STACK_SIZE	EQU	28H		;; in paragraph, total 200H bytes
			     C						;;
			     C	;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
			     C	;
			     C	;
			     C	; STRUCS AND EQUATES
			     C	;
			     C	;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
			     C						;;
			     C	PARSE_NAME    STRUC			;;					    ;AN000;
 0000  0000                  C	N_LENGTH      DW    ?			;;					    ;AN000;
 0002  20 20 20 20 20 20     C	FNAME	      DB    "        "          ;;                                          ;AN000;
       20 20                 C	
 000A                        C	PARSE_NAME    ENDS			;;					    ;AN000;
			     C						;;
			     C	PARSE_OFFSETS STRUC			;;					    ;AN000;
 0000  0000                  C		      DW    ?			;;					    ;AN000;
 0002  0000                  C	DN_OFFSET     DW    ?			;;					    ;AN000;
 0004  0000                  C	DI_OFFSET     DW    ?			;;					    ;AN000;
Microsoft (R) Macro Assembler Version 5.10                  5/17/24 09:44:02
DOS - Code Page Switching - Printer Device Driver           Page     1-12


 0006  0000                  C	DCP_OFFSET    DW    ?			;;					    ;AN000;
 0008  0000                  C	DD_OFFSET     DW    ?			;;					    ;AN000;
 000A  0000                  C		      DW    ?			;;					    ;AN000;
 000C                        C	PARSE_OFFSETS ENDS			;;					    ;AN000;
			     C						;;
			     C	PARSE_HWCP    STRUC			;;					    ;AN000;
 0000  0000                  C	NUM_HWCPS     DW    ?			;;					    ;AN000;
 0002  0000                  C	HWCP_1	      DW    ?			;;					    ;AN000;
 0004  0000                  C	HWCP_2	      DW    ?			;;					    ;AN000;
 0006  0000                  C	HWCP_3	      DW    ?			;;					    ;AN000;
 0008  0000                  C	HWCP_4	      DW    ?			;;					    ;AN000;
 000A  0000                  C	HWCP_5	      DW    ?			;;					    ;AN000;
 000C  0000                  C	HWCP_6	      DW    ?			;;					    ;AN000;
 000E  0000                  C	HWCP_7	      DW    ?			;;					    ;AN000;
 0010  0000                  C	HWCP_8	      DW    ?			;;					    ;AN000;
 0012  0000                  C	HWCP_9	      DW    ?			;;					    ;AN000;
 0014  0000                  C	HWCP_10       DW    ?			;;					    ;AN000;
 0016                        C	PARSE_HWCP    ENDS			;;					    ;AN000;
			     C						;;
			     C	PARSE_DESG    STRUC			;;					    ;AN000;
 0000  0000                  C	NUM_VALUES    DW    ?			;;					    ;AN000;
 0002  0000                  C	NUM_DESGS     DW    ?			;;					    ;AN000;
 0004  0000                  C	NUM_FONTS     DW    ?			;;					    ;AN000;
 0006                        C	PARSE_DESG    ENDS			;;					    ;AN000;
			     C						;;
			     C						;;
 = 0000                      C	ZERO	EQU	0H			;;					    ;AN000;
 = 0001                      C	ONE	EQU	1H			;;					    ;AN000;
 = 0002                      C	TWO	EQU	2H			;;					    ;AN000;
 = 0003                      C	THREE	EQU	3H			;;					    ;AN000;
 = 0004                      C	FOUR	EQU	4H			;;					    ;AN000;
 = 0005                      C	FIVE	EQU	5H			;;					    ;AN000;
 = 0006                      C	SIX	EQU	6H			;;					    ;AN000;
 = 0007                      C	SEVEN	EQU	7H			;;					    ;AN000;
 = 0008                      C	EIGHT	EQU	8H			;;					    ;AN000;
 = 0009                      C	NINE	EQU	9H			;;					    ;AN000;
 = 000A                      C	TEN	EQU    0AH			;;					    ;AN000;
 = 0001                      C	NUMBER	      EQU    1			;;					    ;AN000;
 = 0003                      C	STRING	      EQU    3			;;					    ;AN000;
 = 0004                      C	COMPLEX       EQU    4			;;					    ;AN000;
 =-0001                      C	RC_EOL	      EQU    -1 		;;					    ;AN000;
 = 0000                      C	RC_NO_ERROR   EQU    0			;;					    ;AN000;
 = 0002                      C	RC_OP_MISSING EQU    2			;;					    ;AN000;
 = 0001                      C	ON	      EQU    1			;;					    ;AN000;
 = 0000                      C	OFF	      EQU    0			;;					    ;AN000;
 = 000C                      C	BAD_SYNTAX_MSG EQU   12 		;;					    ;AN000;
 = 0002                      C	BAD_DEVICE_MSG EQU   2			;;					    ;AN000;
			     C	;
			     C	
									;;
				PUBLIC	PRINTER_DESC_NUM		;;
				PUBLIC	PRINTER_DESC_TBL		;;
				PUBLIC	INIT_CHK,TABLE,DEVICE_NUM	;; WGR						 ;AN000;
				PUBLIC	INVOKE				;; WGR						 ;AN000;
Microsoft (R) Macro Assembler Version 5.10                  5/17/24 09:44:02
DOS - Code Page Switching - Printer Device Driver           Page     1-13


				PUBLIC	BUF0,BUF1,BUF2,BUF3		;; WGR						 ;AN000;
				PUBLIC	HARD_SL1,RAM_SL1		;;
				PUBLIC	HARD_SL2,RAM_SL2		;;
				PUBLIC	HARD_SL3,RAM_SL3		;;
				PUBLIC	HARD_SL4,RAM_SL4		;;
				PUBLIC	RESERVED1,RESERVED2		;;
									;;
				EXTRN	RESIDENT_END:WORD		;;
				EXTRN	STACK_ALLOCATED:WORD		;;
				EXTRN	FONT_PARSER:NEAR,FTABLE:WORD	;;
				EXTRN	INIT:NEAR			;;
									;;
									;;
				;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
									;;
									;;
 0000				CSEG	SEGMENT PARA PUBLIC 'CODE'      ;;
					ASSUME	CS:CSEG 		;;
									;;
				;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
				;;
				;;  ************************************
				;;  **				      **
				;;  **	     Resident Code	      **
				;;  **				      **
				;;  ************************************
				;;
				;;
				;; DEVICE HEADER - must be at offset zero within device driver
				;;		   (DHS is defined according to this structure)
				;;
				;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
									;;
 0000  0012 R			DEV_HDR0: DW	OFFSET DEV_HDR1 	;; becomes pointer to next device header
 0002  0000				DW	0			;; must be zero for no link
 0004  E040				DW	0e040H			;; attribute (Char device)
									;; supports IOCTL calls
 0006  07DF R				DW	OFFSET STRATEGY0	;; pointer to device "strategy" routine
 0008  083C R				DW	OFFSET INTERRUPT0	;; pointer to device "interrupt handler"
 000A  50 52 4E 20 20 20	DEV_NAME0: DB	'PRN     '              ;; device name( length : NAME_LEN)
       20 20			
									;;
 0012  0024 R			DEV_HDR1: DW	OFFSET DEV_HDR2 	;; becomes pointer to next device header
 0014  0000				DW	0			;; must be zero for no link
 0016  E040				DW	0e040H			;; attribute (Char device)
									;; supports IOCTL calls
 0018  07EF R				DW	OFFSET STRATEGY1	;; pointer to device "strategy" routine
 001A  08EA R				DW	OFFSET INTERRUPT1	;; pointer to device "interrupt handler"
 001C  4C 50 54 31 20 20	DEV_NAME1: DB	'LPT1    '              ;; device name( length : NAME_LEN)
       20 20			
									;;
 0024  0036 R			DEV_HDR2: DW	OFFSET DEV_HDR3 	;; becomes pointer to next device header
 0026  0000				DW	0			;; must be zero for no link
 0028  E040				DW	0e040H			;; attribute (Char device)
Microsoft (R) Macro Assembler Version 5.10                  5/17/24 09:44:02
DOS - Code Page Switching - Printer Device Driver           Page     1-14


									;; supports IOCTL calls
 002A  07FF R				DW	OFFSET STRATEGY2	;; pointer to device "strategy" routine
 002C  0984 R				DW	OFFSET INTERRUPT2	;; pointer to device "interrupt handler"
 002E  4C 50 54 32 20 20	DEV_NAME2: DB	'LPT2    '              ;; device name( length : NAME_LEN)
       20 20			
									;;
									;;
 0036  FFFFFFFF			DEV_HDR3: DD	-1			;; becomes pointer to next device header
 003A  E040				DW	0e040H			;; attribute (Char device)
									;; supports IOCTL calls
 003C  080F R				DW	OFFSET STRATEGY3	;; pointer to device "strategy" routine
 003E  0A32 R				DW	OFFSET INTERRUPT3	;; pointer to device "interrupt handler"
 0040  4C 50 54 33 20 20	DEV_NAME3: DB	'LPT3    '              ;; device name( length : NAME_LEN)
       20 20			
									;;
									;;
									;;
				;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
				;; *****************************
				;; **  Resident Data Areas    **
				;; *****************************
				;;
				;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
				;
				; PRN/LPTn  printer data based on BUF
				;
				;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
									;;
 0048  0000			INIT_CHK DW	0			;; internal flag : error loc. in INIT
									;;
 004A  FFFF			BUF0:	BUF_DATA <,,,,,,,,,,>		;; PRN
 004C  FFFF			
 004E  FFFF			
 0050  FFFF			
 0052  FFFF			
 0054  FFFF			
 0056  FFFF			
 0058  FFFF			
 005A  FFFF			
 005C  FFFF			
 005E  FFFF			
 0060  0000			
 0062  0000			
 0064  0000			
 0066  0000			
 0068  FFFF			
 006A  0000			
 006C  0000			
 006E  FFFF			
 0070  0000			
 0072  FFFF			
 0074  0000			
 0076  0000			
 0078  FFFF			
Microsoft (R) Macro Assembler Version 5.10                  5/17/24 09:44:02
DOS - Code Page Switching - Printer Device Driver           Page     1-15


 007A  0000			
 007C  FFFF			
 007E  FFFF			
 0080  0000			
 0082  FFFF			
 0084  FFFF			
 0086  FFFF			
 0088  0000			
 008A  0000			
 008C  000C[			
	   FF			
			 ]	
 0098  FFFF			
 009A  0000			
				
									;;
 009C  FFFF			BUF1:	BUF_DATA <,,,,,,,,,,>		;; LPT1
 009E  FFFF			
 00A0  FFFF			
 00A2  FFFF			
 00A4  FFFF			
 00A6  FFFF			
 00A8  FFFF			
 00AA  FFFF			
 00AC  FFFF			
 00AE  FFFF			
 00B0  FFFF			
 00B2  0000			
 00B4  0000			
 00B6  0000			
 00B8  0000			
 00BA  FFFF			
 00BC  0000			
 00BE  0000			
 00C0  FFFF			
 00C2  0000			
 00C4  FFFF			
 00C6  0000			
 00C8  0000			
 00CA  FFFF			
 00CC  0000			
 00CE  FFFF			
 00D0  FFFF			
 00D2  0000			
 00D4  FFFF			
 00D6  FFFF			
 00D8  FFFF			
 00DA  0000			
 00DC  0000			
 00DE  000C[			
	   FF			
			 ]	
 00EA  FFFF			
 00EC  0000			
Microsoft (R) Macro Assembler Version 5.10                  5/17/24 09:44:02
DOS - Code Page Switching - Printer Device Driver           Page     1-16


				
									;;
 00EE  FFFF			BUF2:	BUF_DATA <,,,,,,,,,,>		;; LPT2
 00F0  FFFF			
 00F2  FFFF			
 00F4  FFFF			
 00F6  FFFF			
 00F8  FFFF			
 00FA  FFFF			
 00FC  FFFF			
 00FE  FFFF			
 0100  FFFF			
 0102  FFFF			
 0104  0000			
 0106  0000			
 0108  0000			
 010A  0000			
 010C  FFFF			
 010E  0000			
 0110  0000			
 0112  FFFF			
 0114  0000			
 0116  FFFF			
 0118  0000			
 011A  0000			
 011C  FFFF			
 011E  0000			
 0120  FFFF			
 0122  FFFF			
 0124  0000			
 0126  FFFF			
 0128  FFFF			
 012A  FFFF			
 012C  0000			
 012E  0000			
 0130  000C[			
	   FF			
			 ]	
 013C  FFFF			
 013E  0000			
				
									;;
 0140  FFFF			BUF3:	BUF_DATA <,,,,,,,,,,>		;; LPT3
 0142  FFFF			
 0144  FFFF			
 0146  FFFF			
 0148  FFFF			
 014A  FFFF			
 014C  FFFF			
 014E  FFFF			
 0150  FFFF			
 0152  FFFF			
 0154  FFFF			
 0156  0000			
Microsoft (R) Macro Assembler Version 5.10                  5/17/24 09:44:02
DOS - Code Page Switching - Printer Device Driver           Page     1-17


 0158  0000			
 015A  0000			
 015C  0000			
 015E  FFFF			
 0160  0000			
 0162  0000			
 0164  FFFF			
 0166  0000			
 0168  FFFF			
 016A  0000			
 016C  0000			
 016E  FFFF			
 0170  0000			
 0172  FFFF			
 0174  FFFF			
 0176  0000			
 0178  FFFF			
 017A  FFFF			
 017C  FFFF			
 017E  0000			
 0180  0000			
 0182  000C[			
	   FF			
			 ]	
 018E  FFFF			
 0190  0000			
				
									;;
				;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
				;
				; Hard/RAM slots table in the order of DEVICE parameters
				;
				;   number of entries in all HARD_SLn is determined by the max. {HSLOTS}
				;
				;
				;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
									;;
 0192  FFFF			HARD_SL1 :	SLTS <,>		;; 1st hardware slots
 0194  0000			
				
 0196  FFFF			HARD_SL1B:	SLTS <,>		;;
 0198  0000			
				
 019A  FFFF			HARD_SL1C:	SLTS <,>		;;
 019C  0000			
				
 019E  FFFF			HARD_SL1D:	SLTS <,>		;;
 01A0  0000			
				
 01A2  FFFF			HARD_SL1E:	SLTS <,>		;;
 01A4  0000			
				
 01A6  FFFF			HARD_SL1F:	SLTS <,>		;;
 01A8  0000			
Microsoft (R) Macro Assembler Version 5.10                  5/17/24 09:44:02
DOS - Code Page Switching - Printer Device Driver           Page     1-18


				
 01AA  FFFF			HARD_SL1G:	SLTS <,>		;;
 01AC  0000			
				
 01AE  FFFF			HARD_SL1H:	SLTS <,>		;;
 01B0  0000			
				
 01B2  FFFF			HARD_SL1I:	SLTS <,>		;;
 01B4  0000			
				
 01B6  FFFF			HARD_SL1J:	SLTS <,>		;;
 01B8  0000			
				
 01BA  FFFF			HARD_SL1K:	SLTS <,>		;;
 01BC  0000			
				
 01BE  FFFF			HARD_SL1L:	SLTS <,>		;;
 01C0  0000			
				
 01C2  FFFF			HARD_SL1M:	SLTS <,>		;; -- max. no. of code pages allowed
 01C4  0000			
				
				;;upto	hardsl_max + 1			;;
									;;
 01C6  FFFF			HARD_SL2 :	SLTS <,>		;; 2nd hardware slots
 01C8  0000			
				
 01CA  FFFF			HARD_SL2B:	SLTS <,>		;;
 01CC  0000			
				
 01CE  FFFF			HARD_SL2C:	SLTS <,>		;;
 01D0  0000			
				
 01D2  FFFF			HARD_SL2D:	SLTS <,>		;;
 01D4  0000			
				
 01D6  FFFF			HARD_SL2E:	SLTS <,>		;;
 01D8  0000			
				
 01DA  FFFF			HARD_SL2F:	SLTS <,>		;;
 01DC  0000			
				
 01DE  FFFF			HARD_SL2G:	SLTS <,>		;;
 01E0  0000			
				
 01E2  FFFF			HARD_SL2H:	SLTS <,>		;;
 01E4  0000			
				
 01E6  FFFF			HARD_SL2I:	SLTS <,>		;;
 01E8  0000			
				
 01EA  FFFF			HARD_SL2J:	SLTS <,>		;;
 01EC  0000			
				
Microsoft (R) Macro Assembler Version 5.10                  5/17/24 09:44:02
DOS - Code Page Switching - Printer Device Driver           Page     1-19


 01EE  FFFF			HARD_SL2K:	SLTS <,>		;;
 01F0  0000			
				
 01F2  FFFF			HARD_SL2L:	SLTS <,>		;;
 01F4  0000			
				
 01F6  FFFF			HARD_SL2M:	SLTS <,>		;; -- max. no. of code pages allowed
 01F8  0000			
				
				;;upto	hardsl_max + 1			;;
									;;
 01FA  FFFF			HARD_SL3 :	SLTS <,>		;; 3rd hardware slots
 01FC  0000			
				
 01FE  FFFF			HARD_SL3B:	SLTS <,>		;;
 0200  0000			
				
 0202  FFFF			HARD_SL3C:	SLTS <,>		;;
 0204  0000			
				
 0206  FFFF			HARD_SL3D:	SLTS <,>		;;
 0208  0000			
				
 020A  FFFF			HARD_SL3E:	SLTS <,>		;;
 020C  0000			
				
 020E  FFFF			HARD_SL3F:	SLTS <,>		;;
 0210  0000			
				
 0212  FFFF			HARD_SL3G:	SLTS <,>		;;
 0214  0000			
				
 0216  FFFF			HARD_SL3H:	SLTS <,>		;;
 0218  0000			
				
 021A  FFFF			HARD_SL3I:	SLTS <,>		;;
 021C  0000			
				
 021E  FFFF			HARD_SL3J:	SLTS <,>		;;
 0220  0000			
				
 0222  FFFF			HARD_SL3K:	SLTS <,>		;;
 0224  0000			
				
 0226  FFFF			HARD_SL3L:	SLTS <,>		;;
 0228  0000			
				
 022A  FFFF			HARD_SL3M:	SLTS <,>		;; -- max. no. of code pages allowed
 022C  0000			
				
				;;upto	hardsl_max + 1			;;
									;;
 022E  FFFF			HARD_SL4 :	SLTS <,>		;; 4TH hardware slots
 0230  0000			
Microsoft (R) Macro Assembler Version 5.10                  5/17/24 09:44:02
DOS - Code Page Switching - Printer Device Driver           Page     1-20


				
 0232  FFFF			HARD_SL4B:	SLTS <,>		;;
 0234  0000			
				
 0236  FFFF			HARD_SL4C:	SLTS <,>		;;
 0238  0000			
				
 023A  FFFF			HARD_SL4D:	SLTS <,>		;;
 023C  0000			
				
 023E  FFFF			HARD_SL4E:	SLTS <,>		;;
 0240  0000			
				
 0242  FFFF			HARD_SL4F:	SLTS <,>		;;
 0244  0000			
				
 0246  FFFF			HARD_SL4G:	SLTS <,>		;;
 0248  0000			
				
 024A  FFFF			HARD_SL4H:	SLTS <,>		;;
 024C  0000			
				
 024E  FFFF			HARD_SL4I:	SLTS <,>		;;
 0250  0000			
				
 0252  FFFF			HARD_SL4J:	SLTS <,>		;;
 0254  0000			
				
 0256  FFFF			HARD_SL4K:	SLTS <,>		;;
 0258  0000			
				
 025A  FFFF			HARD_SL4L:	SLTS <,>		;;
 025C  0000			
				
 025E  FFFF			HARD_SL4M:	SLTS <,>		;; -- max. no. of code pages allowed
 0260  0000			
				
				;;upto	hardsl_max + 1			;;
									;;
									;;
 0262  FFFF			RAM_SL1 :	SLTS <,>		;; 1st ram slots
 0264  0000			
				
 0266  FFFF			RAM_SL1B:	SLTS  <,>		;; NOTE : must be only FOUR bytes for
 0268  0000			
				
 026A  FFFF			RAM_SL1C:	SLTS  <,>		;;	  codepage positioning
 026C  0000			
				
 026E  FFFF			RAM_SL1D:	SLTS  <,>		;;	  calculation as compared
 0270  0000			
				
 0272  FFFF			RAM_SL1E:	SLTS  <,>		;;	  with each entry in FTDL_OFF
 0274  0000			
Microsoft (R) Macro Assembler Version 5.10                  5/17/24 09:44:02
DOS - Code Page Switching - Printer Device Driver           Page     1-21


				
 0276  FFFF			RAM_SL1F:	SLTS  <,>		;;
 0278  0000			
				
 027A  FFFF			RAM_SL1G:	SLTS  <,>		;;
 027C  0000			
				
 027E  FFFF			RAM_SL1H:	SLTS  <,>		;;
 0280  0000			
				
 0282  FFFF			RAM_SL1I:	SLTS  <,>		;;
 0284  0000			
				
 0286  FFFF			RAM_SL1J:	SLTS  <,>		;;
 0288  0000			
				
 028A  FFFF			RAM_SL1K:	SLTS  <,>		;;
 028C  0000			
				
 028E  FFFF			RAM_SL1L:	SLTS  <,>		;; -- max. no. of code pages allowed
 0290  0000			
				
				;;upto	ramsl_max,			;;
									;;
 0292  FFFF			RAM_SL2 :	SLTS <,>		;; 2nd ram slots
 0294  0000			
				
 0296  FFFF			RAM_SL2B:	SLTS  <,>		;;
 0298  0000			
				
 029A  FFFF			RAM_SL2C:	SLTS  <,>		;;
 029C  0000			
				
 029E  FFFF			RAM_SL2D:	SLTS  <,>		;;
 02A0  0000			
				
 02A2  FFFF			RAM_SL2E:	SLTS  <,>		;;
 02A4  0000			
				
 02A6  FFFF			RAM_SL2F:	SLTS  <,>		;;
 02A8  0000			
				
 02AA  FFFF			RAM_SL2G:	SLTS  <,>		;;
 02AC  0000			
				
 02AE  FFFF			RAM_SL2H:	SLTS  <,>		;;
 02B0  0000			
				
 02B2  FFFF			RAM_SL2I:	SLTS  <,>		;;
 02B4  0000			
				
 02B6  FFFF			RAM_SL2J:	SLTS  <,>		;;
 02B8  0000			
				
Microsoft (R) Macro Assembler Version 5.10                  5/17/24 09:44:02
DOS - Code Page Switching - Printer Device Driver           Page     1-22


 02BA  FFFF			RAM_SL2K:	SLTS  <,>		;;
 02BC  0000			
				
 02BE  FFFF			RAM_SL2L:	SLTS  <,>		;; -- max. no. of code pages allowed
 02C0  0000			
				
				;;upto	ramsl_max,			;;
									;;
 02C2  FFFF			RAM_SL3 :	SLTS <,>		;; 3rd ram slots
 02C4  0000			
				
 02C6  FFFF			RAM_SL3B:	SLTS  <,>		;;
 02C8  0000			
				
 02CA  FFFF			RAM_SL3C:	SLTS  <,>		;;
 02CC  0000			
				
 02CE  FFFF			RAM_SL3D:	SLTS  <,>		;;
 02D0  0000			
				
 02D2  FFFF			RAM_SL3E:	SLTS  <,>		;;
 02D4  0000			
				
 02D6  FFFF			RAM_SL3F:	SLTS  <,>		;;
 02D8  0000			
				
 02DA  FFFF			RAM_SL3G:	SLTS  <,>		;;
 02DC  0000			
				
 02DE  FFFF			RAM_SL3H:	SLTS  <,>		;;
 02E0  0000			
				
 02E2  FFFF			RAM_SL3I:	SLTS  <,>		;;
 02E4  0000			
				
 02E6  FFFF			RAM_SL3J:	SLTS  <,>		;;
 02E8  0000			
				
 02EA  FFFF			RAM_SL3K:	SLTS  <,>		;;
 02EC  0000			
				
 02EE  FFFF			RAM_SL3L:	SLTS  <,>		;; -- max. no. of code pages allowed
 02F0  0000			
				
				;;upto	ramsl_max,			;;
									;;
 02F2  FFFF			RAM_SL4 :	SLTS <,>		;; 4th ram slots
 02F4  0000			
				
 02F6  FFFF			RAM_SL4B:	SLTS  <,>		;;
 02F8  0000			
				
 02FA  FFFF			RAM_SL4C:	SLTS  <,>		;;
 02FC  0000			
Microsoft (R) Macro Assembler Version 5.10                  5/17/24 09:44:02
DOS - Code Page Switching - Printer Device Driver           Page     1-23


				
 02FE  FFFF			RAM_SL4D:	SLTS  <,>		;;
 0300  0000			
				
 0302  FFFF			RAM_SL4E:	SLTS  <,>		;;
 0304  0000			
				
 0306  FFFF			RAM_SL4F:	SLTS  <,>		;;
 0308  0000			
				
 030A  FFFF			RAM_SL4G:	SLTS  <,>		;;
 030C  0000			
				
 030E  FFFF			RAM_SL4H:	SLTS  <,>		;;
 0310  0000			
				
 0312  FFFF			RAM_SL4I:	SLTS  <,>		;;
 0314  0000			
				
 0316  FFFF			RAM_SL4J:	SLTS  <,>		;;
 0318  0000			
				
 031A  FFFF			RAM_SL4K:	SLTS  <,>		;;
 031C  0000			
				
 031E  FFFF			RAM_SL4L:	SLTS  <,>		;; -- max. no. of code pages allowed
 0320  0000			
				
				;;upto	ramsl_max,			;;
									;;
									;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
									;; hard/RAM buffered slots on codepages
									;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 0322				HBUF_SL1 LABEL	WORD			;; hardware slots' buffer for LPT1/PRN
 0322  FFFF				DW	0FFFFH			;; ---- only for CART-SLOTS
 0324  FFFF				DW	0FFFFH			;;
 0326  FFFF				DW	0FFFFH			;;
 0328  FFFF				DW	0FFFFH			;;
 032A  FFFF				DW	0FFFFH			;;
 032C  FFFF				DW	0FFFFH			;;
 032E  FFFF				DW	0FFFFH			;;
 0330  FFFF				DW	0FFFFH			;;
 0332  FFFF				DW	0FFFFH			;;
 0334  FFFF				DW	0FFFFH			;;
 0336  FFFF				DW	0FFFFH			;;
 0338  FFFF				DW	0FFFFH			;;
 033A  FFFF				DW	0FFFFH			;;
				;;upto	hardsl_max+1, there are as many HARD_SLn
									;;
 033C				HBUF_SL2 LABEL	WORD			;; hardware slots' buffer for LPT2
 033C  FFFF				DW	0FFFFH			;; ---- only for CART-SLOTS
 033E  FFFF				DW	0FFFFH			;;
 0340  FFFF				DW	0FFFFH			;;
 0342  FFFF				DW	0FFFFH			;;
Microsoft (R) Macro Assembler Version 5.10                  5/17/24 09:44:02
DOS - Code Page Switching - Printer Device Driver           Page     1-24


 0344  FFFF				DW	0FFFFH			;;
 0346  FFFF				DW	0FFFFH			;;
 0348  FFFF				DW	0FFFFH			;;
 034A  FFFF				DW	0FFFFH			;;
 034C  FFFF				DW	0FFFFH			;;
 034E  FFFF				DW	0FFFFH			;;
 0350  FFFF				DW	0FFFFH			;;
 0352  FFFF				DW	0FFFFH			;;
 0354  FFFF				DW	0FFFFH			;;
				;;upto	hardsl_max+1, there are as many HARD_SLn
									;;
 0356				HBUF_SL3 LABEL	WORD			;; hardware slots' buffer for LPT3
 0356  FFFF				DW	0FFFFH			;; ---- only for CART-SLOTS
 0358  FFFF				DW	0FFFFH			;;
 035A  FFFF				DW	0FFFFH			;;
 035C  FFFF				DW	0FFFFH			;;
 035E  FFFF				DW	0FFFFH			;;
 0360  FFFF				DW	0FFFFH			;;
 0362  FFFF				DW	0FFFFH			;;
 0364  FFFF				DW	0FFFFH			;;
 0366  FFFF				DW	0FFFFH			;;
 0368  FFFF				DW	0FFFFH			;;
 036A  FFFF				DW	0FFFFH			;;
 036C  FFFF				DW	0FFFFH			;;
 036E  FFFF				DW	0FFFFH			;;
				;;upto	hardsl_max+1, there are as many HARD_SLn
									;;
									;;
 0370				RBUF_SL1 LABEL	WORD			;; ram slots' buffer for LPT1/PRN
 0370  FFFF				DW	0FFFFH			;;
 0372  FFFF				DW	0FFFFH			;;
 0374  FFFF				DW	0FFFFH			;;
 0376  FFFF				DW	0FFFFH			;;
 0378  FFFF				DW	0FFFFH			;;
 037A  FFFF				DW	0FFFFH			;;
 037C  FFFF				DW	0FFFFH			;;
 037E  FFFF				DW	0FFFFH			;;
 0380  FFFF				DW	0FFFFH			;;
 0382  FFFF				DW	0FFFFH			;;
 0384  FFFF				DW	0FFFFH			;;
 0386  FFFF				DW	0FFFFH			;;
				;;upto ramsl_max, there are as many RAM_SLn
									;;
 0388				RBUF_SL2 LABEL	WORD			;; ram slots' buffer for LPT2
 0388  FFFF				DW	0FFFFH			;;
 038A  FFFF				DW	0FFFFH			;;
 038C  FFFF				DW	0FFFFH			;;
 038E  FFFF				DW	0FFFFH			;;
 0390  FFFF				DW	0FFFFH			;;
 0392  FFFF				DW	0FFFFH			;;
 0394  FFFF				DW	0FFFFH			;;
 0396  FFFF				DW	0FFFFH			;;
 0398  FFFF				DW	0FFFFH			;;
 039A  FFFF				DW	0FFFFH			;;
Microsoft (R) Macro Assembler Version 5.10                  5/17/24 09:44:02
DOS - Code Page Switching - Printer Device Driver           Page     1-25


 039C  FFFF				DW	0FFFFH			;;
 039E  FFFF				DW	0FFFFH			;;
				;;upto ramsl_max, there are as many RAM_SLn
									;;
 03A0				RBUF_SL3 LABEL	WORD			;; ram slots' buffer for LPT3
 03A0  FFFF				DW	0FFFFH			;;
 03A2  FFFF				DW	0FFFFH			;;
 03A4  FFFF				DW	0FFFFH			;;
 03A6  FFFF				DW	0FFFFH			;;
 03A8  FFFF				DW	0FFFFH			;;
 03AA  FFFF				DW	0FFFFH			;;
 03AC  FFFF				DW	0FFFFH			;;
 03AE  FFFF				DW	0FFFFH			;;
 03B0  FFFF				DW	0FFFFH			;;
 03B2  FFFF				DW	0FFFFH			;;
 03B4  FFFF				DW	0FFFFH			;;
 03B6  FFFF				DW	0FFFFH			;;
				;;upto ramsl_max, there are as many RAM_SLn
									;;
 03B8				FTDL_OFF1 LABEL WORD			;; offset of FTSTART for PRN/LPT1
 03B8  0000				DW	0			;; NOTE : must be only two bytes for
 03BA  0000				DW	0			;;	  codepage positioning
 03BC  0000				DW	0			;;	  calculation as compared
 03BE  0000				DW	0			;;	  with each entry in RAM_SLOT
 03C0  0000				DW	0			;;	  or CART_SLOT
 03C2  0000				DW	0			;;
 03C4  0000				DW	0			;;
 03C6  0000				DW	0			;;
 03C8  0000				DW	0			;;
 03CA  0000				DW	0			;;
 03CC  0000				DW	0			;;
 03CE  0000				DW	0			;;
 03D0  0000				DW	0			;;
				;;upto the max. of {ramsl_max,hardsl_max}
									;;
 03D2				FTDL_OFF2 LABEL WORD			;; offset of FTSTART for LPT2
 03D2  0000				DW	0			;;
 03D4  0000				DW	0			;;
 03D6  0000				DW	0			;;
 03D8  0000				DW	0			;;
 03DA  0000				DW	0			;;
 03DC  0000				DW	0			;;
 03DE  0000				DW	0			;;
 03E0  0000				DW	0			;;
 03E2  0000				DW	0			;;
 03E4  0000				DW	0			;;
 03E6  0000				DW	0			;;
 03E8  0000				DW	0			;;
 03EA  0000				DW	0			;;
				;;upto the max. of {ramsl_max,hardsl_max}
									;;
 03EC				FTDL_OFF3 LABEL WORD			;; offset of FTSTART for LPT3
 03EC  0000				DW	0			;;
 03EE  0000				DW	0			;;
Microsoft (R) Macro Assembler Version 5.10                  5/17/24 09:44:02
DOS - Code Page Switching - Printer Device Driver           Page     1-26


 03F0  0000				DW	0			;;
 03F2  0000				DW	0			;;
 03F4  0000				DW	0			;;
 03F6  0000				DW	0			;;
 03F8  0000				DW	0			;;
 03FA  0000				DW	0			;;
 03FC  0000				DW	0			;;
 03FE  0000				DW	0			;;
 0400  0000				DW	0			;;
 0402  0000				DW	0			;;
 0404  0000				DW	0			;;
				;;upto the max. of {ramsl_max,hardsl_max}
									;;
									;;
									;;
									;;
				;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
				;
				;	Printer Description Tables
				;
				;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
									;;
 = 001B				ESC_CHAR	EQU	27		;;
									;;
 0406  50 52 49 4E 54 45	db	'PRINTER_DESC'                  ;;
       52 5F 44 45 53 43	
									;;
 0412  0003			PRINTER_DESC_NUM DW 3			;; number of PRINTER_DESCn
									;;
 0414				PRINTER_DESC_TBL LABEL WORD		;;
 0414  041C R				DW	OFFSET(PRINTER_DESC1)	;;
 0416  04B8 R				DW	OFFSET(PRINTER_DESC2)	;;
 0418  0555 R				DW	OFFSET(PRINTER_DESC3)	;;
 041A  05F1 R				DW	OFFSET(PRINTER_DESC4)	;;
									;;
									;;
				;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
				;
				;	Printer Description Table for Proprinter (4201)
				;
				;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 041C				PRINTER_DESC1 : 			;;
									;;
 041C  1E00				PDSH	<,'4201    ',,,0,212,1,1,1> ;; followed by the rest in PDS
 041E  3432303120202020		
 0426  00			
 0427  01			
 0428  0000			
 042A  D400			
 042C  0100			
 042E  0100			
 0430  0100			
				
									;; CLASS  = 0
Microsoft (R) Macro Assembler Version 5.10                  5/17/24 09:44:02
DOS - Code Page Switching - Printer Device Driver           Page     1-27


									;; FTSZPA = 212 ==> 212 x 16=3008 bytes
									;;		    of font buffer
									;; HSLOTS  = 1 (check CTL4201_B)
									;; HWCPMIN = 1
									;; RSLOTS  = 1 (check CTL4201_B)
									;;
 0432  0438 R				DW	OFFSET(CTL4201_H)
 0434  043E R				DW	OFFSET(CTL4201_R)
 0436  0478 R				DW	OFFSET(CTL4201_B)
									;; (CTL_MAX = 32)
									;; (32 bytes for each control)
									;; (MUST BE ADJACENT...no blanks bet.:)
 0438  05 1B 49 00 1B 36	CTL4201_H :	DB  5,ESC_CHAR,'I',0,ESC_CHAR,"6" ;;  selection control 1
 043E  05 1B 49 04 1B 36	CTL4201_R :	DB  5,ESC_CHAR,'I',4,ESC_CHAR,"6" ;;  selection control 2
 0444  001A[					db  26	dup (0) 	;;  for CTL4201_H
	   00			
			 ]	
				
 045E  001A[					db  26	dup (0) 	;;  for CTL4201_R
	   00			
			 ]	
				
									;;
 0478  0020[			CTL4201_B	DB  CTL_MAX	DUP (0) ;; max. two selection
	   00			
			 ]	
				
 0498  0020[					DB  CTL_MAX	DUP (0) ;;
	   00			
			 ]	
				
									;;
				;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
				;
				;	Printer Description Table for 5202
				;
				;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
									;;
 04B8				PRINTER_DESC2 : 			;;
 04B8  1E00				PDSH	<,'5202    ',,,1,2,2,1,0> ;; followed by the rest in PDS
 04BA  3532303220202020		
 04C2  00			
 04C3  01			
 04C4  0100			
 04C6  0200			
 04C8  0200			
 04CA  0100			
 04CC  0000			
				
									;; CLASS  = 1 (font buffers allowed
									;;	       if there is cart-slot)
									;; FTSZPA = 2 ==> 2 x 16 = 32 bytes
									;;		    of font buffer
									;; HSLOTS  = 2 (check CTL5202_B)
Microsoft (R) Macro Assembler Version 5.10                  5/17/24 09:44:02
DOS - Code Page Switching - Printer Device Driver           Page     1-28


									;; HWCPMIN = 1
									;; RSLOTS  = 0 (check CTL5202_B)
									;;
 04CE  04D4 R				DW	OFFSET(CTL5202_H)
 04D0  0514 R				DW	OFFSET(CTL5202_R)
 04D2  0515 R				DW	OFFSET(CTL5202_B)
									;;
									;; (CTL_MAX = 32)
									;; (SEE CTL5202_OFFS)
									;; (32 bytes for each control)
 04D4  0C 1B 5B 54 05 00	CTL5202_H :	DB  12,ESC_CHAR,91,84,5,0,00,00,0FFH,0FFH,00   ;; selection control 1
       00 00 FF FF 00		
 04DF  1B 36					 dB  ESC_CHAR,"6"             ;;
 04E1  0C 1B 5B 54 05 00			DB  12,ESC_CHAR,91,84,5,0,00,00,0FFH,0FFH,00   ;; selection control 2
       00 00 FF FF 00		
 04EC  1B 36					 dB  ESC_CHAR,"6"             ;;
 04EE  0013[					db  19 dup (0)		;;  for CTL5202_H selection 1
	   00			
			 ]	
				
 0501  0013[					db  19 dup (0)		;;  for CTL5202_H selection 2
	   00			
			 ]	
				
 0514  00			CTL5202_R :	DB  0			;;
									;;
 0515  0020[			CTL5202_B	DB  CTL_MAX	DUP (0) ;; max. two selection
	   00			
			 ]	
				
 0535  0020[					DB  CTL_MAX	DUP (0) ;;
	   00			
			 ]	
				
									;;
				;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
				;
				;	Printer Description Table for RESERVED PRINTER (res1)
				;
				;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 0555				PRINTER_DESC3 : 			;;
									;;
 0555  1E00				PDSH	<,'4208    ',,,1,2,2,1,0> ;; followed by the rest in PDS
 0557  3432303820202020		
 055F  00			
 0560  01			
 0561  0100			
 0563  0200			
 0565  0200			
 0567  0100			
 0569  0000			
				
									;; CLASS  = 1
									;; FTSZPA = 2
Microsoft (R) Macro Assembler Version 5.10                  5/17/24 09:44:02
DOS - Code Page Switching - Printer Device Driver           Page     1-29


									;; HSLOTS  = 2
									;; HWCPMIN = 1
									;; RSLOTS  = 0
									;;
 056B  0571 R				DW	OFFSET(CTL4208_H)
 056D  0591 R				DW	OFFSET(CTL4208_R)
 056F  05B1 R				DW	OFFSET(CTL4208_B)
									;; (CTL_MAX = 32)
									;; (32 bytes for each control)
									;; (MUST BE ADJACENT...no blanks bet.:)
 0571  0B 1B 49 0A		CTL4208_H :	DB  0Bh,ESC_CHAR,49h,0Ah    ;;	selection control 1
 0575  1B 49 03					DB  ESC_CHAR,49h,03
 0578  1B 49 02					DB  ESC_CHAR,49h,02
 057B  1B 36					DB  ESC_CHAR,36h
 057D  0014[					db  20	dup (0)
	   00			
			 ]	
				
 0591  0B 1B 49 0E		CTL4208_R :	DB  0Bh,ESC_CHAR,49h,0Eh    ;;	selection control 2
 0595  1B 49 07					DB  ESC_CHAR,49h,7
 0598  1B 49 06					DB  ESC_CHAR,49h,6
 059B  1B 36					DB  ESC_CHAR,36h
 059D  0014[					db  20	dup (0) 	;;  for CTLres1_H and CTRLres1_R
	   00			
			 ]	
				
									;;
 05B1  0020[			CTL4208_B	DB  CTL_MAX	DUP (0) ;; max. two selection
	   00			
			 ]	
				
 05D1  0020[					DB  CTL_MAX	DUP (0) ;;
	   00			
			 ]	
				
									;;
									;;
				;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
				;
				;	Printer Description Table for RESERVED PRINTER (res2)
				;
				;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 05F1				PRINTER_DESC4 : 			;;
									;;
 05F1  1E00				PDSH	<,'nnnnnnnn',,,0,0,1,1,1> ;; followed by the rest in PDS
 05F3  6E6E6E6E6E6E6E6E		
 05FB  00			
 05FC  01			
 05FD  0000			
 05FF  0000			
 0601  0100			
 0603  0100			
 0605  0100			
				
Microsoft (R) Macro Assembler Version 5.10                  5/17/24 09:44:02
DOS - Code Page Switching - Printer Device Driver           Page     1-30


									;; CLASS  = 0
									;; FTSZPA = 0
									;; HSLOTS  = 1
									;; HWCPMIN = 1
									;; RSLOTS  = 1
									;;
 0607  060D R				DW	OFFSET(CTLres2_H)
 0609  060E R				DW	OFFSET(CTLres2_R)
 060B  064E R				DW	OFFSET(CTLres2_B)
									;; (CTL_MAX = 32)
									;; (32 bytes for each control)
									;; (MUST BE ADJACENT...no blanks bet.:)
 060D  00			CTLres2_H :	DB  0			;;  selection control 1
 060E  0020[			CTLres2_R :	DB  32	dup (0) 	;;  selection control 2
	   00			
			 ]	
				
 062E  0020[					db  32	dup (0) 	;;  for CTLres2_H and CTRLres2_R
	   00			
			 ]	
				
									;;
 064E  0020[			CTLres2_B	DB  CTL_MAX	DUP (0) ;; max. two selection
	   00			
			 ]	
				
 066E  0020[					DB  CTL_MAX	DUP (0) ;;
	   00			
			 ]	
				
									;;
				;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
									;;
									;;
 068E  0000			TEMP_SI 	DW	?		;;
									;;
				;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
				;;
				;; The request header for IOCTL call
				;; to the Normal device driver
				;;
				;;
				;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
									;;
 0690  000D[			REQ_NORM1 GIH	<,,,,,> 		;; for LPT1/PRN
	   ??			
			 ]	
 069D  00			
 069E  00			
 069F  0000			
 06A1  0000			
 06A3  00000000			
				
 06A7  0000				  GB2S	<,>			;;
Microsoft (R) Macro Assembler Version 5.10                  5/17/24 09:44:02
DOS - Code Page Switching - Printer Device Driver           Page     1-31


 06A9  0000			
				
 06AB  000D[			REQ_NORM2 GIH	<,,,,,> 		;; for LPT2
	   ??			
			 ]	
 06B8  00			
 06B9  00			
 06BA  0000			
 06BC  0000			
 06BE  00000000			
				
 06C2  0000				  GB2S	<,>			;;
 06C4  0000			
				
 06C6  000D[			REQ_NORM3 GIH	<,,,,,> 		;; for LPT3
	   ??			
			 ]	
 06D3  00			
 06D4  00			
 06D5  0000			
 06D7  0000			
 06D9  00000000			
				
 06DD  0000				  GB2S	<,>			;;
 06DF  0000			
				
				;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
				;;
				;;
				;;
				;;   PARSER'S TABLES
				;;
				;;	-- TABLE  is the first table of the results of the parsing.
				;;	   The first word (number of devices) will be set to 0 if
				;;	   syntax error is detected in the DEVICE command line.
				;;
				;;
				;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
				;
				; TABLE STRUCTURE FOR RETURNING VALUES TO THE INIT MODULE	    WGR
				;  (ADAPTED FROM VERSION 1.0 DISPLAY.SYS)			    WGR
				;
				;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
				
 06E1				TABLE	       LABEL	BYTE		   ; table header				 ;AN000;
 06E1  0000			DEVICE_NUM     DW	ZERO		   ; initialized to zero devices		 ;AN000;
 06E3  06EB R				       DW	TABLE1_1	   ; pointer to table 2 for device 1		 ;AN000;
 06E5  0727 R				       DW	TABLE2_1	   ; pointer to table 2 for device 2		 ;AN000;
 06E7  0763 R				       DW	TABLE3_1	   ; pointer to table 2 for device 3		 ;AN000;
 06E9  079F R				       DW	TABLE4_1	   ; pointer to table 2 for device 4		 ;AN000;
															 ;AN000;
 06EB				TABLE1_1       LABEL	WORD								 ;AN000;
 06EB  0004				       DW	FOUR		   ; 4 pointer follow				 ;AN000;
 06ED  06F7 R				       DW	TABLE1_2	   ; pointer to table 3 (device name)		 ;AN000;
Microsoft (R) Macro Assembler Version 5.10                  5/17/24 09:44:02
DOS - Code Page Switching - Printer Device Driver           Page     1-32


 06EF  0701 R				       DW	TABLE1_3	   ; pointer to table 4 (device id)		 ;AN000;
 06F1  070B R				       DW	TABLE1_4	   ; pointer to table 5 (hwcp's)                 ;AN000;
 06F3  0721 R				       DW	TABLE1_5	   ; pointer to table 6 (num desg's and fonts)   ;AN000;
 06F5  FFFF				       DW	-1		   ; reserved					 ;AN000;
															 ;AN000;
 06F7				TABLE1_2       LABEL	WORD		   ; device name (ie. PRN)			 ;AN000;
 06F7  0000				       DW	ZERO		   ; length					 ;AN000;
 06F9  20 20 20 20 20 20		       DB	"        "         ; value                                       ;AN000;
       20 20			
															 ;AN000;
 0701				TABLE1_3       LABEL	WORD		   ; device id. (eg. 4201,5202..)		 ;AN000;
 0701  0000				       DW	ZERO		   ; length					 ;AN000;
 0703  20 20 20 20 20 20		       DB	"        "         ; value                                       ;AN000;
       20 20			
															 ;AN000;
 070B				TABLE1_4       LABEL	WORD		   ; hardware code pages (10 max.)		 ;AN000;
 070B  0000				       DW	ZERO		   ; number					 ;AN000;
 070D  FFFF				       DW	-1		   ; value					 ;AN000;
 070F  FFFF				       DW	-1		   ; value					 ;AN000;
 0711  FFFF				       DW	-1		   ; value					 ;AN000;
 0713  FFFF				       DW	-1		   ; value					 ;AN000;
 0715  FFFF				       DW	-1		   ; value					 ;AN000;
 0717  FFFF				       DW	-1		   ; value					 ;AN000;
 0719  FFFF				       DW	-1		   ; value					 ;AN000;
 071B  FFFF				       DW	-1		   ; value					 ;AN000;
 071D  FFFF				       DW	-1		   ; value					 ;AN000;
 071F  FFFF				       DW	-1		   ; value					 ;AN000;
															 ;AN000;
 0721				TABLE1_5       LABEL	WORD		   ; Designates and fonts			 ;AN000;
 0721  0000				       DW	ZERO		   ; values given (0 - 2 valid) 		 ;AN000;
 0723  FFFF				       DW	-1		   ; n value					 ;AN000;
 0725  FFFF				       DW	-1		   ; m value					 ;AN000;
															 ;AN000;
 0727				TABLE2_1       LABEL	WORD								 ;AN000;
 0727  0004				       DW	FOUR		   ; 4 pointer follow				 ;AN000;
 0729  0733 R				       DW	TABLE2_2	   ; pointer to table 3 (device name)		 ;AN000;
 072B  073D R				       DW	TABLE2_3	   ; pointer to table 4 (device id)		 ;AN000;
 072D  0747 R				       DW	TABLE2_4	   ; pointer to table 5 (hwcp's)                 ;AN000;
 072F  075D R				       DW	TABLE2_5	   ; pointer to table 6 (num desg's and fonts)   ;AN000;
 0731  FFFF				       DW	-1		   ; reserved					 ;AN000;
															 ;AN000;
 0733				TABLE2_2       LABEL	WORD		   ; device name (ie. PRN)			 ;AN000;
 0733  0000				       DW	ZERO		   ; length					 ;AN000;
 0735  20 20 20 20 20 20		       DB	"        "         ; value                                       ;AN000;
       20 20			
															 ;AN000;
 073D				TABLE2_3       LABEL	WORD		   ; device id. (eg. 4201,5202..)		 ;AN000;
 073D  0000				       DW	ZERO		   ; length					 ;AN000;
 073F  20 20 20 20 20 20		       DB	"        "         ; value                                       ;AN000;
       20 20			
															 ;AN000;
 0747				TABLE2_4       LABEL	WORD		   ; hardware code pages (10 max.)		 ;AN000;
 0747  0000				       DW	ZERO		   ; number					 ;AN000;
 0749  FFFF				       DW	-1		   ; value					 ;AN000;
Microsoft (R) Macro Assembler Version 5.10                  5/17/24 09:44:02
DOS - Code Page Switching - Printer Device Driver           Page     1-33


 074B  FFFF				       DW	-1		   ; value					 ;AN000;
 074D  FFFF				       DW	-1		   ; value					 ;AN000;
 074F  FFFF				       DW	-1		   ; value					 ;AN000;
 0751  FFFF				       DW	-1		   ; value					 ;AN000;
 0753  FFFF				       DW	-1		   ; value					 ;AN000;
 0755  FFFF				       DW	-1		   ; value					 ;AN000;
 0757  FFFF				       DW	-1		   ; value					 ;AN000;
 0759  FFFF				       DW	-1		   ; value					 ;AN000;
 075B  FFFF				       DW	-1		   ; value					 ;AN000;
															 ;AN000;
 075D				TABLE2_5       LABEL	WORD		   ; Designates and fonts			 ;AN000;
 075D  0000				       DW	ZERO		   ; values given (0 - 2 valid) 		 ;AN000;
 075F  FFFF				       DW	-1		   ; n value					 ;AN000;
 0761  FFFF				       DW	-1		   ; m value					 ;AN000;
															 ;AN000;
 0763				TABLE3_1       LABEL	WORD								 ;AN000;
 0763  0004				       DW	FOUR		   ; 4 pointer follow				 ;AN000;
 0765  076F R				       DW	TABLE3_2	   ; pointer to table 3 (device name)		 ;AN000;
 0767  0779 R				       DW	TABLE3_3	   ; pointer to table 4 (device id)		 ;AN000;
 0769  0783 R				       DW	TABLE3_4	   ; pointer to table 5 (hwcp's)                 ;AN000;
 076B  0799 R				       DW	TABLE3_5	   ; pointer to table 6 (num desg's and fonts)   ;AN000;
 076D  FFFF				       DW	-1		   ; reserved					 ;AN000;
															 ;AN000;
 076F				TABLE3_2       LABEL	WORD		   ; device name (ie. PRN)			 ;AN000;
 076F  0000				       DW	ZERO		   ; length					 ;AN000;
 0771  20 20 20 20 20 20		       DB	"        "         ; value                                       ;AN000;
       20 20			
															 ;AN000;
 0779				TABLE3_3       LABEL	WORD		   ; device id. (eg. 4201,5202..)		 ;AN000;
 0779  0000				       DW	ZERO		   ; length					 ;AN000;
 077B  20 20 20 20 20 20		       DB	"        "         ; value                                       ;AN000;
       20 20			
															 ;AN000;
 0783				TABLE3_4       LABEL	WORD		   ; hardware code pages (10 max.)		 ;AN000;
 0783  0000				       DW	ZERO		   ; number					 ;AN000;
 0785  FFFF				       DW	-1		   ; value					 ;AN000;
 0787  FFFF				       DW	-1		   ; value					 ;AN000;
 0789  FFFF				       DW	-1		   ; value					 ;AN000;
 078B  FFFF				       DW	-1		   ; value					 ;AN000;
 078D  FFFF				       DW	-1		   ; value					 ;AN000;
 078F  FFFF				       DW	-1		   ; value					 ;AN000;
 0791  FFFF				       DW	-1		   ; value					 ;AN000;
 0793  FFFF				       DW	-1		   ; value					 ;AN000;
 0795  FFFF				       DW	-1		   ; value					 ;AN000;
 0797  FFFF				       DW	-1		   ; value					 ;AN000;
															 ;AN000;
 0799				TABLE3_5       LABEL	WORD		   ; Designates and fonts			 ;AN000;
 0799  0000				       DW	ZERO		   ; values given (0 - 2 valid) 		 ;AN000;
 079B  0000				       DW	0		   ; n value					 ;AN000;
 079D  0000				       DW	0		   ; m value					 ;AN000;
															 ;AN000;
 079F				TABLE4_1       LABEL	WORD								 ;AN000;
 079F  0004				       DW	FOUR		   ; 4 pointer follow				 ;AN000;
 07A1  07AB R				       DW	TABLE4_2	   ; pointer to table 3 (device name)		 ;AN000;
Microsoft (R) Macro Assembler Version 5.10                  5/17/24 09:44:02
DOS - Code Page Switching - Printer Device Driver           Page     1-34


 07A3  07B5 R				       DW	TABLE4_3	   ; pointer to table 4 (device id)		 ;AN000;
 07A5  07BF R				       DW	TABLE4_4	   ; pointer to table 5 (hwcp's)                 ;AN000;
 07A7  07D5 R				       DW	TABLE4_5	   ; pointer to table 6 (num desg's and fonts)   ;AN000;
 07A9  FFFF				       DW	-1		   ; reserved					 ;AN000;
															 ;AN000;
 07AB				TABLE4_2       LABEL	WORD		   ; device name (ie. PRN)			 ;AN000;
 07AB  0000				       DW	ZERO		   ; length					 ;AN000;
 07AD  20 20 20 20 20 20		       DB	"        "         ; value                                       ;AN000;
       20 20			
															 ;AN000;
 07B5				TABLE4_3       LABEL	WORD		   ; device id. (eg. 4201,5202..)		 ;AN000;
 07B5  0000				       DW	ZERO		   ; length					 ;AN000;
 07B7  20 20 20 20 20 20		       DB	"        "         ; value                                       ;AN000;
       20 20			
															 ;AN000;
 07BF				TABLE4_4       LABEL	WORD		   ; hardware code pages (10 max.)		 ;AN000;
 07BF  0000				       DW	ZERO		   ; number					 ;AN000;
 07C1  FFFF				       DW	-1		   ; value					 ;AN000;
 07C3  FFFF				       DW	-1		   ; value					 ;AN000;
 07C5  FFFF				       DW	-1		   ; value					 ;AN000;
 07C7  FFFF				       DW	-1		   ; value					 ;AN000;
 07C9  FFFF				       DW	-1		   ; value					 ;AN000;
 07CB  FFFF				       DW	-1		   ; value					 ;AN000;
 07CD  FFFF				       DW	-1		   ; value					 ;AN000;
 07CF  FFFF				       DW	-1		   ; value					 ;AN000;
 07D1  FFFF				       DW	-1		   ; value					 ;AN000;
 07D3  FFFF				       DW	-1		   ; value					 ;AN000;
															 ;AN000;
 07D5				TABLE4_5       LABEL	WORD		   ; Designates and fonts			 ;AN000;
 07D5  0000				       DW	ZERO		   ; values given (0 - 2 valid) 		 ;AN000;
 07D7  0000				       DW	0		   ; n value					 ;AN000;
 07D9  0000				       DW	0		   ; m value					 ;AN000;
				
				;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 07DB  0000			reserved1 DW	?			;; reserved for debugging used
 07DD  0000			reserved2 dw	?			;;
									;;
				;;;;;;;;ASSUME	DS:NOTHING		;;
				;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
				;;
				;;	PRN  Device "strategy" entry point
				;;
				;;	Retain the Request Header address for use by Interrupt routine
				;;
				;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 07DF				STRATEGY0 PROC	FAR			;;
 07DF  53				PUSH	BX			;;
 07E0  53				PUSH	BX			;;
 07E1  8D 1E 004A R			LEA	BX, BUF0		;; BUF = BUF0  CS:[BX]
 07E5  2E: 8F 47 0E			POP	buf.RH_PTRO		;; offset of request header
 07E9  2E: 8C 47 10			MOV	buf.RH_PTRS,ES		;; segment
 07ED  5B				POP	BX			;;
 07EE  CB				RET				;;
 07EF				STRATEGY0 ENDP				;;
Microsoft (R) Macro Assembler Version 5.10                  5/17/24 09:44:02
DOS - Code Page Switching - Printer Device Driver           Page     1-35


				;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
				;;
				;;	LPT1 Device "strategy" entry point
				;;
				;;	Retain the Request Header address for use by Interrupt routine
				;;
				;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 07EF				STRATEGY1 PROC	FAR			;;
 07EF  53				PUSH	BX			;;
 07F0  53				PUSH	BX			;;
 07F1  8D 1E 009C R			LEA	BX, BUF1		;; BUF = BUF1  CS:[BX]
 07F5  2E: 8F 47 0E			POP	buf.RH_PTRO		;; offset of request header
 07F9  2E: 8C 47 10			MOV	buf.RH_PTRS,ES		;; segment
 07FD  5B				POP	BX			;;
 07FE  CB				RET				;;
 07FF				STRATEGY1 ENDP				;;
				;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
				;;
				;;	LPT2 Device "strategy" entry point
				;;
				;;	Retain the Request Header address for use by Interrupt routine
				;;
				;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 07FF				STRATEGY2 PROC	FAR			;;
 07FF  53				PUSH	BX			;;
 0800  53				PUSH	BX			;;
 0801  8D 1E 00EE R			LEA	BX, BUF2		;; BUF = BUF2  CS:[BX]
 0805  2E: 8F 47 0E			POP	buf.RH_PTRO		;; offset of request header
 0809  2E: 8C 47 10			MOV	buf.RH_PTRS,ES		;; segment
 080D  5B				POP	BX			;;
 080E  CB				RET				;;
 080F				STRATEGY2 ENDP				;;
				;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
				;;
				;;	LPT3 Device "strategy" entry point
				;;
				;;	Retain the Request Header address for use by Interrupt routine
				;;
				;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 080F				STRATEGY3 PROC	FAR			;;
 080F  53				PUSH	BX			;;
 0810  53				PUSH	BX			;;
 0811  8D 1E 0140 R			LEA	BX, BUF3		;; BUF = BUF3  CS:[BX]
 0815  2E: 8F 47 0E			POP	buf.RH_PTRO		;; offset of request header
 0819  2E: 8C 47 10			MOV	buf.RH_PTRS,ES		;; segment
 081D  5B				POP	BX			;;
 081E  CB				RET				;;
 081F				STRATEGY3 ENDP				;;
				;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
				;;
				;;	Table of command / functions supported by LPTn
				;;
				;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
									;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Microsoft (R) Macro Assembler Version 5.10                  5/17/24 09:44:02
DOS - Code Page Switching - Printer Device Driver           Page     1-36


									;; CMD_CODES code supported by LPTn
									;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 081F				CMD_CODES LABEL BYTE			;;
 081F  00				DB	CMD_INI 		;;  Initialization
 0820  08				DB	CMD_WRT 		;;  output
 0821  09				DB	09			;;  output
 0822  0C				DB	12			;;  output
 = 0004				CMD_INDX EQU	($-CMD_CODES)		;;  number of entries in CMD_CODES
									;;
									;;  Write (CMD_WRT) has exceptional
									;;  support by LPTn
									;;
									;;  Generic IOCTL (CMD_GIO) leads to
									;;  GIO_CODES
									;;
									;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
									;; GIO_CODES code supported by LPTn
									;;   -- command = CMD_GIO and
									;;	major function = MAF_PTR
									;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 0823				GIO_CODES LABEL BYTE			;; minor GIO functions supported :
 0823  4C				DB	MIF_DST 		;; - designate start
 0824  4D				DB	MIF_DEN 		;; - designate end
 0825  4A				DB	MIF_IVK 		;; - invoke
 0826  6A				DB	MIF_QIV 		;; - query-invoked
 0827  6B				DB	MIF_QLS 		;; - query-list
 = 0005				GIO_INDX EQU	($-GIO_CODES)		;;  number of entries in GIO_CODES
									;;
									;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
									;; Cases supported by LPTn
									;; -- first section matched with
									;;    CMD_CODES upto CMD_INDX
									;;
									;; -- 2nd section matched with
									;;    GIO_CODES for GIO_INDEX more
									;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 0828				CASES	LABEL	WORD			;;  in CMD_CODES order
									;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
									;;
 0828  0000 E				DW	OFFSET INIT		;;  0 - Initialization
 082A  0BD7 R				DW	OFFSET WRITE		;;
 082C  0BD7 R				DW	OFFSET WRITE		;;
 082E  0BD7 R				DW	OFFSET WRITE		;;
									;;
									;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
									;;  in GIO_CODES order
									;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
									;;
 0830  0F10 R				DW	OFFSET DESIGNATE_START	;;
 0832  12EC R				DW	OFFSET DESIGNATE_END	;;
 0834  14AE R				DW	OFFSET INVOKE		;;
 0836  1789 R				DW	OFFSET Q_INVOKED	;;
 0838  180C R				DW	OFFSET Q_LIST		;;
									;;
Microsoft (R) Macro Assembler Version 5.10                  5/17/24 09:44:02
DOS - Code Page Switching - Printer Device Driver           Page     1-37


									;;
				;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
				;;
				;;	Memory Allocation
				;;
				;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
									;;
									;;
									;;
 083A  FFFF			MEM_REQUEST  DW    -1			;; flag used for first time memory
									;; allocation for each device
									;;
				;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
				;;
				;; PRN	Device "interrupt" entry point
				;;
				;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
									;;
 083C				INTERRUPT0 PROC FAR			;; device interrupt entry point
									;;
 083C  1E				PUSH	DS			;; save all registers Revised
 083D  06				PUSH	ES			;;
 083E  50				PUSH	AX			;;
 083F  53				PUSH	BX			;;
 0840  51				PUSH	CX			;;
 0841  52				PUSH	DX			;;
 0842  57				PUSH	DI			;;
 0843  56				PUSH	SI			;;
									;; BP isn't used, so it isn't saved
 0844  0E				push	cs			;;
 0845  1F				pop	ds			;;
									;;
 0846  81 3E 0000 E 00AA		CMP	STACK_ALLOCATED,0AAH	;;
 084C  75 31				JNE	PRN_NO_STACK		;;
									;;
				;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
				;
				;	STACK RECODING SEPT 28/86
				;
				;	GORDON GIDDINGS
				;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 084E  B8 0028				MOV	AX,STACK_SIZE		;G;
 0851  D1 E0				SHL	AX,1			;G;
 0853  D1 E0				SHL	AX,1			;G;
 0855  D1 E0				SHL	AX,1			;G;
 0857  D1 E0				SHL	AX,1			;G;
 0859  2E: 89 36 068E R			MOV	CS:TEMP_SI,SI		;G;
 085E  8B 36 0000 E			MOV	SI,RESIDENT_END 	;G;
 0862  83 EE 28				SUB	SI,STACK_SIZE		;G;
									;G;
 0865  2E: A3 07DB R			mov	reserved1,AX		;G;
 0869  2E: 89 36 07DD R			mov	reserved2,SI		;G;
									;G;
 086E  FA				CLI				;G;
Microsoft (R) Macro Assembler Version 5.10                  5/17/24 09:44:02
DOS - Code Page Switching - Printer Device Driver           Page     1-38


 086F  8C D2				MOV	DX,SS			;G;
 0871  8B CC				MOV	CX,SP			;G;
 0873  8E D6				MOV	SS,SI			;G;
 0875  8B E0				MOV	SP,AX			;G;
 0877  FB				STI				;G;
 0878  2E: 8B 36 068E R			MOV	SI,CS:TEMP_SI		;G;
				;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 087D  52				PUSH	DX			;; SAVE OLD SS ONTO STACK
 087E  51				PUSH	CX			;; "    "   SP "    "
									;;
 087F				PRN_NO_STACK :				;;
									;;
									;;
 087F  BF 0B8F R			MOV	DI,OFFSET IRPT_CMD_EXIT ;; return addr from command processor
									;;
 0882  57				PUSH	DI			;; push return address onto stack
									;; command routine issues "RET"
									;;
 0883  8D 1E 004A R			LEA	BX, BUF0		;; PRN	BUF = BUF0 , CS:BX
									;;
 0887  2E: C7 06 083A R FFFF		MOV	MEM_REQUEST,-1		;; to be set to zero only once
									;;
 088E  2E: 83 3F FF			CMP	BUF.BFLAG,-1		;;
 0892  75 3B				JNE	PRN_INITED		;;
									;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 0894  2E: C7 07 0000			MOV	BUF.BFLAG,BF_PRN	;; INITIALIZE PRN BUFFER
									;;
 0899  BF 0000 R			MOV	DI,OFFSET DEV_HDR0	;; PRN	Device header
 089C  2E: 89 7F 02			MOV	BUF.DEV_HDRO,DI 	;;
 08A0  2E: 8C 4F 04			MOV	BUF.DEV_HDRS,CS 	;; must be CS
									;;
 08A4  BF 0322 R			MOV	DI,OFFSET HBUF_SL1	;; PRN/LPT1 buffer for Hardware-slots
 08A7  2E: 89 7F 28			MOV	BUF.HRBUFO,DI		;;
									;;
 08AB  BF 0370 R			MOV	DI,OFFSET RBUF_SL1	;; PRN/LPT1 buffer for RAM-slots
 08AE  2E: 89 7F 32			MOV	BUF.RMBUFO,DI		;;
									;;
 08B2  BF 03B8 R			MOV	DI,OFFSET FTDL_OFF1	;;
 08B5  2E: 89 7F 3C			MOV	BUF.FTDLO,DI		;;
									;;
 08B9  BF 0690 R			MOV	DI,OFFSET REQ_NORM1	;; PRN/LPT1 request header
 08BC  2E: 89 7F 12			MOV	BUF.RNORMO,DI		;;
									;;
 08C0  2E: C7 47 3E 0000		MOV	BUF.FSELEN,0		;; selection control length
									;;
 08C6  2E: C7 47 14 004A R		mov	buf.prn_bufo,offset buf0;;
									;;
 08CC  E9 0AE0 R			JMP	COMMON_INTR		;; common interrupt handler
									;;
 08CF				PRN_INITED :				;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
									;; FONT BUFFER TO BE CREATED ?
 08CF  2E: 83 3F 00			CMP	BUF.BFLAG,BF_PRN	;;
 08D3  75 12				JNE	PRN_MEM_DONE		;;
									;;
Microsoft (R) Macro Assembler Version 5.10                  5/17/24 09:44:02
DOS - Code Page Switching - Printer Device Driver           Page     1-39


 08D5  2E: 81 0F 8000			OR	BUF.BFLAG,BF_MEM_DONE	;; do it only once.
									;;
 08DA  2E: 83 7F 1A 01			CMP	BUF.STATE,CPSW		;;
 08DF  75 06				JNE	PRN_MEM_DONE		;; create only if state is CPSW
									;;
 08E1				PRN_MEM_CREATE :			;;
 08E1  33 C0				XOR	AX,AX			;; THEN CREATE
 08E3  2E: A3 083A R			MOV	MEM_REQUEST,AX		;; to set to zero only once for each
									;; LPTn or PRN
 08E7				PRN_MEM_DONE :				;;
 08E7  E9 0AE0 R			JMP	COMMON_INTR		;; common interrupt handler
									;;
				;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
				;;
				;; LPT1 Device "interrupt" entry point
				;;
				;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 08EA				INTERRUPT1 PROC FAR			;; device interrupt entry point
									;;
 08EA  1E				PUSH	DS			;; save all registers Revised
 08EB  06				PUSH	ES			;;
 08EC  50				PUSH	AX			;;
 08ED  53				PUSH	BX			;;
 08EE  51				PUSH	CX			;;
 08EF  52				PUSH	DX			;;
 08F0  57				PUSH	DI			;;
 08F1  56				PUSH	SI			;;
									;; BP isn't used, so it isn't saved
 08F2  0E				push	cs			;;
 08F3  1F				pop	ds			;;
									;;
 08F4  81 3E 0000 E 00AA		CMP	STACK_ALLOCATED,0AAH	;;
 08FA  75 31				JNE	LPT1_NO_STACK		;;
									;;
				;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
				;
				;	STACK RECODING SEPT 28/86
				;
				;	GORDON GIDDINGS
				;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 08FC  B8 0028				MOV	AX,STACK_SIZE		;G;
 08FF  D1 E0				SHL	AX,1			;G;
 0901  D1 E0				SHL	AX,1			;G;
 0903  D1 E0				SHL	AX,1			;G;
 0905  D1 E0				SHL	AX,1			;G;
 0907  2E: 89 36 068E R			MOV	CS:TEMP_SI,SI		;G;
 090C  8B 36 0000 E			MOV	SI,RESIDENT_END 	;G;
 0910  83 EE 28				SUB	SI,STACK_SIZE		;G;
									;G;
 0913  2E: A3 07DB R			mov	reserved1,AX		;G;
 0917  2E: 89 36 07DD R			mov	reserved2,SI		;G;
									;G;
 091C  FA				CLI				;G;
 091D  8C D2				MOV	DX,SS			;G;
Microsoft (R) Macro Assembler Version 5.10                  5/17/24 09:44:02
DOS - Code Page Switching - Printer Device Driver           Page     1-40


 091F  8B CC				MOV	CX,SP			;G;
 0921  8E D6				MOV	SS,SI			;G;
 0923  8B E0				MOV	SP,AX			;G;
 0925  FB				STI				;G;
 0926  2E: 8B 36 068E R			MOV	SI,CS:TEMP_SI		;G;
				;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 092B  52				PUSH	DX			;; SAVE OLD SS ONTO STACK
 092C  51				PUSH	CX			;; "    "   SP "    "
									;;
 092D				LPT1_NO_STACK : 			;;
									;;
 092D  BF 0B8F R			MOV	DI,OFFSET IRPT_CMD_EXIT ;; return addr from command processor
									;;
 0930  57				PUSH	DI			;; push return address onto stack
									;; command routine issues "RET"
 0931  8D 1E 009C R			LEA	BX, BUF1		;; LPT1 BUF = BUF1 , CS:BX
									;;
 0935  2E: C7 06 083A R FFFF		MOV	MEM_REQUEST,-1		;; to be set to zero only once
									;;
 093C  2E: 83 3F FF			CMP	BUF.BFLAG,-1		;;
 0940  75 27				JNE	LPT1_INITED		;;
									;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 0942  2E: C7 07 0001			MOV	BUF.BFLAG,BF_LPT1	;; INITIALIZE LPT1 BUFFER
									;;
 0947  BF 0012 R			MOV	DI,OFFSET DEV_HDR1	;; LPT1 Device header
 094A  2E: 89 7F 02			MOV	BUF.DEV_HDRO,DI 	;;
 094E  2E: 8C 4F 04			MOV	BUF.DEV_HDRS,CS 	;; must be CS
									;;....................................
 0952  8D 7F 12				LEA	DI,BUF.RNORMO		;; duplicate common infor. between
 0955  0E				PUSH	CS			;; PRN and LPT1
 0956  07				POP	ES			;;
 0957  8D 4F 50				LEA	CX,BUF.BUFEND		;;
 095A  2B CF				SUB	CX,DI			;;
 095C  8D 36 004A R			LEA	SI, BUF0		;;
 0960  8D 74 12				LEA	SI,[SI].RNORMO		;;
 0963  F3/ 2E: A4			REP	MOVS ES:BYTE PTR[DI],CS:[SI]
									;;
 0966  E9 0AE0 R			JMP	COMMON_INTR		;; common interrupt handler
									;;
 0969				LPT1_INITED :				;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
									;; FONT MEMORY TO BE CREATED ?
 0969  2E: 83 3F 01			CMP	BUF.BFLAG,BF_LPT1	;;
 096D  75 12				JNE	LPT1_MEM_DONE		;;
									;;
 096F  2E: 81 0F 8000			OR	BUF.BFLAG,BF_MEM_DONE	;; no more next time
									;;
 0974  2E: 83 7F 1A 01			CMP	BUF.STATE,CPSW		;;
 0979  75 06				JNE	LPT1_MEM_DONE		;; do it only if state is CPSW
									;;
 097B				LPT1_MEM_CREATE :			;;
 097B  33 C0				XOR	AX,AX			;; THEN CREATE MEMORY
 097D  2E: A3 083A R			MOV	MEM_REQUEST,AX		;; to set to zero only once for each
									;;
 0981				LPT1_MEM_DONE : 			;;
Microsoft (R) Macro Assembler Version 5.10                  5/17/24 09:44:02
DOS - Code Page Switching - Printer Device Driver           Page     1-41


									;;
 0981  E9 0AE0 R			JMP	COMMON_INTR		;; common interrupt handler
									;;
 0984				INTERRUPT1 ENDP 			;;
				;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
				;;
				;; LPT2 Device "interrupt" entry point
				;;
				;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 0984				INTERRUPT2 PROC FAR			;; device interrupt entry point
									;;
 0984  1E				PUSH	DS			;; save all registers Revised
 0985  06				PUSH	ES			;;
 0986  50				PUSH	AX			;;
 0987  53				PUSH	BX			;;
 0988  51				PUSH	CX			;;
 0989  52				PUSH	DX			;;
 098A  57				PUSH	DI			;;
 098B  56				PUSH	SI			;;
									;; BP isn't used, so it isn't saved
 098C  0E				push	cs			;;
 098D  1F				pop	ds			;;
									;;
 098E  81 3E 0000 E 00AA		CMP	STACK_ALLOCATED,0AAH	;;
 0994  75 31				JNE	LPT2_NO_STACK		;;
				;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
				;
				;	STACK RECODING SEPT 28/86
				;
				;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 0996  B8 0028				MOV	AX,STACK_SIZE		;G;
 0999  D1 E0				SHL	AX,1			;G;
 099B  D1 E0				SHL	AX,1			;G;
 099D  D1 E0				SHL	AX,1			;G;
 099F  D1 E0				SHL	AX,1			;G;
 09A1  2E: 89 36 068E R			MOV	CS:TEMP_SI,SI		;G;
 09A6  8B 36 0000 E			MOV	SI,RESIDENT_END 	;G;
 09AA  83 EE 28				SUB	SI,STACK_SIZE		;G;
									;G;
 09AD  2E: A3 07DB R			mov	reserved1,AX		;G;
 09B1  2E: 89 36 07DD R			mov	reserved2,SI		;G;
									;G;
 09B6  FA				CLI				;G;
 09B7  8C D2				MOV	DX,SS			;G;
 09B9  8B CC				MOV	CX,SP			;G;
 09BB  8E D6				MOV	SS,SI			;G;
 09BD  8B E0				MOV	SP,AX			;G;
 09BF  FB				STI				;G;
 09C0  2E: 8B 36 068E R			MOV	SI,CS:TEMP_SI		;G;
				;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 09C5  52				PUSH	DX			;; SAVE OLD SS ONTO STACK
 09C6  51				PUSH	CX			;; "    "   SP "    "
									;;
 09C7				LPT2_NO_STACK : 			;;
Microsoft (R) Macro Assembler Version 5.10                  5/17/24 09:44:02
DOS - Code Page Switching - Printer Device Driver           Page     1-42


									;;
 09C7  BF 0B8F R			MOV	DI,OFFSET IRPT_CMD_EXIT ;; return addr from command processor
									;;
 09CA  57				PUSH	DI			;; push return address onto stack
									;; command routine issues "RET"
									;;
 09CB  8D 1E 00EE R			LEA	BX, BUF2		;; LPT2 BUF = BUF2 , CS:BX
									;;
 09CF  2E: C7 06 083A R FFFF		MOV	MEM_REQUEST,-1		;; to be set to zero only once
									;;
 09D6  2E: 83 3F FF			CMP	BUF.BFLAG,-1		;;
 09DA  75 3B				JNE	LPT2_INITED		;;
									;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 09DC  2E: C7 07 0002			MOV	BUF.BFLAG,BF_LPT2	;; initialise LPT2 buffer
									;;
 09E1  BF 0024 R			MOV	DI,OFFSET DEV_HDR2	;; LPT2 Device header
 09E4  2E: 89 7F 02			MOV	BUF.DEV_HDRO,DI 	;;
 09E8  2E: 8C 4F 04			MOV	BUF.DEV_HDRS,CS 	;; must be CS
									;;
 09EC  BF 033C R			MOV	DI,OFFSET HBUF_SL2	;; LPT2 buffer for Hardware-slots
 09EF  2E: 89 7F 28			MOV	BUF.HRBUFO,DI		;;
									;;
 09F3  BF 0388 R			MOV	DI,OFFSET RBUF_SL2	;; LPT2 buffer for RAM-slots
 09F6  2E: 89 7F 32			MOV	BUF.RMBUFO,DI		;;
									;;
 09FA  BF 03D2 R			MOV	DI,OFFSET FTDL_OFF2	;;
 09FD  2E: 89 7F 3C			MOV	BUF.FTDLO,DI		;;
									;;
									;;
 0A01  BF 06AB R			MOV	DI,OFFSET REQ_NORM2	;; LPT2 request header
 0A04  2E: 89 7F 12			MOV	BUF.RNORMO,DI		;;
									;;
 0A08  2E: C7 47 3E 0000		MOV	BUF.FSELEN,0		;; selection control length
									;;
 0A0E  2E: C7 47 14 00EE R		mov	buf.prn_bufo,offset buf2;;
									;;
 0A14  E9 0AE0 R			JMP	COMMON_INTR		;; common interrupt handler
									;;
 0A17				LPT2_INITED :				;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
									;; FONT BUFFER TO BE CREATED ?
 0A17  2E: 83 3F 02			CMP	BUF.BFLAG,BF_LPT2	;;
 0A1B  75 12				JNE	LPT2_MEM_DONE		;;
									;;
 0A1D  2E: 81 0F 8000			OR	BUF.BFLAG,BF_MEM_DONE	;;
									;;
 0A22  2E: 83 7F 1A 01			CMP	BUF.STATE,CPSW		;;
 0A27  75 06				JNE	LPT2_MEM_DONE		;;
									;;
 0A29  33 C0				XOR	AX,AX			;;
 0A2B  2E: A3 083A R			MOV	MEM_REQUEST,AX		;; to set to zero only once for each
									;; LPTn or PRN
 0A2F				LPT2_MEM_DONE : 			;;
									;;
 0A2F  E9 0AE0 R			JMP	COMMON_INTR		;; common interrupt handler
Microsoft (R) Macro Assembler Version 5.10                  5/17/24 09:44:02
DOS - Code Page Switching - Printer Device Driver           Page     1-43


									;;
 0A32				INTERRUPT2 ENDP 			;;
				;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
				;;
				;; LPT3 Device "interrupt" entry point
				;;
				;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 0A32				INTERRUPT3 PROC FAR			;; device interrupt entry point
									;;
 0A32  1E				PUSH	DS			;; save all registers Revised
 0A33  06				PUSH	ES			;;
 0A34  50				PUSH	AX			;;
 0A35  53				PUSH	BX			;;
 0A36  51				PUSH	CX			;;
 0A37  52				PUSH	DX			;;
 0A38  57				PUSH	DI			;;
 0A39  56				PUSH	SI			;;
									;; BP isn't used, so it isn't saved
 0A3A  0E				push	cs			;;
 0A3B  1F				pop	ds			;;
									;;
 0A3C  81 3E 0000 E 00AA		CMP	STACK_ALLOCATED,0AAH	;;
 0A42  75 31				JNE	LPT3_NO_STACK		;;
									;;
				;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
				;
				;	STACK RECODING SEPT 28/86
				;
				;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 0A44  B8 0028				MOV	AX,STACK_SIZE		;G;
 0A47  D1 E0				SHL	AX,1			;G;
 0A49  D1 E0				SHL	AX,1			;G;
 0A4B  D1 E0				SHL	AX,1			;G;
 0A4D  D1 E0				SHL	AX,1			;G;
 0A4F  2E: 89 36 068E R			MOV	CS:TEMP_SI,SI		;G;
 0A54  8B 36 0000 E			MOV	SI,RESIDENT_END 	;G;
 0A58  83 EE 28				SUB	SI,STACK_SIZE		;G;
									;G;
 0A5B  2E: A3 07DB R			mov	reserved1,AX		;G;
 0A5F  2E: 89 36 07DD R			mov	reserved2,SI		;G;
									;G;
 0A64  FA				CLI				;G;
 0A65  8C D2				MOV	DX,SS			;G;
 0A67  8B CC				MOV	CX,SP			;G;
 0A69  8E D6				MOV	SS,SI			;G;
 0A6B  8B E0				MOV	SP,AX			;G;
 0A6D  FB				STI				;G;
 0A6E  2E: 8B 36 068E R			MOV	SI,CS:TEMP_SI		;G;
				;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 0A73  52				PUSH	DX			;; SAVE OLD SS ONTO STACK
 0A74  51				PUSH	CX			;; "    "   SP "    "
									;;
 0A75				LPT3_NO_STACK : 			;;
									;;
Microsoft (R) Macro Assembler Version 5.10                  5/17/24 09:44:02
DOS - Code Page Switching - Printer Device Driver           Page     1-44


 0A75  BF 0B8F R			MOV	DI,OFFSET IRPT_CMD_EXIT ;; return addr from command processor
									;;
 0A78  57				PUSH	DI			;; push return address onto stack
									;; command routine issues "RET"
									;;
 0A79  8D 1E 0140 R			LEA	BX, BUF3		;; LPT3 BUF = BUF3 , CS:BX
									;;
 0A7D  2E: C7 06 083A R FFFF		MOV	MEM_REQUEST,-1		;; to be set to zero only once
									;;
 0A84  2E: 83 3F FF			CMP	BUF.BFLAG,-1		;;
 0A88  75 3B				JNE	LPT3_INITED		;;
									;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 0A8A  2E: C7 07 0003			MOV	BUF.BFLAG,BF_LPT3	;; INITIALIZE LPT3 BUFFER
									;;
 0A8F  BF 0036 R			MOV	DI,OFFSET DEV_HDR3	;; LPT3 Device header
 0A92  2E: 89 7F 02			MOV	BUF.DEV_HDRO,DI 	;;
 0A96  2E: 8C 4F 04			MOV	BUF.DEV_HDRS,CS 	;; must be CS
									;;
 0A9A  BF 0356 R			MOV	DI,OFFSET HBUF_SL3	;; LPT3 buffer for Hardware-slots
 0A9D  2E: 89 7F 28			MOV	BUF.HRBUFO,DI		;;
									;;
 0AA1  BF 03A0 R			MOV	DI,OFFSET RBUF_SL3	;; LPT3 buffer for RAM-slots
 0AA4  2E: 89 7F 32			MOV	BUF.RMBUFO,DI		;;
									;;
 0AA8  BF 03EC R			MOV	DI,OFFSET FTDL_OFF3	;;
 0AAB  2E: 89 7F 3C			MOV	BUF.FTDLO,DI		;;
									;;
									;;
 0AAF  BF 06C6 R			MOV	DI,OFFSET REQ_NORM3	;; LPT3 request header
 0AB2  2E: 89 7F 12			MOV	BUF.RNORMO,DI		;;
									;;
 0AB6  2E: C7 47 3E 0000		MOV	BUF.FSELEN,0		;; selection control length
									;;
 0ABC  2E: C7 47 14 0140 R		mov	buf.prn_bufo,offset buf3;;
									;;
 0AC2  EB 1C 90				JMP	COMMON_INTR		;; common interrupt handler
									;;
 0AC5				LPT3_INITED :				;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
									;; FONT BUFFER TO BE CREATED ?
 0AC5  2E: 83 3F 03			CMP	BUF.BFLAG,BF_LPT3	;;
 0AC9  75 12				JNE	LPT3_MEM_DONE		;;
									;;
 0ACB  2E: 81 0F 8000			OR	BUF.BFLAG,BF_MEM_DONE	;; no more next time
									;;
 0AD0  2E: 83 7F 1A 01			CMP	BUF.STATE,CPSW		;;
 0AD5  75 06				JNE	LPT3_MEM_DONE		;;
									;;
 0AD7  33 C0				XOR	AX,AX			;;
 0AD9  2E: A3 083A R			MOV	MEM_REQUEST,AX		;; to set to zero only once for each
									;; LPTn or PRN
 0ADD				LPT3_MEM_DONE : 			;;
									;;
 0ADD  EB 01 90				JMP	COMMON_INTR		;; common interrupt handler
									;;
Microsoft (R) Macro Assembler Version 5.10                  5/17/24 09:44:02
DOS - Code Page Switching - Printer Device Driver           Page     1-45


 0AE0				INTERRUPT3 ENDP 			;;
				;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
				;
				; Common interrupt entry :
				;     at entry, BUFn (CS:BX) of LPTn is defined
				;
				;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 0AE0				COMMON_INTR :				;;
 0AE0  FC				CLD				;; all moves forward
				;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
				; Check if header link has to be set
				;
				;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 0AE1  2E: C5 77 02			LDS	SI,DWORD PTR BUF.DEV_HDRO ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
									;;  device header :  DS:[SI]
 0AE5  2E: 83 7F 06 FF			CMP	BUF.LPT_STRAO, -1	;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 0AEA  75 59				JNE	DOSLPT_FOUND		;; has been linked to DOS LPTn
 0AEC  2E: 83 7F 08 FF			CMP	BUF.LPT_STRAS, -1	;;
 0AF1  75 52				JNE	DOSLPT_FOUND		;; has been linked to DOS LPTn
 0AF3  2E: C5 77 02			LDS	SI,DWORD PTR BUF.DEV_HDRO ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
									;;  next device header :  ES:[DI]
 0AF7  C4 3C				LES	DI,DWORD PTR HP.DH_NEXTO ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
									;;
 0AF9  06				PUSH	ES			;;
 0AFA  58				POP	AX			;;
 0AFB  23 C0				AND	AX,AX			;;
 0AFD  75 03				JNZ	L1			;;
 0AFF  EB 44 90				JMP	DOSLPT_FOUND		;; link not yet set up
									;;
				;$SEARCH WHILE				 ;;  pointer to next device header is NOT
 0B02				L1:
 0B02  06				PUSH	ES			;;  -1
 0B03  58				POP	AX			;;
 0B04  3D FFFF				CMP	AX,-1			;;
				;$LEAVE  E,	 AND			 ;; leave if both offset and segment are
 0B07  75 05				JNE	NOT0FFFF
				
 0B09  83 FF FF				CMP	DI,-1			;;  0FFFFH
				;$LEAVE  E				 ;;
 0B0C  74 37				JE	L2
				
 0B0E				NOT0FFFF:				;;
 0B0E  57				PUSH	DI			;;
 0B0F  56				PUSH	SI			;;
 0B10  B9 0008				MOV	CX,NAME_LEN		;;
 0B13  8D 7D 0A				LEA	DI,NHD.DH_NAME		;;
 0B16  8D 74 0A				LEA	SI,HP.DH_NAME		;;
 0B19  F3/ A6				REPE	CMPSB			;;
 0B1B  5E				POP	SI			;;
 0B1C  5F				POP	DI			;;
 0B1D  23 C9				AND	CX,CX			;;
				
				;$EXITIF Z				 ;; exit if name is found in linked hd.
 0B1F  75 1F				JNZ	L3			;; name is not found
Microsoft (R) Macro Assembler Version 5.10                  5/17/24 09:44:02
DOS - Code Page Switching - Printer Device Driver           Page     1-46


									;;
									;; name is found in the linked header
 0B21  26: 8B 45 06			MOV	AX,NHD.DH_STRAO 	;;  get the STRATEGY address
				;	ADD	AX,DI			;;
 0B25  2E: 89 47 06			MOV	BUF.LPT_STRAO,AX	;;
 0B29  8C C0				MOV	AX,ES			;;
				;	JNC	X1			;;
				;	ADD	AX,1000H		;;  carrier overflow
 0B2B  2E: 89 47 08		X1:	MOV	BUF.LPT_STRAS,AX	;;
									;;
 0B2F  26: 8B 45 08			MOV	AX,NHD.DH_INTRO 	;;  get the INTERRUPT address
				;	ADD	AX,DI			;;
 0B33  2E: 89 47 0A			MOV	BUF.LPT_INTRO,AX	;;
 0B37  8C C0				MOV	AX,ES			;;
				;	JNC	X2			;;
				;	ADD	AX,1000H		;;  carrier overflow
 0B39  2E: 89 47 0C		X2:	MOV	BUF.LPT_INTRS,AX	;;
									;;
									;;
				;$ORELSE				;; find next header to have the same
									;; device name
 0B3D  EB 06 90				JMP	L4			;;
 0B40				L3:					;;
 0B40  26: C4 3D			LES	DI,DWORD PTR NHD.DH_NEXTO ;
									;;
				;$ENDLOOP				;;
 0B43  EB BD				JMP	L1			;;
 0B45				L2:					;;
				;$ENDSRCH				;;
 0B45				L4:					;;
									;;
 0B45				DOSLPT_FOUND :				;; device header link has been
									;; established
									;;
									;;
				;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
				;
				; COMMAND REQUEST
				;      ES:DI  Request Header , and
				;
				;	      CMD_CODES,  GIO_CODES
				;
				;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
									;;
									;;
 0B45  2E: C4 7F 0E			LES	DI,dword ptr buf.rh_ptro ;; get RH address passed to
									;;
 0B49  26: 8A 45 02			MOV	AL,RH.RHC_CMD		;;
 0B4D  3C 13				CMP	AL,CMD_GIO		;;
 0B4F  74 18				JE	GIO_COMMAND		;;
									;;
 0B51  0E				PUSH	CS			;;  non-GIO command
 0B52  07				POP	ES			;;
 0B53  BF 081F R			MOV	DI,OFFSET CMD_CODES	;;
Microsoft (R) Macro Assembler Version 5.10                  5/17/24 09:44:02
DOS - Code Page Switching - Printer Device Driver           Page     1-47


 0B56  B9 0004				MOV	CX,CMD_INDX		;;
									;; find if command is in CMD_CODES ?
 0B59  F2/ AE				REPNE	SCASB			;;
 0B5B  75 09				JNE	UN_SUP			;;
 0B5D  BE 0004				MOV	SI,CMD_INDX		;; the command is supported :
 0B60  2B F1				SUB	SI,CX			;;
 0B62  4E				DEC	SI			;; index to CASES
 0B63  EB 1D 90				JMP	SUPPORTED		;;
									;;
 0B66  EB 5E 90			UN_SUP: JMP	NORM_DRIVER		;; to be handled by DOS normal driver
									;;
 0B69				GIO_COMMAND :				;; Check if it is valid GIO
									;;
 0B69				GIO_CASES :				;; supported GIO command
 0B69  26: 8A 45 0E			MOV	AL,RH.GIH_MIF		;;
									;; use minor function to locate
 0B6D  0E				PUSH	CS			;;
 0B6E  07				POP	ES			;;
 0B6F  BF 0823 R			MOV	DI,OFFSET GIO_CODES	;;
 0B72  B9 0005				MOV	CX,GIO_INDX		;;
									;; find if command is in GIO_CODES ?
 0B75  F2/ AE				REPNE	SCASB			;;
 0B77  75 4D				JNE	NORM_DRIVER		;;
 0B79  BE 0005				MOV	SI,GIO_INDX		;; the command is supported :
 0B7C  2B F1				SUB	SI,CX			;;
 0B7E  4E				DEC	SI			;; index to CASES
 0B7F  83 C6 04				ADD	SI,CMD_INDX		;;
									;;
 0B82				SUPPORTED :				;; command/functions supported by LPTn
									;;
 0B82  03 F6				ADD	SI,SI			;; double to index to WORD-offset
									;;
 0B84  33 C0				XOR	AX,AX			;; initialize return to "no error"
									;;
 0B86  2E: C4 7F 0E			LES	DI,dword ptr buf.rh_ptro ;; get RH address again
									;;
				;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
				;  At entry to command processing routine:
				;
				;      ES:DI   = Request Header address
				;      CS:BX   = Buffer for lptn
				;      CS      = code segment address
				;      AX      = 0
				;
				;      top of stack is return address, IRPT_CMD_EXIT
				;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
									;;
 0B8A  2E: FF A4 0828 R			JMP	CS:CASES[SI]		;; call routine to handle the command
									;;
									;;
				;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
									;;
 0B8F				IRPT_CMD_EXIT:				;; return from command routine
									;; AX = value to OR into status word
Microsoft (R) Macro Assembler Version 5.10                  5/17/24 09:44:02
DOS - Code Page Switching - Printer Device Driver           Page     1-48


 0B8F  2E: C4 7F 0E			LES	DI,dword ptr buf.rh_ptro ;; restore ES:DI as Request Header ptr
 0B93  26: 8B 45 03			MOV	AX,RH.RHC_STA		;;
 0B97  80 CC 01				OR	AH,STAT_DONE		;; add "done" bit to status word
 0B9A  26: 89 45 03			MOV	RH.RHC_STA,AX		;; store status into request header
									;;
									;;
									;; *** USING INTERNATL STACK ? ***
									;;
 0B9E  83 3E 0000 E FF			CMP	STACK_ALLOCATED,-1	;;
 0BA3  74 18				JE	RET0_NO_STACK		;;
									;;
 0BA5  83 3E 0000 E 00			CMP	STACK_ALLOCATED,0	;;
 0BAA  75 09				JNE	RET0_IN_STACK		;;
									;;
 0BAC  C7 06 0000 E 00AA		MOV	STACK_ALLOCATED,0AAH	;; NEXT interrupt will start using
 0BB2  EB 09 90				JMP	RET0_NO_STACK		;; internal STACK
									;;
 0BB5				RET0_IN_STACK : 			;; use internal STACK !!!!
 0BB5  59				POP	CX		;get old SP from stack
 0BB6  5A				POP	DX		;get old SS from stack
 0BB7  FA				CLI			;disable interrupts while changing SS:SP
 0BB8  8E D2				MOV	SS,DX		;restore stack segment register
 0BBA  8B E1				MOV	SP,CX		;restore stack pointer register
 0BBC  FB				STI			;enable interrupts
									;;
									;;
 0BBD				RET0_NO_STACK : 			;;
									;;
 0BBD  5E				POP	SI			;; restore registers
 0BBE  5F				POP	DI			;;
 0BBF  5A				POP	DX			;;
 0BC0  59				POP	CX			;;
 0BC1  5B				POP	BX			;;
 0BC2  58				POP	AX			;;
 0BC3  07				POP	ES			;;
 0BC4  1F				POP	DS			;;
 0BC5  CB				RET				;;
									;;
 0BC6				INTERRUPT0 ENDP 			;;
									;;
									;;
				;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
				;;
				;;====	Command not supported by CPSW device driver
				;;
				;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
									;;
 0BC6				NORM_DRIVER PROC			;; LPT OUTPUT to the DOS LPTn
									;;
 0BC6  53				PUSH	BX			;; **** BUF. is changed ****
 0BC7  53				PUSH	BX			;;
 0BC8  5E				POP	SI			;;
 0BC9  2E: C4 5F 0E			LES	BX,DWORD PTR BUF.RH_PTRO ;; pass the request header to the
 0BCD  2E: FF 5C 06			CALL	DWORD PTR CS:[SI].LPT_STRAO ;; LPTn strategy routine.
Microsoft (R) Macro Assembler Version 5.10                  5/17/24 09:44:02
DOS - Code Page Switching - Printer Device Driver           Page     1-49


									;;
 0BD1  5B				POP	BX			;;
 0BD2  2E: FF 5F 0A			CALL	DWORD PTR BUF.LPT_INTRO ;; interrupt the DOS LPTn
 0BD6  C3				RET				;;
									;;
 0BD7				NORM_DRIVER ENDP			;;
									;;
									;;
				;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
				;;
				;;====	Command Code  - lpt_output  =======
				;;
				;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
									;;
 0BD7				WRITE	    PROC			;; LPT OUTPUT to the DOS LPTn
									;;
									;;
									;;
 0BD7  2E: C4 7F 0E			LES	DI,dword ptr buf.rh_ptro ;; restore ES:DI as Request Header ptr
									;;
 0BDB  2E: 8B 47 1A			MOV	AX,BUF.STATE		;;
 0BDF  3D 0000				CMP	AX,NORMAL		;;
 0BE2  75 03				JNE	WRT_NOT_NORMAL		;;
 0BE4  E9 0EF5 R			JMP	WRT_NORMAL		;;
									;;
 0BE7				WRT_NOT_NORMAL :			;;
 0BE7  3D 0003				CMP	AX,DESG_END		;;
 0BEA  75 03				JNE	WRT_FONT		;;
 0BEC  E9 0F05 R			JMP	NO_MORE_FTBLK		;; ignore the write
									;;
 0BEF				WRT_FONT :				;;
 0BEF  3D 0002				CMP	AX,DESG_WR		;;
 0BF2  74 03				JE	WRT_DESIGNATE		;;
 0BF4  E9 0EF5 R			JMP	WRT_NORMAL		;;
									;;-------------------------
 0BF7				WRT_DESIGNATE : 			;; DESIGNATE WRITE
 0BF7  2E: 8B 47 1C			MOV	AX,BUF.STATUS		;;
 0BFB  25 4000				AND	AX,FAIL 		;;
 0BFE  74 03				JZ	WRT_DESG_GOOD		;;
 0C00  E9 0EF8 R			JMP	WRT_IGNORE		;; already failed
									;;
 0C03				WRT_DESG_GOOD : 			;;
 0C03  BE 0000 E			MOV	SI,OFFSET FTABLE	;;
 0C06  0E				PUSH	CS			;;
 0C07  1F				POP	DS			;;
									;;
 0C08  C7 04 0000			MOV	DS:[SI].FLAG,0		;; no restart
 0C0C  26: 8B 45 12			MOV	AX,RH.RH3_CNT		;;
 0C10  89 44 02				MOV	DS:[SI].BUFFER_LEN,AX	;; length of request packet
									;;
 0C13  56				PUSH	SI			;;
 0C14  8D 74 04				LEA	SI,[SI].BUFFER_ADDR	;; packet address
 0C17  26: 8B 45 0E			MOV	AX,RH.RH3_DTAO		;;
 0C1B  89 04				MOV	DS:[SI],AX		;;
Microsoft (R) Macro Assembler Version 5.10                  5/17/24 09:44:02
DOS - Code Page Switching - Printer Device Driver           Page     1-50


 0C1D  46				INC	SI			;;
 0C1E  46				INC	SI			;;
 0C1F  26: 8B 45 10			MOV	AX,RH.RH3_DTAS		;;
 0C23  89 04				MOV	DS:[SI],AX		;;
 0C25  5E				POP	SI			;;
									;;
 0C26				FP_CALL :				;;   **************************
 0C26  E8 0000 E			CALL	FONT_PARSER		;;   ** Parse the Font File  **
 0C29				FP_RETURN :				;;   **************************
									;;
									;; -- only for the RAM slot --
									;;
									;; PROCESS THE RETURNED FONT :
									;; SI = FTABLE
 0C29  2E: 8E 47 38			MOV	ES,BUF.FTSTART		;; ES = the start of the font buffer,
									;;	its entry corresponds to the
									;;	positioning of codepage in slot
 0C2D  2E: 8B 7F 3A			MOV	DI,BUF.FTSLOTO		;; DI = start of the slot of codepages
									;; CX = slot size of the font downloaded
 0C31  2E: 8B 4F 30			MOV	CX,BUF.RBUFMX		;;     --- if there is no designate
 0C35  2E: 8B 47 1C			MOV	AX,BUF.STATUS		;;
 0C39  25 0001				AND	AX,DSF_CARTCP		;;
 0C3C  74 04				JZ	CHECK_RETURN		;;
 0C3E  2E: 8B 4F 20			MOV	CX,BUF.HSLMX		;;     -- with/without designate, <>0
									;;
 0C42				CHECK_RETURN :				;;
									;;
 0C42  2E: 8B 54 08			MOV	DX,CS:[SI].NUM_FTBLK	;; DX = number fo code pages loaded
									;;
 0C46  83 C6 0A				ADD	SI,TYPE FBUFS		;; SI = points to FTBLK
									;;...................................
 0C49				PARSE_FTBLK :				;; **** LOOP ****
									;;
									;;
 0C49  23 D2				AND	DX,DX			;;
 0C4B  75 03				JNZ	SKIP_SLOT		;;
 0C4D  E9 0F05 R			JMP	NO_MORE_FTBLK		;; **** LOOP EXIT (FTBLK end) ****
									;;...................................
									;; **** LOOP (on each FTBLK)  ****
									;;
									;; skip on the slot until the codepage
 0C50				SKIP_SLOT :				;; is one of the downloaded.
 0C50  23 C9				AND	CX,CX			;;
 0C52  75 07				JNZ	LOCATE_SLOT		;;
 0C54  33 C0				XOR	AX,AX			;;
 0C56  50				PUSH	AX			;;
 0C57  07				POP	ES			;; ES = 0, no font storage(less buffer)
 0C58  EB 19 90				JMP	SLOT_FOUND		;;
									;;
 0C5B				LOCATE_SLOT:				;;
 0C5B  2E: 8B 45 02			MOV	AX,CS:[DI].SLT_AT	;;
 0C5F  25 0100				AND	AX,AT_load		;;
 0C62  75 0F				Jnz	SLOT_FOUND		;;
 0C64  47				INC	DI			;;########   NEXT SLOT	 ############
Microsoft (R) Macro Assembler Version 5.10                  5/17/24 09:44:02
DOS - Code Page Switching - Printer Device Driver           Page     1-51


 0C65  47				INC	DI			;;
 0C66  47				INC	DI			;;
 0C67  47				INC	DI			;; next slot
 0C68  06				PUSH	ES			;;
 0C69  58				POP	AX			;;
 0C6A  2E: 03 47 34			ADD	AX,BUF.FTSZPA		;;
 0C6E  50				PUSH	AX			;;
 0C6F  07				POP	ES			;; next buffer
 0C70  49				DEC	CX			;;####################################
 0C71  EB DD				JMP	SKIP_SLOT		;;
									;;
 0C73				SLOT_FOUND :				;;
 0C73  2E: 8B 44 02			MOV	AX,CS:[SI].FTB_STATUS	;;
 0C77  3D FFF0				CMP	AX,0FFF0H		;;
 0C7A  73 11				JNB	CHECK_FSTAT		;;
									;;
 0C7C  2E: 81 4F 1C 4000		OR	BUF.STATUS,FAIL 	;;
									;;
 0C82  2E: C4 7F 0E			LES	DI,dword ptr buf.rh_ptro ;;
 0C86  26: 89 45 03			MOV	RH.RHC_STA,AX		;;
 0C8A  E9 0F0F R			JMP	WRITE_RET		;; **** LOOP EXIT (fail)  ****
									;;
 0C8D				CHECK_FSTAT :				;;
 0C8D  3D FFFE				CMP	AX,FSTAT_FONT		;;
 0C90  75 08				JNE	NEXT_FTBLK		;;
									;;
 0C92  2E: 8B 44 20			MOV	AX,CS:[SI].FTB_DLEN	;;
 0C96  23 C0				AND	AX,AX			;;
 0C98  75 13				JNZ	FONT_RETURNED		;;
									;;
 0C9A				NEXT_FTBLK :				;; **** NEXT IN LOOP ****
									;;
 0C9A  83 C6 2A				ADD	SI,TYPE FTBLK		;;  SI = points to FTBLK
 0C9D  4A				DEC	DX			;;
 0C9E  47				INC	DI			;;########   NEXT SLOT	 ############
 0C9F  47				INC	DI			;;
 0CA0  47				INC	DI			;;
 0CA1  47				INC	DI			;; next slot
 0CA2  06				PUSH	ES			;;
 0CA3  58				POP	AX			;;
 0CA4  2E: 03 47 34			ADD	AX,BUF.FTSZPA		;;
 0CA8  50				PUSH	AX			;;
 0CA9  07				POP	ES			;; next buffer
 0CAA  49				DEC	CX			;;####################################
 0CAB  EB 9C				JMP	PARSE_FTBLK		;;
									;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 0CAD				FONT_RETURNED : 			;;
									;;  *********************************
									;;  * ANY SELECTION CONTROL TO BE   *
									;;  * STORED ?			    *
									;;  *********************************
									;;
									;;
									;; SI = points to FTBLK
Microsoft (R) Macro Assembler Version 5.10                  5/17/24 09:44:02
DOS - Code Page Switching - Printer Device Driver           Page     1-52


									;; ES = font buffer segment / 0
									;; BX = LPT buffer
									;; DI = SLOT pointer
 0CAD  51				PUSH	CX			;;
									;;
									;;
 0CAE  2E: 8B 44 1A			MOV	AX,CS:[SI].FTB_SELECT	;;
 0CB2  23 C0				AND	AX,AX			;;
 0CB4  75 0E				JNZ	SELECT_NOT0		;;
 0CB6  2E: 83 7F 18 01			CMP	BUF.PCLASS,1		;;
 0CBB  75 03				JNE	SELECT_0		;;
 0CBD  E9 0E0E R			JMP	SELECT_BAD		;; CLASS 1 printer CANNOT have SELECT=0
									;;
 0CC0				SELECT_0:				;;
									;;
 0CC0  59				POP	CX			;;
 0CC1  E9 0E22 R			JMP	STORE_FONT		;;
									;;
 0CC4				SELECT_NOT0 :				;;
									;;
 0CC4  2E: 83 7F 18 01			CMP	BUF.PCLASS,1		;;
 0CC9  75 03				JNE	NOT_CLASS1		;;
 0CCB  E9 0D59 R			JMP	SELECT_CLASS1		;;
									;;
 0CCE				not_class1 :				;;
 0CCE  2E: 8B 44 1C			MOV	AX,CS:[SI].FTB_SELLEN	    ;; has this FTBLK already passed the
 0CD2  23 C0				AND	AX,AX			;; select ?
 0CD4  75 04				JNZ	SELECT_NOT_PASSED	;;
									;;
 0CD6  59				POP	CX			;;
 0CD7  E9 0E22 R			JMP	STORE_FONT		;;
									;;
 0CDA				SELECT_NOT_PASSED :			;;
 0CDA  2E: 3B 47 40			CMP	AX,BUF.FSELMAX		;;
 0CDE  76 03				JNA	SELECT_NOT_LONG 	;;
 0CE0  E9 0E0E R			JMP	SELECT_BAD		;; cannot be more than buffer size
									;;
									;;
 0CE3				SELECT_NOT_LONG :			;;
 0CE3  2E: 8B 44 1A			MOV	AX,CS:[SI].FTB_SELECT	    ;;
 0CE7  3D 0001				CMP	AX,1			;;
 0CEA  74 03				JE	SELECT_1		;;
 0CEC  E9 0E0E R			JMP	SELECT_BAD		;;
									;;
 0CEF				SELECT_1 :				;;
 0CEF  2E: 8B 4F 3E			MOV	CX,BUF.FSELEN		;; +++ SELECT = 1 +++
 0CF3  23 C9				AND	CX,CX			;;
 0CF5  74 0C				JZ	CTL_NOT_COPIED		;;
 0CF7  2E: 8B 45 02			MOV	AX,CS:[DI].SLT_AT	;; == copy control only from one FTBLK
 0CFB  25 0400				AND	AX,AT_SELECT		;;
 0CFE  75 03				JNZ	CTL_NOT_COPIED		;;
 0D00  E9 0DF0 R			JMP	SKIP_SELECT		;;
									;;
 0D03				CTL_NOT_COPIED :			;;
Microsoft (R) Macro Assembler Version 5.10                  5/17/24 09:44:02
DOS - Code Page Switching - Printer Device Driver           Page     1-53


									;;
 0D03  2E: 81 4D 02 0400		OR	CS:[DI].SLT_AT,AT_SELECT;; the FTBLK where control is copied
									;; from
									;;
 0D09  2E: 8B 4C 1C			MOV	CX,CS:[SI].FTB_SELLEN	    ;;
 0D0D  2E: 3B 4C 20			CMP	CX,CS:[SI].FTB_DLEN	    ;;
 0D11  76 04				JNA	STORE_SELECT		;;
									;;
 0D13  2E: 8B 4C 20			MOV	CX,CS:[SI].FTB_DLEN	    ;;
									;;
 0D17				STORE_SELECT:				;;
 0D17  51				PUSH	CX			;; CX is the length to be copied.
									;;
 0D18  06				PUSH	ES			;;
 0D19  1E				PUSH	DS			;;
 0D1A  56				PUSH	SI			;;
 0D1B  57				PUSH	DI			;;
									;;
 0D1C  2E: 8B 44 24			MOV	AX,CS:[SI].FTB_DAHI	    ;;
 0D20  50				PUSH	AX			;;
 0D21  1F				POP	DS			;;
 0D22  2E: 8B 74 22			MOV	SI,CS:[SI].FTB_DALO	    ;;
									;;
 0D26  0E				PUSH	CS			;;
 0D27  07				POP	ES			;;
									;;
 0D28  2E: 8B 7F 1E			MOV	DI,BUF.PDESCO		;;
 0D2C  2E: 8B 7D 1A			MOV	DI,CS:[DI].SELB_O	;;
 0D30  2E: 03 7F 3E			ADD	DI,BUF.FSELEN		;;
									;;
 0D34  F3/ A4				REP	MOVSB			;;
									;;
									;;
 0D36  5F				POP	DI			;;
 0D37  5E				POP	SI			;;
 0D38  1F				POP	DS			;;
 0D39  07				POP	ES			;;
									;;
 0D3A  59				POP	CX			;;
 0D3B  2E: 29 4C 20			SUB	CS:[SI].FTB_DLEN,CX	    ;;
 0D3F  2E: 29 4C 1C			SUB	CS:[SI].FTB_SELLEN,CX	    ;; == less control bytes to be copied
 0D43  2E: 01 4C 22			ADD	CS:[SI].FTB_DALO,CX	;;
 0D47  2E: 01 4F 3E			ADD	BUF.FSELEN,CX		;;
									;;
 0D4B  59				POP	CX			;;
									;;
									;; any data left for font ?
 0D4C  2E: 83 7F 18 01			CMP	BUF.PCLASS,1		;;
 0D51  75 03				JNE	MORE_FONT		;;
									;;
 0D53  E9 0C9A R			JMP	NEXT_FTBLK		;; == CLASS 1 printer ingnores fonts
									;;
 0D56				MORE_FONT :				;; more font data ?
									;;
Microsoft (R) Macro Assembler Version 5.10                  5/17/24 09:44:02
DOS - Code Page Switching - Printer Device Driver           Page     1-54


 0D56  E9 0E22 R			JMP	STORE_FONT		;;
									;;
 0D59				SELECT_CLASS1:				;;  +++ PRINTER CLASS = 1
									;;
 0D59  2E: 8B 44 1A			MOV	AX,CS:[SI].FTB_SELECT	    ;;
 0D5D  3D 0002				CMP	AX,2			;;
 0D60  74 03				JE	GOOD_CLASS1		;;
 0D62  E9 0E0E R			JMP	SELECT_BAD		;;
									;;  select type = 2 only
 0D65				GOOD_CLASS1 :				;;
 0D65  59				POP	CX			;;
									;;
 0D66  06				PUSH	ES			;; STACKS...
 0D67  52				PUSH	DX			;;
 0D68  57				PUSH	DI			;;
 0D69  8B C7				MOV	AX,DI			;;
 0D6B  2E: 2B 47 3A			SUB	AX,BUF.FTSLOTO		;;
 0D6F  D1 E8				SHR	AX,1			;;
 0D71  50				PUSH	AX			;; stack 1 -- offest
 0D72  2E: 8B 7F 3C			MOV	DI,BUF.FTDLO		;;
 0D76  03 F8				ADD	DI,AX			;;
									;;
 0D78  2E: 8B 05			MOV	AX,CS:WORD PTR [DI]	;; length copied to font buffer
									;;
 0D7B  5A				POP	DX			;; stack -1
 0D7C  D1 EA				SHR	DX,1			;;
 0D7E  57				PUSH	DI			;; STACK +1 -- to font buffer length
 0D7F  2E: 8B 7F 38			MOV	DI,BUF.FTSTART		;;
 0D83				CTL_ADDR :				;;
 0D83  23 D2				AND	DX,DX			;;
 0D85  74 07				JZ	CTL_LOCATED		;;
 0D87  2E: 03 7F 34			ADD	DI,BUF.FTSZPA		;;
 0D8B  4A				DEC	DX			;;
 0D8C  75 F5				JNZ	CTL_ADDR		;;
									;;
 0D8E				CTL_LOCATED :				;;
 0D8E  57				PUSH	DI			;;
 0D8F  07				POP	ES			;;
 0D90  33 FF				XOR	DI,DI			;; start of the font buffer
 0D92  2E: 8B 4C 1C			MOV	CX,CS:[SI].FTB_SELLEN	;;
 0D96  23 C0				AND	AX,AX			;;
 0D98  75 04				JNZ	HASBEEN_COPIED		;;
 0D9A  26: 88 0D			MOV	ES:BYTE PTR [DI],CL	;; 1st byte is the length
 0D9D  40				INC	AX			;;
									;;
 0D9E				HASBEEN_COPIED :			;;
									;;
 0D9E  03 F8				ADD	DI,AX			;;
 0DA0  48				DEC	AX			;;
 0DA1  3B C1				CMP	AX,CX			;; all copied ?
 0DA3  72 13				JB	COPY_SELECT		;;
									;;
 0DA5  5F				POP	DI			;; STACK -1
									;;
Microsoft (R) Macro Assembler Version 5.10                  5/17/24 09:44:02
DOS - Code Page Switching - Printer Device Driver           Page     1-55


 0DA6  5F				POP	DI			;; STACKS...
 0DA7  5A				POP	DX			;;
 0DA8  07				POP	ES			;;
 0DA9  2E: 8B 4C 20			MOV	CX,CS:[SI].FTB_DLEN	;; all font data for this code page is
 0DAD  2E: 29 4C 20			SUB	CS:[SI].FTB_DLEN,CX	;; discarded
 0DB1  2E: 01 4C 22			ADD	CS:[SI].FTB_DALO,CX	;;
									;;
 0DB5  E9 0C9A R			JMP	NEXT_FTBLK		;;
									;;
 0DB8				COPY_SELECT :				;;
									;;
 0DB8  2B C8				SUB	CX,AX			;;
 0DBA  2E: 3B 4C 20			CMP	CX,CS:[SI].FTB_DLEN	;;
 0DBE  76 04				JNA	FONT_SELECT		;;
									;;
 0DC0  2E: 8B 4C 20			MOV	CX,CS:[SI].FTB_DLEN	;;
									;;
 0DC4				FONT_SELECT :				;;
									;;
 0DC4  51				PUSH	CX			;;  STACK +2
									;;
 0DC5  1E				PUSH	DS			;;  STACK +3
 0DC6  56				PUSH	SI			;;  STACK +4
									;;
 0DC7  2E: 8B 44 24			MOV	AX,CS:[SI].FTB_DAHI	;;
 0DCB  50				PUSH	AX			;;
 0DCC  1F				POP	DS			;;
 0DCD  2E: 8B 74 22			MOV	SI,CS:[SI].FTB_DALO	;;
									;;
 0DD1  57				PUSH	DI			;; STACK +5
									;;
 0DD2  F3/ A4				REP	MOVSB			;;
									;;
 0DD4  5F				POP	DI			;; STACK -5
 0DD5  5E				POP	SI			;; STACK -4
 0DD6  1F				POP	DS			;; STACK -3
									;;
 0DD7  59				POP	CX			;; STACK -2
 0DD8  03 CF				ADD	CX,DI			;;
 0DDA  5F				POP	DI			;; STACK -1
 0DDB  2E: 89 0D			MOV	CS:WORD PTR [DI],CX	;;
									;;
 0DDE  2E: 8B 4C 20			MOV	CX,CS:[SI].FTB_DLEN	;; all font data for this code page is
 0DE2  2E: 29 4C 20			SUB	CS:[SI].FTB_DLEN,CX	;; discarded
 0DE6  2E: 01 4C 22			ADD	CS:[SI].FTB_DALO,CX	;;
									;;
 0DEA  5F				POP	DI			;;
 0DEB  5A				POP	DX			;;
 0DEC  07				POP	ES			;;
									;;
 0DED  E9 0C9A R			JMP	NEXT_FTBLK		;;
									;;
									;;
 0DF0				SKIP_SELECT :				;; ++ SKIP SELECT ++
Microsoft (R) Macro Assembler Version 5.10                  5/17/24 09:44:02
DOS - Code Page Switching - Printer Device Driver           Page     1-56


									;;
 0DF0  2E: 8B 4C 1C			MOV	CX,CS:[SI].FTB_SELLEN	;;
 0DF4  2E: 3B 4C 20			CMP	CX,CS:[SI].FTB_DLEN	;;
 0DF8  76 04				JNA	SKIP_ALL_SELLEN 	;;
 0DFA  2E: 8B 4C 20			MOV	CX,CS:[SI].FTB_DLEN	;;
									;;
 0DFE				SKIP_ALL_SELLEN :			;;
 0DFE  2E: 29 4C 20			SUB	CS:[SI].FTB_DLEN,CX	;;
 0E02  2E: 29 4C 1C			SUB	CS:[SI].FTB_SELLEN,CX	;; == less control bytes to be skipped
 0E06  2E: 01 4C 22			ADD	CS:[SI].FTB_DALO,CX	;;
									;;
 0E0A  59				POP	CX			;;
 0E0B  EB 15 90				JMP	STORE_FONT		;;
									;;
 0E0E				SELECT_BAD :				;; ++ BAD SELECT ++
									;;
 0E0E  59				POP	CX			;;
									;;
 0E0F  2E: C4 7F 0E			LES	DI,dword ptr buf.rh_ptro ;;
 0E13  26: C7 45 03 800C		MOV	RH.RHC_STA,STAT_BADATA	;;
									;;
 0E19  2E: 81 4F 1C 4000		OR	BUF.STATUS,FAIL 	;;
									;;
 0E1F  E9 0F0F R			JMP	WRITE_RET		;;
									;;
									;;
									;; *************************************
									;; * FONT TO BE STORED OR DOWNLOADED ? *
									;; *************************************
									;;
									;; SI = points to FTBLK
									;; ES = font buffer segment / 0
									;; BX = LPT buffer
									;; DI = SLOT pointer
 0E22				STORE_FONT :				;;
									;;
 0E22  2E: 83 7C 20 00			CMP	CS:[SI].FTB_DLEN,0	;; any font data left ?
 0E27  75 03				JNZ	HAS_FONT_DATA		;;
 0E29  E9 0C9A R			JMP	NEXT_FTBLK		;;
									;;
 0E2C				HAS_FONT_DATA : 			;;
 0E2C  06				PUSH	ES			;;
 0E2D  58				POP	AX			;;
 0E2E  23 C0				AND	AX,AX			;;
 0E30  75 03				JNZ	STORE_FONT_BUFFER	;;
 0E32  EB 62 90				JMP	FONT_DOWNLOAD		;;
									;;
									;;
									;;
 0E35				STORE_FONT_BUFFER :			;; *****************************
 0E35  57				PUSH	DI			;; **  STORE TO FONT BUFFER   **
									;; *****************************
 0E36  51				PUSH	CX			;;
 0E37  1E				PUSH	DS			;;  ES = font buffer segment
Microsoft (R) Macro Assembler Version 5.10                  5/17/24 09:44:02
DOS - Code Page Switching - Printer Device Driver           Page     1-57


									;;
									;; -- determine where is the infor :
 0E38  8B C7				MOV	AX,DI			;;
 0E3A  2E: 2B 47 3A			SUB	AX,BUF.FTSLOTO		;; relative to the start of the slot
 0E3E  D1 E8				SHR	AX,1			;; ''       ''  '' "     of FTDL_OFF
									;;
									;;
 0E40  2E: 03 47 3C			ADD	AX,BUF.FTDLO		;;
 0E44  8B F8				MOV	DI,AX			;;
									;;
									;;...................................
 0E46  2E: 8B 4C 20			MOV	CX,CS:[SI].FTB_DLEN	;; length of font data
									;;
 0E4A  2E: 8B 05			MOV	AX,CS:WORD PTR [DI]	;; current destination
									;;
 0E4D  03 C1				ADD	AX,CX			;;
 0E4F  50				PUSH	AX			;; STACK A (next destination)
									;;
 0E50  2E: 03 44 1E			ADD	AX,CS:[SI].FTB_DLEFT	;; enough room in font buffer ?
 0E54  2E: 3B 47 36			CMP	AX,BUF.FTSIZE		;;
 0E58  76 17				JNA	ROOM_FOR_FONT		;;
									;;
 0E5A  58				POP	AX			;; STACK A
 0E5B  1F				POP	DS			;;
 0E5C  59				POP	CX			;; **** LOOP EXIT (no room) ****
 0E5D  5F				POP	DI			;;
									;;
 0E5E  2E: C4 7F 0E			LES	DI,dword ptr buf.rh_ptro ;;
 0E62  26: C7 45 03 800C		MOV	RH.RHC_STA,STAT_BADATA	;;
									;;
 0E68  2E: 81 4F 1C 4000		OR	BUF.STATUS,FAIL 	;;
									;;
 0E6E  E9 0F0F R			JMP	WRITE_RET		;;
									;;
 0E71				ROOM_FOR_FONT : 			;;
									;;
 0E71  57				PUSH	DI			;; STACK B
									;;
 0E72  2E: 8B 3D			MOV	DI,CS:WORD PTR [DI]	;; current destination
									;;
 0E75  56				PUSH	SI			;; STACK C
 0E76  1E				PUSH	DS			;; STACK D
									;;
 0E77  2E: 8B 44 24			MOV	AX,CS:[SI].FTB_DAHI	;;
 0E7B  50				PUSH	AX			;;
 0E7C  1F				POP	DS			;; source : FTB_DA
 0E7D  2E: 8B 74 22			MOV	SI,CS:[SI].FTB_DALO	;;
									;;
 0E81  F3/ A4				REP	MOVSB			;;
									;;
 0E83  1F				POP	DS			;; STACK D
 0E84  5E				POP	SI			;; STACK C
 0E85  5F				POP	DI			;; STACK B
 0E86  58				POP	AX			;; STACK A
Microsoft (R) Macro Assembler Version 5.10                  5/17/24 09:44:02
DOS - Code Page Switching - Printer Device Driver           Page     1-58


 0E87  2E: 89 05			MOV	CS:WORD PTR [DI],AX	;; next detination/current length
									;;
 0E8A  1F				POP	DS			;;
 0E8B  59				POP	CX			;;
 0E8C  5F				POP	DI			;;
									;;
 0E8D  2E: 81 4D 02 0200		OR	CS:[DI].SLT_AT,AT_FONT	;; font buffer has been overwritten
									;;
 0E93  E9 0C9A R			JMP	NEXT_FTBLK		;;
									;;
 0E96				FONT_DOWNLOAD : 			;; ***********************************
									;; *  DOWNLOAD FONT TO THE DEVICE :  *
 0E96  06				PUSH	ES			;; ***********************************
 0E97  57				PUSH	DI			;;
 0E98  2E: C4 7F 0E			LES	DI,dword ptr buf.rh_ptro ;; -- the logic can only support one
									;;     physical device slot that can be
									;;     downloaded.)
 0E9C  2E: 8B 44 20			MOV	AX,CS:[SI].FTB_DLEN	;;
 0EA0  26: 89 45 12			MOV	RH.RH3_CNT,AX		;;
 0EA4  2E: 8B 44 22			MOV	AX,CS:[SI].FTB_DALO	;;
 0EA8  26: 89 45 0E			MOV	RH.RH3_DTAO,AX		;;
 0EAC  2E: 8B 44 24			MOV	AX,CS:[SI].FTB_DAHI	;;
 0EB0  26: 89 45 10			MOV	RH.RH3_DTAS,AX		;;
									;;
 0EB4  26: C6 45 02 08			MOV	RH.RHC_CMD,CMD_WRT	;; 06/25 MODE.COM
									;;
 0EB9  56				PUSH	SI			;;
 0EBA  06				PUSH	ES			;;
 0EBB  53				PUSH	BX			;; **** BUF. is changed ****
 0EBC  53				PUSH	BX			;;
 0EBD  5E				POP	SI			;;
 0EBE  2E: C4 5F 0E			LES	BX,DWORD PTR BUF.RH_PTRO ;; pass the request header to the
									;;
 0EC2				FDL_CALL_STR :				;;
 0EC2  2E: FF 5C 06			CALL	DWORD PTR CS:[SI].LPT_STRAO ;; LPTn strategy routine.
 0EC6  5B				POP	BX			;;
 0EC7  07				POP	ES			;;
 0EC8  5E				POP	SI			;;
									;;
 0EC9				FDL_CALL_ITR :				;;
 0EC9  2E: FF 5F 0A			CALL	DWORD PTR BUF.LPT_INTRO ;; interrupt the DOS LPTn
									;;
 0ECD				FDL_ITR_RETURN :			;;
 0ECD  26: 8B 45 03			MOV	AX,rh.RHC_STA		;;
									;;
 0ED1  25 8000				and	ax,stat_error		;;
 0ED4  74 07				jz	fdl_good1		;;
 0ED6  B8 800A				mov	ax,stat_deverr		;;
 0ED9  26: 89 45 03			mov	rh.rhc_sta,ax		;;
									;;
 0EDD				fdl_good1 :				;;
 0EDD  5F				POP	DI			;;
 0EDE  07				POP	ES			;;
									;;
Microsoft (R) Macro Assembler Version 5.10                  5/17/24 09:44:02
DOS - Code Page Switching - Printer Device Driver           Page     1-59


 0EDF  25 8000				AND	AX,STAT_ERROR		;; any error returned by normal device?
 0EE2  75 08				JNZ	FDL_BAD 		;;
 0EE4  2E: 83 4D 02 01			OR	CS:[DI].SLT_AT,AT_RAM1	;;
 0EE9  E9 0C9A R			JMP	NEXT_FTBLK		;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
									;;
 0EEC				FDL_BAD :				;; **** LOOP EXIT (bad) ****
 0EEC  2E: 81 4F 1C 4000		OR	BUF.STATUS,FAIL 	;;
									;;
 0EF2  EB 1B 90				JMP	WRITE_RET		;;
									;;
 0EF5				WRT_NORMAL :				;;
									;;
 0EF5  E9 0BC6 R			JMP	NORM_DRIVER		;;
									;;
 0EF8				WRT_ignore :				;;
									;;
 0EF8  2E: C4 7F 0E			LES	DI,dword ptr buf.rh_ptro ;;
 0EFC  26: C7 45 03 800A		MOV	RH.RHC_STA,STAT_DEVERR	;;
 0F02  EB 0B 90				JMP	WRITE_RET		;;
									;;
 0F05				NO_MORE_FTBLK : 			;;
									;;
 0F05  2E: C4 7F 0E			LES	DI,dword ptr buf.rh_ptro ;;
 0F09  26: C7 45 03 0000		MOV	RH.RHC_STA,0		;;
									;;
 0F0F				WRITE_RET :				;;
 0F0F  C3				RET				;;
									;;
 0F10				WRITE	    ENDP			;;
									;;
				;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
				;;
				;;====	Generic IOCTL Designate Start  ======
				;;
				;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 0F10				DESIGNATE_START PROC			;;
 0F10  2E: 8B 47 1A			MOV	AX,BUF.STATE		;;
 0F14  3D 0000				CMP	AX,NORMAL		;;
 0F17  75 03				JNE	DS_00			;G; ALL OF THESE EXTRA JUMPS ARE
 0F19  EB 7B 90				JMP	DST_NORMAL		;;  DUE TO SIZE OF FOLLOWING CODE!!!!!
 0F1C  3D 0001			DS_00:	CMP	AX,CPSW 		;; WGR						 ;AN000;
 0F1F  74 08				JE	DS_01			;G;
 0F21  3D 0004				CMP	AX,LOCKED		;; WGR						 ;AN000;
 0F24  74 08				JE	DS_03			;; WGR						 ;AN000;
 0F26  EB 79 90				JMP	DST_CMDERR		;G;
				
 0F29  E8 18B9 R		DS_01:	CALL	CHECK_PRINT_ACTIVE	;G; THIS WILL FIND OUT IF THE
 0F2C  73 03				JNC	DS_02			;G;
 0F2E				DS_03:					;; WGR						 ;AN000;
 0F2E  EB 6B 90				JMP	DST_DEVERR		;G; PRINT.COM IS ACTIVE, CY=1 MEANS YES
									;G;
 0F31  26: C5 75 13		DS_02:	LDS	SI,RH.GIH_GBA		;; GIOB = DS:[SI]
 0F35  8B 04				MOV	AX,GIOB.GB1_FLAG	;;
 0F37  25 0001				AND	AX,DSF_CARTCP		;;
Microsoft (R) Macro Assembler Version 5.10                  5/17/24 09:44:02
DOS - Code Page Switching - Printer Device Driver           Page     1-60


 0F3A  75 5F				JNZ	dst_deverr		;; DO NOT SUPPORT CARTRIDGE FLAG !!!!
									;;
									;; ******************************
									;; **  DESIGNATE / REFRESH  ?  **
									;; ******************************
									;; check the LENGTH in BUFFER1
									;;
 0F3C  8B 4C 02				MOV	CX,GIOB.GB1_LEN 	;;
 0F3F  23 C9				AND	CX,CX			;;
 0F41  75 0A				JNZ	DST_NOT_NULL		;;
									;;
 0F43  2E: C7 06 0048 R FEFE		mov  cs:init_chk,0fefeh 	;;
									;;
 0F4A  E9 11D7 R			JMP	DST_REFRESH		;; null lenght ==> refresh
									;;
 0F4D				DST_NOT_NULL :				;;
 0F4D  8B C1				MOV	AX,CX			;;
 0F4F  D1 E8				SHR	AX,1			;; divide by 2
 0F51  8B C8				MOV	CX,AX			;;
 0F53  B8 8003				MOV	AX,STAT_CMDERR		;; error if LEN < 2
 0F56  23 C9				AND	CX,CX			;;
 0F58  74 4A				JZ	DST_RET 		;;
 0F5A  49				DEC	CX			;;
 0F5B  75 14				JNZ	NO_REFRESH		;;
									;;
 0F5D  8B 44 04				MOV	AX,GIOB.GB1_NUM 	;;
 0F60  23 C0				AND	AX,AX			;;
 0F62  B8 800C				MOV	AX,STAT_BADATA		;;
 0F65  75 3D				JNZ	DST_RET 		;; error, as no code pages followed
									;;
 0F67  2E: C7 06 0048 R FFEE		mov  cs:init_chk,0ffeeh 	;;
									;;
									;;
 0F6E  E9 11D7 R			JMP	DST_REFRESH		;; null length => REFRESH font from
									;;		  font buffer to device
									;; *********************************
									;; **  DESIGNATE FOR CARTRIDGE ?  **
 0F71				NO_REFRESH :				;; *********************************
									;; CX = number of codepages designated
 0F71  2E: 83 7F 18 01			CMP	BUF.PCLASS,1		;;  CLASS 1 Printer ?
 0F76  75 03				JNE	DST_RAM 		;;
 0F78  EB 2D 90				JMP	DST_CART		;;
									;;
 0F7B				DST_RAM :				;;
									;;
 0F7B  B8 0001				MOV	AX,DSF_CARTCP		;; RAM-code pages
 0F7E  F7 D0				NOT	AX			;;
 0F80  2E: 21 47 1C			AND	BUF.STATUS,AX		;; not CARTCP
 0F84  2E: 8B 7F 32			MOV	DI,BUF.RMBUFO		;; DI
 0F88  2E: 8B 57 2A			MOV	DX,BUF.RSLMX		;; DX = number of designate allowed
									;;	(limited by available slots)
 0F8C  B8 800A				MOV	AX,STAT_TOMANY		;;
 0F8F  3B CA				CMP	CX,DX			;; more codepages than supported ?
 0F91  77 11				JA	DST_RET 		;;
Microsoft (R) Macro Assembler Version 5.10                  5/17/24 09:44:02
DOS - Code Page Switching - Printer Device Driver           Page     1-61


									;;
 0F93  EB 2E 90				JMP	DST_DESIGNATE		;;
									;;
 0F96				DST_NORMAL :				;;
 0F96  0E				push	cs			;;
 0F97  1F				pop	ds			;;
 0F98  E9 0BC6 R			JMP	NORM_DRIVER		;;
									;;
 0F9B				DST_DEVERR :				;;
 0F9B  B8 800A				MOV	AX,STAT_DEVERR		;;
 0F9E  EB 04 90				JMP	DST_RET 		;G;
									;;
 0FA1				DST_CMDERR :				;G;
 0FA1  B8 8003				MOV	AX,STAT_CMDERR		;G;
 0FA4				DST_RET :				;;
 0FA4  E9 1270 R			JMP	DST_RETURN		;;
									;;
 0FA7				DST_CART:				;;
 0FA7  B8 0001				MOV	AX,DSF_CARTCP		;; Hardware code pages
 0FAA  2E: 09 47 1C			OR	BUF.STATUS,AX		;;
 0FAE  2E: 8B 7F 28			MOV	DI,BUF.HRBUFO		;; DI
 0FB2  2E: 8B 57 20			MOV	DX,BUF.HSLMX		;; DX = number of slots available
 0FB6  8B C2				MOV	AX,DX			;;
 0FB8  2E: 2B 47 22			SUB	AX,BUF.HARDMX		;; no. of designate allowed
									;;
 0FBC  3B C8				CMP	CX,AX			;; more codepages than supported ?
 0FBE  B8 800A				MOV	AX,STAT_TOMANY		;;
 0FC1  77 E1				JA	DST_RET 		;;
				;;---------------------------------------------------------------------------
									;; *************************************
 0FC3				DST_DESIGNATE : 			;; * any duplicated codepages in MODE ?*
									;; * define the slot-buffer	       *
									;; *************************************
									;;
									;; -- Use the buffer to hold the code
									;;    page value in the MODE with the
									;;    position correspondence :
									;; 1. reset the buffer to all 0FFFFH
									;; 2. if the code page in MODE does not
									;;    replicate with any in the buffer,
									;;    then store the code page value in
									;;    the buffer.
									;; 3. proceed to the next code page in
									;;    the MODE to check with what is
									;;    already copied to the buffer.
									;; 4. designate will fail if there is a
									;;    replication : i.e. a repetition
									;;    in the MODE command.
									;; 5. skip the buffer corresponding to
									;;    HWCP codepages
									;;-------------------------------------
									;;
 0FC3  57				PUSH	DI			;; (the start of RAM/Hardware buffer)
 0FC4  52				PUSH	DX			;; count of buffer size
Microsoft (R) Macro Assembler Version 5.10                  5/17/24 09:44:02
DOS - Code Page Switching - Printer Device Driver           Page     1-62


 0FC5  B8 FFFF				MOV	AX,0FFFFH		;;
 0FC8				RESET_BUF:				;;
 0FC8  2E: 89 05			MOV	CS:[DI],AX		;; reset all buffer to 0FFFFH
 0FCB  47				INC	DI			;;
 0FCC  47				INC	DI			;;
 0FCD  4A				DEC	DX			;;
 0FCE  75 F8				JNZ	RESET_BUF		;;
 0FD0  5A				POP	DX			;;
 0FD1  5F				POP	DI			;;
									;;
 0FD2  53				PUSH	BX			;;
 0FD3  57				PUSH	DI			;; (the start of RAM/Hardware buffer)
 0FD4  52				PUSH	DX			;; count of buffer size
 0FD5  56				PUSH	SI			;; first code page in GB1
 0FD6  51				PUSH	CX			;; number of codepages in GB1
									;;
 0FD7  56				PUSH	SI			;;
									;;
 0FD8  2E: 8B 47 1C			MOV	AX,BUF.STATUS		;;
 0FDC  25 0001				AND	AX,DSF_CARTCP		;;
 0FDF  74 15				JZ	FILL_BUFFER		;;
									;;  for cartridge designation
 0FE1  2E: 8B 77 24			MOV	SI,BUF.HARDSO		;;
 0FE5				SKIP_HWCP:				;;
 0FE5  2E: 8B 44 02			MOV	AX,CS:[SI].SLT_AT	;;
 0FE9  25 4000				AND	AX,AT_HWCP		;;
 0FEC  74 08				JZ	FILL_BUFFER		;;
 0FEE  46				INC	SI			;; skip the hwcp slots, they cannot be
 0FEF  46				INC	SI			;; designated
 0FF0  46				INC	SI			;;
 0FF1  46				INC	SI			;;
 0FF2  47				INC	DI			;;
 0FF3  47				INC	DI			;;
 0FF4  EB EF				JMP	SKIP_HWCP		;;
									;;
 0FF6				FILL_BUFFER :				;;
									;;
 0FF6  5E				POP	SI			;;
									;;
 0FF7  57				PUSH	DI			;;
 0FF8  5B				POP	BX			;; BX = the positioned buffer
									;;
 0FF9				DST_BUFLP :				;; **** LOOP ****
 0FF9  8B 44 06				MOV	AX,GIOB.GB1_CP		;; (use GIOB only for codepages)
 0FFC  3D FFFF				CMP	AX,0FFFFH		;;
 0FFF  74 1C				JZ	DST_BUFNXT		;;
									;;
 1001  51				PUSH	CX			;;
									;; compare code page with SLOT-BUFFER
									;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
									;; SCAN THE BUFFER FOR DUPLICATION
 1002  52				PUSH	DX			;;
 1003  59				POP	CX			;; no. of buffer entries
									;;
Microsoft (R) Macro Assembler Version 5.10                  5/17/24 09:44:02
DOS - Code Page Switching - Printer Device Driver           Page     1-63


 1004  06				PUSH	ES			;;
 1005  57				PUSH	DI			;;
 1006  0E				PUSH	CS			;;
 1007  07				POP	ES			;;
 1008  F2/ AF				REPNE	SCASW			;; scan codepage vs. buffer
 100A  5F				POP	DI			;;
 100B  07				POP	ES			;;
									;;
 100C  59				POP	CX			;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
									;;
 100D  75 0B				JNE	BUF_DEFINE		;;
									;;
									;; **** EXIT FROM LOOP ****
									;;
 100F  59				POP	CX			;; number of codepages in GB1
 1010  5E				POP	SI			;; first code page in GB1
 1011  5A				POP	DX			;; count of buffer size
 1012  5F				POP	DI			;; (the start of RAM/Hardware buffer)
 1013  5B				POP	BX			;;
									;;
 1014  B8 800A				MOV	AX,STAT_DUPLCP		;; Duplicated code page
 1017  E9 1270 R			JMP	DST_RETURN		;;
									;;
									;;
 101A				BUF_DEFINE :				;;
 101A  2E: 89 07			MOV	CS:[BX],AX		;; no duplicated cp in MODE list
									;;
									;;
									;; **** NEXT IN LOOP ****
 101D				DST_BUFNXT:				;;
 101D  46				INC	SI			;; (use GIOB only for codepages)
 101E  46				INC	SI			;;
 101F  43				INC	BX			;;
 1020  43				INC	BX			;;
 1021  33 C0				XOR	AX,AX			;;
 1023  49				DEC	CX			;;
 1024  75 D3				JNZ	DST_BUFLP		;;
									;;
									;;
 1026  59				POP	CX			;; number of codepages in GB1
 1027  5E				POP	SI			;; first code page in GB1
 1028  5A				POP	DX			;; count of buffer size
 1029  5F				POP	DI			;; (the start of RAM/Hardware buffer)
 102A  5B				POP	BX			;;
									;;
									;;
				;;-----------------------------------------------------------------------------
									;;*************************************
									;;* any duplicated codepages bet MODE *
									;;* and code pages in the slot ?      *
									;;*************************************
									;; -- for each code page in the slot,
									;;    check for any duplication to
									;;    code pages in buffer, if the code
Microsoft (R) Macro Assembler Version 5.10                  5/17/24 09:44:02
DOS - Code Page Switching - Printer Device Driver           Page     1-64


									;;    page in the slot is not to be
									;;    replaced.
									;; -- the designate fails if there is
									;;    duplication.
									;; -- copy the codepage in the slot to
									;;    the buffer if is not to be
									;;    replaced. Mark the slot to be
									;;    AT_OLD.
									;; -- if the code page is tobe replaced
									;;    mark the STATUS with REPLX.
									;;-------------------------------------
									;;
 102B  8B CA				MOV	CX,DX			;; both slots & buffer of same size
									;; --exclude the hwcp which is not
									;;   designatable
 102D  2E: 8B 77 24			MOV	SI,BUF.HARDSO		;; SI = hardware slot
									;;
 1031  2E: 8B 47 1C			MOV	AX,BUF.STATUS		;;
 1035  25 0001				AND	AX,DSF_CARTCP		;;
 1038  75 04				JNZ	CMP_CP			;;
 103A  2E: 8B 77 2E			MOV	SI,BUF.RAMSO		;; SI = RAM slot
 103E				CMP_CP: 				;;
 103E  2E: 89 77 3A			MOV	BUF.FTSLOTO,SI		;;
									;;
 1042  57				PUSH	DI			;; (the start of RAM/Hardware buffer)
 1043  52				PUSH	DX			;; count of buffer size
 1044  56				PUSH	SI			;; first entry in RAM/hardware slot
 1045  51				PUSH	CX			;; slot size
 1046  53				PUSH	BX			;;
									;;
 1047  57				PUSH	DI			;;
 1048  5B				POP	BX			;; BX = the positioned buffer
 1049				DST_SLTLP :				;;
									;; **** LOOP ****
									;;
 1049  B8 8000				MOV	AX,AT_OLD		;; =**=
 104C  F7 D0				NOT	AX			;; assumed the codepage in slot is new,
 104E  2E: 21 44 02			AND	CS:[SI].SLT_AT,AX	;; to be downloaded if buffer <> 0FFFFH
									;;
 1052  2E: 81 64 02 FEFF		AND	CS:[SI].SLT_AT,AT_NO_LOAD; -- codepage not to be loaded
 1058  2E: 81 64 02 FDFF		AND	CS:[SI].SLT_AT,AT_NO_font; -- no font has been loaded
									;;
 105E  2E: 8B 04			MOV	AX,CS:[SI].SLT_CP	;;
 1061  3D FFFF				CMP	AX,0FFFFH		;;
 1064  74 3B				JZ	DST_SLTNXT		;;
									;;
 1066  51				PUSH	CX			;;
 1067  2E: 8B 0F			MOV	CX,CS:[BX]		;;
 106A  83 F9 FF				CMP	CX,0FFFFH		;; if this slot to be replaced ?
 106D  59				POP	CX			;;
 106E  75 25				JNZ	DST_SLTREPLACED 	;; YES, the buffer is not empty
									;;
									;; compare code page with SLOT-BUFFER
 1070  51				PUSH	CX			;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Microsoft (R) Macro Assembler Version 5.10                  5/17/24 09:44:02
DOS - Code Page Switching - Printer Device Driver           Page     1-65


									;; SCAN THE BUFFER FOR DUPLICATION
 1071  52				PUSH	DX			;;
 1072  59				POP	CX			;; no. of buffer entries
									;;
 1073  06				PUSH	ES			;;
 1074  57				PUSH	DI			;;
 1075  0E				PUSH	CS			;;
 1076  07				POP	ES			;;
 1077  F2/ AF				REPNE	SCASW			;; scan codepage vs. buffer
 1079  5F				POP	DI			;;
 107A  07				POP	ES			;;
									;;
 107B  59				POP	CX			;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
									;;
 107C  75 0B				JNE	SLT_BUF_DEF		;;
									;;
									;; **** LOOP EXIT ****
									;;
 107E  5B				POP	BX			;;
 107F  59				POP	CX			;; number of codepages in slots
 1080  5E				POP	SI			;; first entry in RAM/hardware slots
 1081  5A				POP	DX			;; count of buffer size
 1082  5F				POP	DI			;; (the start of RAM/Hardware buffer)
									;;
 1083  B8 800A				MOV	AX,STAT_DUPLCP		;; Duplicated code page
 1086  E9 1270 R			JMP	DST_RETURN		;;
									;;
									;;
 1089				SLT_BUF_DEF:				;;
 1089  2E: 89 07			MOV	CS:[BX],AX		;; no duplicated cp, there was no cp in
									;; =**=
 108C  2E: 81 4C 02 8000		OR	CS:[SI].SLT_AT,AT_OLD	;; mark old so as no new font download
									;;
 1092  EB 0D 90				JMP	DST_SLTNXT		;; the MODE command for this position
									;;
 1095				DST_SLTREPLACED :			;;
 1095  53				PUSH	BX			;;
 1096  58				POP	AX			;; save the buffer slot-position
 1097  5B				POP	BX			;;
 1098  2E: 81 4F 1C 8000		OR	BUF.STATUS,REPLX	;; there are codepage in slots replaced
 109E  53				PUSH	BX			;;
 109F  50				PUSH	AX			;;
 10A0  5B				POP	BX			;; gets back the buffer position
									;;
									;; **** NEXT IN LOOP ****
									;;
 10A1				DST_SLTNXT:				;;
 10A1  46				INC	SI			;; will take whatever is in buffer
 10A2  46				INC	SI			;;
 10A3  46				INC	SI			;;
 10A4  46				INC	SI			;;
 10A5  43				INC	BX			;; position slot in buffer
 10A6  43				INC	BX			;;
 10A7  33 C0				XOR	AX,AX			;;
Microsoft (R) Macro Assembler Version 5.10                  5/17/24 09:44:02
DOS - Code Page Switching - Printer Device Driver           Page     1-66


 10A9  49				DEC	CX			;;
 10AA  75 9D				JNZ	DST_SLTLP		;;
									;;
									;;
 10AC  5B				POP	BX			;;
 10AD  59				POP	CX			;; slot size
 10AE  5E				POP	SI			;; first entry in RAM/hardware slots
 10AF  5A				POP	DX			;; count of buffer size
 10B0  5F				POP	DI			;; (the start of RAM/Hardware buffer)
									;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
									;;************************************
									;;* prepare the FTABLE		     *
									;;************************************
									;;
									;; -- CX slot / buffer size
									;;    SI slot
									;;    DI buffer
									;;------------------------------------
 10B1  53				PUSH	BX			;; STACK +1
 10B2  56				PUSH	SI			;; STACK +2
									;; =**=
 10B3  B8 4000				MOV	AX,FAIL 		;;
 10B6  F7 D0				NOT	AX			;;
 10B8  2E: 21 47 1C			AND	BUF.STATUS,AX		;; assume it is successful
									;;
									;;
 10BC				PREPARE_FTB :				;; Prepare for Font Parser
 10BC  8D 1E 0000 E			LEA	BX,FTABLE		;;
 10C0  2E: C7 07 0001			MOV	CS:[BX].FLAG,FLAG_RESTART;
 10C5  2E: C7 47 02 0000		MOV	CS:[BX].BUFFER_LEN,0	;; no data packet
 10CB  2E: C7 47 08 0000		MOV	CS:[BX].NUM_FTBLK,0	;;
									;;
 10D1  83 C3 0A				ADD	BX,TYPE FBUFS		;; points to the first FTBLK.
 10D4  33 D2				XOR	DX,DX			;; DX = FTBLK entries (no code page yet)
									;;
									;;
 10D6				GET_CODEPAGE :				;; **** LOOP ****
 10D6  23 C9				AND	CX,CX			;;
 10D8  74 3A				JZ	NO_MORE_SLOT		;;
 10DA  2E: 8B 44 02			MOV	AX,CS:[SI].SLT_AT	;;
 10DE  25 8000				AND	AX,AT_OLD		;;
 10E1  74 0F				JZ	NEW_CODEPAGE		;;
									;;
 10E3  2E: 8B 44 02			MOV	AX,CS:[SI].SLT_AT	;;
 10E7  25 4000				AND	AX,AT_HWCP		;;
 10EA  74 1F				JZ	GET_NEXT		;; not NEW and not HWCP
 10EC  2E: 81 64 02 7FFF		AND	CS:[SI].SLT_AT, NOT AT_OLD  ;; also load for HWCP
									;;
 10F2				NEW_CODEPAGE :				;;
 10F2  2E: 8B 05			MOV	AX,CS:[DI]		;; -- SLOT_AT is not old
									;; -- code page in buffer is not 0FFFFH
 10F5  3D FFFF				CMP	AX,0FFFFH		;;
 10F8  74 11				JE	GET_NEXT		;;
									;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Microsoft (R) Macro Assembler Version 5.10                  5/17/24 09:44:02
DOS - Code Page Switching - Printer Device Driver           Page     1-67


 10FA  42				INC	DX			;; LOAD FONT as :
 10FB  2E: 8B 05			MOV	AX,CS:[DI]		;; codepage in buffer is new code page
									;;
 10FE  2E: 81 4C 02 0100		OR	CS:[SI].SLT_AT,AT_LOAD	;; set the attribute indicating load
									;;
 1104  2E: 89 47 0E			MOV	CS:[BX].FTB_CP,AX	;;
									;;
 1108  83 C3 2A				ADD	BX,type ftblk		;; next FTBLK
									;;
									;;
 110B				GET_NEXT :				;; **** NEXT IN LOOP ****
 110B  47				INC	DI			;;
 110C  47				INC	DI			;; next in buffer
 110D  46				INC	SI			;;
 110E  46				INC	SI			;;
 110F  46				INC	SI			;;
 1110  46				INC	SI			;; next in slot
 1111  49				DEC	CX			;;
 1112  EB C2				JMP	GET_CODEPAGE		;;
									;;
 1114				NO_MORE_SLOT :				;; **** EXIT LOOP ****
 1114  23 D2				AND	DX,DX			;;
 1116  75 03				JNZ	DEFINE_DID		;;
 1118  E9 11B4 R			JMP	NO_FONT_DOWNL		;;
									;;
									;; **********************************
									;; ** NEXT STATE = DESIGNATE_WRITE **
									;; **********************************
									;;
 111B				DEFINE_DID :				;;
 111B  5E				POP	SI			;; STACK -2
 111C  5B				POP	BX			;; STACK -1
									;;
 111D  53				PUSH	BX			;; STACK +1
 111E  56				PUSH	SI			;; STACK +2
									;;
 111F  57				PUSH	DI			;; STACK +3
 1120  51				PUSH	CX			;; STACK +4
 1121  06				PUSH	ES			;; STACK +5
 1122  1E				PUSH	DS			;; STACK +6
									;;
 1123  0E				PUSH	CS			;;
 1124  07				POP	ES			;;
 1125  0E				PUSH	CS			;;
 1126  1F				POP	DS			;;
									;;
 1127  8B F3				MOV	SI,BX			;; GET THE DEVICE_ID FROM LPTn BUFFER
 1129  8D 74 42				LEA	SI,[SI].PAR_EXTRACTO	;;
 112C  2E: 8B 74 04			MOV	SI,CS:[SI].PAR_DIDO	;;
 1130  8D 74 02				LEA	SI,[SI].PAR_DID 	;;
									;;
 1133  8D 3E 0000 E			LEA	DI,FTABLE		;;
 1137  2E: 89 55 08			MOV	CS:[DI].NUM_FTBLK,DX	;;
									;;
Microsoft (R) Macro Assembler Version 5.10                  5/17/24 09:44:02
DOS - Code Page Switching - Printer Device Driver           Page     1-68


 113B  83 C7 0A				ADD	DI,TYPE FBUFS		;;
 113E  8D 7D 06				LEA	DI,[DI].FTB_TID 	;;
									;;
 1141				SET_DID :				;;
 1141  B9 0008				MOV	CX,8			;;
 1144  56				PUSH	SI			;;
 1145  57				PUSH	DI			;;
									;;
 1146  F3/ A4				REP	MOVSB			;;
									;;
 1148  5F				POP	DI			;;
 1149  5E				POP	SI			;;
									;;
 114A  83 C7 2A				ADD	DI,TYPE FTBLK		;; next DID
 114D  4A				DEC	DX			;;
 114E  75 F1				JNZ	SET_DID 		;;
									;;
 1150  1F				POP	DS			;; STACK -6
 1151  07				POP	ES			;; STACK -5
 1152  59				POP	CX			;; STACK -4
 1153  5F				POP	DI			;; STACK -3
									;;
 1154  E8 0000 E			CALL	FONT_PARSER		;; restart font parser
									;;
 1157  8D 1E 0000 E			LEA	BX,FTABLE		;;
 115B  83 C3 0A				ADD	BX,TYPE FBUFS		;;
 115E  2E: 83 7F 02 FB			CMP	CS:[BX].FTB_STATUS,FSTAT_SEARCH
									;;
 1163  74 08				JE	FONT_DOWNL		;;
 1165  B8 800A				MOV	AX,STAT_DEVERR		;;
 1168  5E				POP	SI			;; STACK -2
 1169  5B				POP	BX			;; STACK -1
 116A  E9 1270 R			JMP	DST_RETURN		;; there is no designate_end if fails
									;;
 116D				FONT_DOWNL :				;;
 116D  5E				POP	SI			;; STACK -2
 116E  5B				POP	BX			;; STACK -1
 116F  2E: C7 47 1A 0002		MOV	BUF.STATE,DESG_WR	;; enter DESIGNATE_WRITE state
 1175  2E: C7 47 3E 0000		MOV	BUF.FSELEN,0		;; for font selection control loading
									;;
 117B  51				PUSH	CX			;; init the font buffer address of
 117C  57				PUSH	DI			;; each codepage
 117D  56				PUSH	SI			;;
 117E  2E: 8B 7F 3C			MOV	DI,BUF.FTDLO		;;
									;;
 1182  2E: 8B 4F 2A			MOV	CX,BUF.RSLMX		;;
 1186  2E: 8B 47 1C			MOV	AX,BUF.STATUS		;;
 118A  25 0001				AND	AX,DSF_CARTCP		;;
 118D  74 04				JZ	FTDL_LOOP		;;
 118F  2E: 8B 4F 20			MOV	CX,BUF.HSLMX		;;
									;;
 1193				FTDL_LOOP :				;;
 1193  23 C9				AND	CX,CX			;;
 1195  74 17				JZ	FTDL_DONE		;;
Microsoft (R) Macro Assembler Version 5.10                  5/17/24 09:44:02
DOS - Code Page Switching - Printer Device Driver           Page     1-69


 1197  2E: 8B 44 02			mov	ax,cs:[si].slt_at	;;
 119B  25 0100				and	ax,at_load		;;
 119E  74 05				jz	ftdl_next		;;
									;;
 11A0  2E: C7 05 0000			MOV	CS:WORD PTR[DI],0	;; the font length in font buffer is 0
									;;
 11A5				ftdl_next :				;;
 11A5  46				INC	SI			;;
 11A6  46				INC	SI			;;
 11A7  46				INC	SI			;;
 11A8  46				INC	SI			;;
 11A9  47				INC	DI			;;
 11AA  47				INC	DI			;;
 11AB  49				DEC	CX			;;
 11AC  EB E5				JMP	FTDL_LOOP		;;
 11AE				FTDL_DONE :				;;
 11AE  5E				POP	SI			;;
 11AF  5F				POP	DI			;;
 11B0  59				POP	CX			;;
									;;
 11B1  EB 09 90				JMP	CHECK_OTHER		;;
									;;
									;;  *******************************
									;;  ** NEXT STATE = DSIGNATE_END **
									;;  *******************************
 11B4				NO_FONT_DOWNL : 			;;
 11B4  5E				POP	SI			;; STACK -2
 11B5  5B				POP	BX			;; STACK -1
 11B6  2E: C7 47 1A 0003		MOV	BUF.STATE,DESG_END	;; proper designate end, ignore write
									;;
									;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 11BC				CHECK_OTHER :				;;
									;;
 11BC  2E: 8B 57 1C			MOV	DX,BUF.STATUS		;;
 11C0  B8 8000				MOV	AX,REPLX		;;
 11C3  F7 D0				NOT	AX			;;
 11C5  23 C2				AND	AX,DX			;; reset the bit for "replaced"
 11C7  2E: 89 47 1C			MOV	BUF.STATUS,AX		;;
									;;
 11CB  33 C0				XOR	AX,AX			;;
 11CD  81 E2 8000			AND	DX,REPLX		;;
 11D1  E9 1270 R			JMP	DST_RETURN		;;
									;; only for the FIFO
 11D4  E9 1270 R			JMP	DST_RETURN		;;
									;;
									;;
 11D7				DST_REFRESH:				;;  ******************************
									;;  **	REFRESH FONT TO DEVICE	**
									;;  ******************************
									;;  -- if there is RAM buffer on device
									;;  -- if there is font assumed to be
									;;     on the device, then
									;;  -- load the font to the device,
									;;     but no change in slot attributes
Microsoft (R) Macro Assembler Version 5.10                  5/17/24 09:44:02
DOS - Code Page Switching - Printer Device Driver           Page     1-70


									;;
 11D7  2E: 81 4F 1C 0800		OR	BUF.STATUS,REFRESH	;;  -- STATE = CPSW (for Designate_end)
									;;
 11DD  2E: 8B 4F 2A			MOV	CX,BUF.RSLMX		;;
 11E1  23 C9				AND	CX,CX			;;
 11E3  75 03				JNZ	DST_CHECK_FBUFFER	;;
 11E5  E9 127B R			JMP	DST_REF_INVK		;; invoke any active code page
									;;
 11E8				DST_CHECK_FBUFFER:			;;
 11E8  2E: 8B 7F 2E			MOV	DI,BUF.RAMSO		;;
									;;
 11EC				DST_RAMLP:				;;
 11EC  2E: 8B 45 02			MOV	AX,CS:[DI].SLT_AT	;;
 11F0  25 0001				AND	AX,AT_RAM1		;;
 11F3  75 0A				JNZ	DST_RAM_LOCATED 	;;
 11F5  47				INC	DI			;;
 11F6  47				INC	DI			;;
 11F7  47				INC	DI			;;
 11F8  47				INC	DI			;;
 11F9  49				DEC	CX			;;
 11FA  75 F0				JNZ	DST_RAMLP		;;
 11FC  EB 7D 90				JMP	DST_REF_INVK		;; there was no font loaded
									;;
 11FF				DST_RAM_LOCATED:			;;
 11FF  2E: 83 7F 30 00			CMP	BUF.RBUFMX,0		;; ANY FONT BUFFER TO BE COPIED FROM ?
 1204  77 0A				JA	DST_HAS_BUFFER		;;
 1206  B8 800C				MOV	AX,STAT_NOBUFF		;;
 1209  2E: A3 0048 R			mov  cs:init_chk,ax		;;
 120D  EB 61 90				JMP	DST_RETURN		;; ERROR !!!
									;;
 1210				DST_HAS_BUFFER :			;;
 1210  2E: 2B 7F 2E			SUB	DI,BUF.RAMSO		;; relative to .RAMSO
 1214  D1 EF				SHR	DI,1			;; relative to .FTLDO
 1216  57				PUSH	DI			;;
									;;
 1217  D1 EF				SHR	DI,1			;; the nth
 1219  8B CF				MOV	CX,DI			;;
 121B  2E: 8B 47 38			MOV	AX,BUF.FTSTART		;;
									;;
 121F				DST_LOCATE_FT:				;;
 121F  23 C9				AND	CX,CX			;;
 1221  74 07				JZ	DST_FT_LOCATED		;;
 1223  2E: 03 47 34			ADD	AX,BUF.FTSZPA		;;
 1227  49				DEC	CX			;;
 1228  75 F5				JNZ	DST_LOCATE_FT		;;
									;;
 122A				DST_FT_LOCATED: 			;;
									;;
 122A  5F				POP	DI			;;
 122B  2E: 03 7F 3C			ADD	DI,BUF.FTDLO		;;
 122F  2E: 8B 0D			MOV	CX,CS:WORD PTR [DI]	;;
									;;....................................
									;; DOWNLOAD THE FONT TO DEVICE
 1232  2E: 8B 77 12			MOV	SI,BUF.RNORMO		;;
Microsoft (R) Macro Assembler Version 5.10                  5/17/24 09:44:02
DOS - Code Page Switching - Printer Device Driver           Page     1-71


 1236  2E: C6 04 14			MOV	CS:[SI].RHC_LEN,20	;;
 123A  2E: C6 44 02 08			MOV	CS:[SI].RHC_CMD,CMD_WRT ;;
 123F  2E: 89 4C 12			MOV	CS:[SI].RH3_CNT,CX	;;
 1243  2E: C7 44 0E 0000		MOV	CS:[SI].RH3_DTAO,0	;;
 1249  2E: 89 44 10			MOV	CS:[SI].RH3_DTAS,AX	;;
									;;
 124D  53				PUSH	BX			;;
									;;
 124E  53				PUSH	BX			;;
 124F  5F				POP	DI			;; save BX in DI
 1250  0E				PUSH	CS			;;
 1251  07				POP	ES			;;
 1252  8B DE				MOV	BX,SI			;; ES:BX = REQ_NORMn (CS:[SI])
									;;
 1254  2E: FF 5D 06			CALL	DWORD PTR CS:[DI].LPT_STRAO
									;;
 1258  2E: FF 5D 0A			CALL	DWORD PTR CS:[DI].LPT_INTRO
									;;
 125C  5B				POP	BX			;;
									;;
 125D  2E: 8B 44 03			MOV	AX,CS:[SI].RHC_STA	;;
									;;
 1261  25 8000				and	ax,stat_error		;;
 1264  74 03				jz	fdl_good2		;;
 1266  B8 800A				mov	ax,stat_deverr		;;
									;;
 1269				fdl_good2 :				;;
 1269  50				PUSH	AX			;;
 126A  25 8000				AND	AX,STAT_ERROR		;;
 126D  58				POP	AX			;;
 126E  74 0B				JZ	DST_REF_INVK		;;
									;;
									;;
 1270				DST_RETURN :				;;
 1270  2E: C4 7F 0E			LES	DI,dword ptr buf.rh_ptro ;;
 1274  26: 89 45 03			MOV	RH.RHC_STA,AX		;;
									;;
 1278  0E				push	cs			;;
 1279  1F				pop	ds			;;
									;;
 127A  C3				RET				;;
									;;
									;;
 127B				DST_REF_INVK :				;; INVOKE FOR REFRESH
									;;
									;; ************************************
									;; * INVOKE HIERIECHY : RAM, HARDWARE *
									;; ************************************
									;;
 127B  2E: 8B 7F 2E			MOV	DI,BUF.RAMSO		;; check with the ram-slots  (DI)
 127F  2E: 8B 4F 2A			MOV	CX,BUF.RSLMX		;; CX = size
 1283  23 C9				AND	CX,CX			;;
 1285  74 10				JZ	DST_HWCP_CHK		;;
									;;
Microsoft (R) Macro Assembler Version 5.10                  5/17/24 09:44:02
DOS - Code Page Switching - Printer Device Driver           Page     1-72


 1287				DST_RAM_CMP:				;; there are RAM-slots
 1287				DST_RAM_LP:				;;
 1287  2E: 8B 45 02			MOV	AX,CS:[DI].SLT_AT	;;
 128B  25 2000				AND	AX,AT_ACT		;;
 128E  75 2D				JNZ	DST_IVK_CP		;;
 1290  47				INC	DI			;;
 1291  47				INC	DI			;;
 1292  47				INC	DI			;;
 1293  47				INC	DI			;;
 1294  49				DEC	CX			;;
 1295  75 F0				JNZ	DST_RAM_LP		;;
									;;
 1297				DST_HWCP_CHK :				;;
 1297  2E: 8B 7F 24			MOV	DI,BUF.HARDSO		;; check with the HWCP-slots  (DI)
 129B  2E: 8B 4F 20			MOV	CX,BUF.Hslmx		;; CX = size
 129F  23 C9				AND	CX,CX			;;
 12A1  75 03				JNZ	dst_HWCP_cmp		;;
 12A3  EB 14 90				JMP	DST_NO_IVK		;;
									;;
 12A6				DST_HWCP_CMP :				;;
 12A6				DST_HWCP_LP:				;;
 12A6  2E: 8B 45 02			MOV	AX,CS:[DI].SLT_AT	;;
 12AA  25 2000				AND	AX,AT_ACT		;;
 12AD  74 03				JZ	DST_HWCP_NEXT		;;
 12AF  EB 0C 90				JMP	DST_IVK_CP		;;
									;;
 12B2				DST_HWCP_NEXT : 			;;
 12B2  47				INC	DI			;;
 12B3  47				INC	DI			;;
 12B4  47				INC	DI			;;
 12B5  47				INC	DI			;;
 12B6  49				DEC	CX			;;
 12B7  75 ED				JNZ	DST_HWCP_LP		;;
									;;
 12B9				DST_NO_IVK:				;;
 12B9  33 C0				XOR	AX,AX			;;
 12BB  EB B3				JMP	DST_RETURN		;;
									;;
 12BD				DST_IVK_CP :				;;
 12BD  56				PUSH	SI			;;
									;;
 12BE  2E: 8B 77 12			MOV	SI,BUF.RNORMO		;;
 12C2  8B C6				MOV	AX,SI			;;
 12C4  05 0017				ADD	AX,TYPE GIH		;; points to buffer
									;;
 12C7  50				PUSH	AX			;;
 12C8  8D 74 13				LEA	SI,[SI].GIH_GBA 	;;
 12CB  2E: 89 04			MOV	CS:WORD PTR [SI],AX
 12CE  46				INC	SI			;;
 12CF  46				INC	SI			;;
 12D0  2E: 8C 0C			MOV	CS:WORD PTR [SI],CS	;;
 12D3  5E				POP	SI			;;
 12D4  2E: C7 04 0002			MOV	CS:[SI].GB2_LEN,2	;;
 12D9  2E: 8B 05			MOV	AX,CS:[DI].SLT_CP	;;
Microsoft (R) Macro Assembler Version 5.10                  5/17/24 09:44:02
DOS - Code Page Switching - Printer Device Driver           Page     1-73


 12DC  2E: 89 44 02			MOV	CS:[SI].GB2_CP,AX	;;
									;;
 12E0  5E				POP	SI			;;
 12E1  0E				PUSH	CS			;; define RH = ES:[DI]
 12E2  07				POP	ES			;;
 12E3  2E: 8B 7F 12			MOV	DI,BUF.RNORMO		;;
									;;
 12E7  0E				push	cs			;;
 12E8  1F				pop	ds			;;
									;;
 12E9  E9 14AE R			JMP	INVOKE			;;
									;;
 12EC				DESIGNATE_START ENDP			;;
									;;
				;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
				;;
				;;====	Generic IOCTL Designate End  ======
				;;
				;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 12EC				DESIGNATE_END PROC			;;
									;;
 12EC  2E: 8B 47 1A			MOV	AX,BUF.STATE		;;
 12F0  3D 0004				CMP	AX,LOCKED		;; WGR						 ;AN000;
 12F3  75 06				JNE	DE_01			;; WGR						 ;AN000;
 12F5  B8 800C				MOV	AX,STAT_BADDEN		;; WGR						 ;AN000;
 12F8  E9 14A5 R			JMP	DE_11			;; WGR						 ;AN000;
 12FB				DE_01:					;; WGR						 ;AN000;
 12FB  3D 0001				CMP	AX,CPSW 		;;
 12FE  75 1A				JNE	DEN_NOT_CPSW		;;
 1300  2E: 8B 47 1C			MOV	AX,BUF.STATUS		;; any refresh ?
 1304  25 0800				AND	AX,REFRESH		;;
 1307  75 06				JNZ	DEN_REFRESH		;;
 1309  B8 800C				MOV	AX,STAT_BADDEN		;;
 130C  E9 144B R			JMP	DEN_FAIL		;;
									;;
 130F				DEN_REFRESH :				;;
 130F  2E: 81 67 1C F7FF		AND	BUF.STATUS,NOT REFRESH	;;
 1315  33 C0				XOR	AX,AX			;;
 1317  E9 149F R			JMP	DEN_RET 		;;
									;;
 131A				DEN_NOT_CPSW :				;;
 131A  3D 0000				CMP	AX,NORMAL		;;
 131D  75 03				JNE	den_NOT_NORMAL		;;
 131F  E9 0BC6 R			JMP	NORM_DRIVER		;; not in the code page switching stage
									;;
 1322				den_NOT_NORMAL :			;;
 1322  3D 0003				CMP	AX,DESG_END		;;
 1325  75 03				JNE	den_other		;;
 1327  EB 43 90				JMP	den_ENDED		;;  end with no error check
									;;
 132A				den_other :				;;
 132A  3D 0002				CMP	AX,DESG_WR		;;
 132D  74 06				JE	den_write		;;
 132F  B8 800C				MOV	AX,STAT_BADDEN		;;
Microsoft (R) Macro Assembler Version 5.10                  5/17/24 09:44:02
DOS - Code Page Switching - Printer Device Driver           Page     1-74


 1332  E9 144B R			JMP	DEN_FAIL		 ;; no designate start
									;;-------------------------
 1335				den_write :				;; DESIGNATE WRITE ended
									;;
 1335  2E: 8B 47 1C			MOV	AX,BUF.STATUS		;;
 1339  25 4000				AND	AX,FAIL 		;;
 133C  74 05				JZ	DEN_FTABLE		;; failed in the middle of desig-write
 133E  33 C0				XOR	AX,AX			;;
 1340  E9 144B R			JMP	DEN_FAIL		 ;; ignore the DEN
									;;
 1343				DEN_FTABLE :				;;
									;;
 1343  8D 3E 0000 E			LEA	DI,FTABLE		;;
 1347  83 C7 0A				ADD	DI,TYPE FBUFS		;;
 134A  2E: 8B 45 02			MOV	AX,CS:[DI].FTB_STATUS	;;
 134E  3D FFFF				CMP	AX,FSTAT_COMPLETE	;;
 1351  74 19				JE	DEN_ENDED		;;
									;;
 1353  3D FFFE				CMP	AX,FSTAT_FONT		;;
 1356  74 06				JE	DEN_FONT		;;
 1358  B8 8000				MOV	AX,STAT_bffDEN		;; bad font file
 135B  E9 144B R			JMP	DEN_FAIL		 ;; the font data was not complete
									;;
 135E				DEN_FONT :				;;
 135E  2E: 8B 45 1E			MOV	AX,CS:[DI].FTB_DLEFT	;;
 1362  23 C0				AND	AX,AX			;;
 1364  74 06				JZ	DEN_ENDED		;;
 1366  B8 8000				MOV	AX,STAT_BffDEN		;;
 1369  E9 144B R			JMP	DEN_FAIL		 ;;
									;;
 136C				DEN_ENDED :				;; good designate-end
									;;
 136C  2E: 8B 7F 24			MOV	DI,BUF.HARDSO		;; to hardware slot
 1370  2E: 8B 77 28			MOV	SI,BUF.HRBUFO		;; to hardware-buffer
 1374				HARD_HWCPE:				;;
 1374  2E: 8B 45 02			MOV	AX,CS:[DI].SLT_AT	;; skip the HWCP
 1378  25 4000				AND	AX,AT_HWCP		;;
 137B  74 08				JZ	HARD_CARTE		;;
 137D  47				INC	DI			;;
 137E  47				INC	DI			;;
 137F  47				INC	DI			;;
 1380  47				INC	DI			;;
 1381  46				INC	SI			;;
 1382  46				INC	SI			;;
 1383  EB EF				JMP	HARD_HWCPE		;;
 1385				HARD_CARTE:				;;
 1385  2E: 8B 4F 20			MOV	CX,BUF.HSLMX		;; size of both hardware slot/buffer
 1389  2E: 2B 4F 22			SUB	CX,BUF.HARDMX		;; slots that can be designated????????
 138D  2E: 8B 47 1C			MOV	AX,BUF.STATUS		;;
 1391  25 0001				AND	AX,DSF_CARTCP		;;
 1394  74 0D				JZ	ASSIGN_RAM		;;
									;;
									;;
 1396  B8 800A				MOV	AX,STAT_TOMANY		;;
Microsoft (R) Macro Assembler Version 5.10                  5/17/24 09:44:02
DOS - Code Page Switching - Printer Device Driver           Page     1-75


 1399  23 C9				AND	CX,CX			;; any cart-slot to be designated ?
 139B  75 03				JNZ	ASSIGN_CP_CART		 ;;
 139D  E9 144B R			JMP	DEN_FAIL		 ;;
									;;
									;;
 13A0				ASSIGN_CP_CART :			;;
 13A0  EB 17 90				JMP	ASSIGN_CP		;;
									;;
 13A3				ASSIGN_RAM:				;;
 13A3  2E: 8B 7F 2E			MOV	DI,BUF.RAMSO		;; to RAM slot
 13A7  2E: 8B 77 32			MOV	SI,BUF.RMBUFO		;; to RAM-buffer
 13AB  2E: 8B 4F 2A			MOV	CX,BUF.RSLMX		;; size of both RAM slot/buffer
									;;
 13AF  B8 800A				MOV	AX,STAT_TOMANY		;;
 13B2  23 C9				AND	CX,CX			;; any cart-slot to be designated ?
 13B4  75 03				JNZ	ASSIGN_CP		 ;;
 13B6  E9 144B R			JMP	DEN_FAIL		 ;;
									;;
 13B9				ASSIGN_CP:				;;
 13B9  B8 0100				MOV	AX,AT_LOAD		;;
 13BC  0D 0200				OR	AX,AT_FONT		;;
 13BF  0D 0400				OR	AX,AT_SELECT		;;
 13C2  F7 D0				NOT	AX			;;
 13C4  2E: 21 45 02			AND	CS:[DI].SLT_AT,AX	;; reset load, font, select attributes
									;;
 13C8  2E: 8B 04			MOV	AX,CS:[SI]		;; code page assigned
 13CB  2E: 89 05			MOV	CS:[DI].SLT_CP,AX	;;
									;;
 13CE  3D FFFF				CMP	AX,0FFFFH		;;
 13D1  75 0C				JNE	SLOT_OCC		;;
 13D3  B8 1000				MOV	AX,AT_OCC		;;
 13D6  F7 D0				NOT	AX			;; empty
 13D8  2E: 21 45 02			AND	CS:[DI].SLT_AT,AX	;;
 13DC  EB 25 90				JMP	ASSIGN_NEXT		;;
 13DF				SLOT_OCC:				;;
 13DF  2E: 81 4D 02 1000		OR	CS:[DI].SLT_AT,AT_OCC	;; occupied
									;;
 13E5  2E: 8B 45 02			MOV	AX,CS:[DI].SLT_AT	;;
 13E9  25 8000				AND	AX,AT_OLD		;;
 13EC  75 15				JNZ	ASSIGN_NEXT		;;
									;;
 13EE				NOT_ACTIVE:				;; this newly designated is not active
 13EE  B8 2000				MOV	AX,AT_ACT		;;
 13F1  F7 D0				NOT	AX			;;
 13F3  2E: 21 45 02			AND	CS:[DI].SLT_AT,AX	;;    not active
 13F7  2E: 83 7F 30 00			CMP	BUF.RBUFMX,0		;;
 13FC  74 05				JE	ASSIGN_NEXT		;;
 13FE  2E: 83 65 02 FE			AND	CS:[DI].SLT_AT,NOT AT_RAM1;;  not loaded to physical RAM until
									;;    the code page is selected
 1403				ASSIGN_NEXT :				;;
 1403  47				INC	DI			;;
 1404  47				INC	DI			;;
 1405  47				INC	DI			;;
 1406  47				INC	DI			;;
Microsoft (R) Macro Assembler Version 5.10                  5/17/24 09:44:02
DOS - Code Page Switching - Printer Device Driver           Page     1-76


 1407  46				INC	SI			;;
 1408  46				INC	SI			;;
 1409  49				DEC	CX			;;
 140A  23 C9				AND	CX,CX			;;
 140C  75 AB				JNE	ASSIGN_CP		;;
									;;
 140E  2E: 8B 4F 3E			MOV	CX,BUF.FSELEN		;; COPY SELECT-CONTROL for CLASS 0
 1412  23 C9				AND	CX,CX			;;
 1414  74 30				JZ	DEN_NO_SELECT		;;
									;;
 1416  06				PUSH	ES			;;
 1417  1E				PUSH	DS			;;
 1418  56				PUSH	SI			;;
 1419  57				PUSH	DI			;;
									;;
 141A  0E				PUSH	CS			;;
 141B  07				POP	ES			;;
 141C  0E				PUSH	CS			;;
 141D  1F				POP	DS			;;
									;;
 141E  52				PUSH	DX			;;
 141F  2E: 8B 7F 1E			MOV	DI,BUF.PDESCO		;;
 1423  2E: 8B 75 1A			MOV	SI,CS:[DI].SELB_O	;;
 1427  57				PUSH	DI			;;
 1428  2E: 8B 7D 16			MOV	DI,CS:[DI].SELH_O	;;
 142C  33 D2				XOR	DX,DX			;;
 142E  2E: 8A 14			MOV	DL,CS:BYTE PTR [SI]	;;
 1431  03 D7				ADD	DX,DI			;;
 1433  42				INC	DX			;; of the length byte
									;;
 1434  F3/ A4				REP	MOVSB			;;
									;;
 1436  5F				POP	DI			;;
 1437  2E: 89 55 18			MOV	CS:[DI].SELR_O,DX	;;
 143B  5A				POP	DX			;;
									;;
 143C  5F				POP	DI			;;
 143D  5E				POP	SI			;;
 143E  1F				POP	DS			;;
 143F  07				POP	ES			;;
									;;
 1440  2E: C7 47 3E 0000		MOV	BUF.FSELEN,0		;;
									;;
 1446				DEN_NO_SELECT : 			;;
 1446  33 C0				XOR	AX,AX			;; clear status
 1448  EB 55 90				JMP	DEN_RET 		;;
									;;
 144B				DEN_FAIL :				;;------------------------------------
 144B  50				PUSH	AX			;; ANY FONT BUFFER DESTROYED ?
									;;
 144C  2E: 8B 47 1C			MOV	AX,BUF.STATUS		;;
 1450  25 0001				AND	AX,DSF_CARTCP		;;
 1453  74 0B				JZ	DEN_RAM_FAIL		;;
									;;
Microsoft (R) Macro Assembler Version 5.10                  5/17/24 09:44:02
DOS - Code Page Switching - Printer Device Driver           Page     1-77


 1455  2E: 8B 7F 3A			MOV	DI,BUF.FTSLOTO		;;
 1459  2E: 8B 4F 20			MOV	CX,BUF.HSLMX		;;
 145D  EB 11 90				JMP	DEN_FAIL_LOOP		;;
									;;
 1460				DEN_RAM_FAIL :				;;
 1460  2E: 8B 7F 2E			MOV	DI,BUF.RAMSO		;; to RAM slot
 1464  2E: 8B 4F 2A			MOV	CX,BUF.RSLMX		;; size of both RAM slot/buffer
 1468  2E: 8B 57 30			MOV	DX,BUF.RBUFMX		;;
									;;
 146C  23 D2				AND	DX,DX			;;
 146E  74 28				JZ	DEN_FAIL_RET		;;
									;;
 1470				DEN_FAIL_LOOP : 			;;
 1470  23 C9				AND	CX,CX			;;
 1472  74 24				JZ	DEN_FAIL_RET		;;
									;;
 1474  2E: 8B 45 02			MOV	AX,CS:[DI].SLT_AT	;;
 1478  25 0100				AND	AX,AT_LOAD		;;
 147B  74 14				JZ	DEN_FAIL_NEXT		;;
									;;
 147D  2E: 8B 45 02			MOV	AX,CS:[DI].SLT_AT	;;
 1481  25 4000				AND	AX,AT_HWCP		;;
 1484  75 0B				JNZ	DEN_FAIL_NEXT		;;
									;;
 1486  2E: C7 05 FFFF			MOV	CS:[DI].SLT_CP,0FFFFH	;; those slot whose font has been or
 148B  2E: C7 45 02 0000		MOV	CS:[DI].SLT_AT,0	;; to be loaded will be wiped out by
									;; a failing designate
 1491				DEN_FAIL_NEXT : 			;;
									;;
 1491  47				INC	DI			;;
 1492  47				INC	DI			;;
 1493  47				INC	DI			;;
 1494  47				INC	DI			;;
 1495  49				DEC	CX			;;
 1496  75 D8				JNE	DEN_FAIL_LOOP		;;
									;;
 1498				DEN_FAIL_RET :				;;
									;;
 1498  58				POP	AX			;;
									;;
 1499  2E: C7 47 3E 0000		MOV	BUF.FSELEN,0		;;
									;;
									;;-------------------------------------
 149F				DEN_RET :				;;
 149F  2E: C7 47 1A 0001		MOV	BUF.STATE,CPSW		;; end of designate cycle
									;;
 14A5				DE_11:					;; WGR						 ;AN000;
 14A5  2E: C4 7F 0E			LES	DI,dword ptr buf.rh_ptro ;;
 14A9  26: 89 45 03			MOV	RH.RHC_STA,AX		;;
									;;
 14AD  C3				RET				;;
									;;
 14AE				DESIGNATE_END ENDP			;;
									;;
Microsoft (R) Macro Assembler Version 5.10                  5/17/24 09:44:02
DOS - Code Page Switching - Printer Device Driver           Page     1-78


				;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
				;;
				;;====	Generic IOCTL Invoke  ==========
				;;
				;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
									;;
 14AE				INVOKE	PROC				;; ALSO JUMP FROM REFRESH
									;;
 14AE  2E: 8B 47 1A			MOV	AX,BUF.STATE		;;
 14B2  3D 0001				CMP	AX,CPSW 		;;
 14B5  74 08				JE	IVK_PROCESS		;;
 14B7  3D 0004				CMP	AX,LOCKED		;; WGR						 ;AN000;
 14BA  74 03				JE	IVK_PROCESS		;; WGR						 ;AN000;
 14BC  E9 1753 R			JMP	IVK_CMDERR		;G;
 14BF				IVK_PROCESS:				;;-------------------------
									;G;
 14BF  E8 18B9 R			CALL	CHECK_PRINT_ACTIVE	;G; THIS WILL FIND OUT IF THE
 14C2  73 03				JNC	IVK_PROCESS_CONT	;G; PRINT.COM IS PRESENTLY ACTIVE!
 14C4  E9 174D R			JMP	IVK_DEVERR		;G; If so, THEN DEVICE_ERROR
									;G;
 14C7				IVK_PROCESS_CONT:			;G;
 14C7  1E				push	ds			;;
 14C8  26: C5 75 13			LDS	SI,RH.GIH_GBA		;;
 14CC  8B 0C				MOV	CX,GIOB.GB2_LEN 	;;
 14CE  B8 8003				MOV	AX,STAT_CMDERR		;;
 14D1  83 F9 02				CMP	CX,2			;;
 14D4  74 04				JE	IVK_GOODN		;;
 14D6  1F				pop	ds			;;
 14D7  E9 1756 R			JMP	IVK_RET 		;;
 14DA				IVK_GOODN:				;;
 14DA  8B 54 02				MOV	DX,GIOB.GB2_CP		;; DX = the codepage to be invoked
 14DD  83 FA FF				CMP	DX,0FFFFH		;;
 14E0  75 04				JNE	IVK_GOODCP		;;
 14E2  1F				pop	ds			;;
 14E3  E9 1756 R			JMP	IVK_RET 		;;
 14E6				IVK_GOODCP:				;;
									;; ************************************
									;; * INVOKE HIERIECHY : RAM, HARDWARE *
									;; ************************************
 14E6  1F				pop	ds			;;
									;;
 14E7  2E: 8B 7F 2E			MOV	DI,BUF.RAMSO		;; check with the ram-slots  (DI)
 14EB  2E: 8B 4F 2A			MOV	CX,BUF.RSLMX		;; CX = size
 14EF  23 C9				AND	CX,CX			;;
 14F1  74 12				JZ	HWCP_CHK		;;
									;;
 14F3				RAM_CMP:				;; there are RAM-slots
 14F3  51				PUSH	CX			;; stack 1 = size
 14F4  57				PUSH	DI			;;
 14F5  5E				POP	SI			;; start of the slot compared with (SI)
 14F6				RAM_LP: 				;;
 14F6  2E: 8B 05			MOV	AX,CS:[DI].SLT_CP	;;
 14F9  3B C2				CMP	AX,DX			;;
 14FB  74 2F				JE	IVK_RAMCP		;;
Microsoft (R) Macro Assembler Version 5.10                  5/17/24 09:44:02
DOS - Code Page Switching - Printer Device Driver           Page     1-79


 14FD  47				INC	DI			;;
 14FE  47				INC	DI			;;
 14FF  47				INC	DI			;;
 1500  47				INC	DI			;;
 1501  49				DEC	CX			;;
 1502  75 F2				JNZ	RAM_LP			;;
									;;
 1504  59				POP	CX			;; stack -1
									;; code page not found in ram-slots
 1505				HWCP_CHK :				;;
 1505  2E: 8B 7F 24			MOV	DI,BUF.HARDSO		;; check with the HWCP-slots  (DI)
 1509  2E: 8B 4F 20			MOV	CX,BUF.Hslmx		;; CX = size
 150D  23 C9				AND	CX,CX			;;
 150F  75 03				JNZ	HWCP_cmp		;;
 1511  E9 1747 R			JMP	NO_INVOKE		;;
									;;
 1514				HWCP_CMP :				;;
 1514  51				PUSH	CX			;; stack 1 = size of HWCP
 1515  57				PUSH	DI			;;
 1516  5E				POP	SI			;; start of the slot compared with (SI)
 1517				HWCP_LP:				;;
 1517  2E: 8B 05			MOV	AX,CS:[DI].SLT_CP	;;
 151A  3B C2				CMP	AX,DX			;;
 151C  75 03				JNE	HWCP_NEXT		;;
 151E  E9 15EA R			JMP	IVK_HWCPCP		;;
									;;
 1521				HWCP_NEXT :				;;
 1521  47				INC	DI			;;
 1522  47				INC	DI			;;
 1523  47				INC	DI			;;
 1524  47				INC	DI			;;
 1525  49				DEC	CX			;;
 1526  75 EF				JNZ	HWCP_LP 		;;
 1528  59				POP	CX			;; stack -1
									;;
 1529  E9 1747 R			JMP	NO_INVOKE		;;
									;; **********************************
									;; **  RAM CODEPAGE TO BE INVOKED  **
									;; **********************************
									;; -- determine if any font to be
									;;    downloaded for the first time
									;;    select of the font.
									;; -- send selection control to invoke
									;;
									;; CX = inverse order of slot cp found
 152C				IVK_RAMCP :				;; code page found in RAM slots
									;; set up the pointer to first controls
									;; DI = where slot found
									;;
									;;-------------------------------------
									;; **** LOAD THE FONT FIRST  if ****
									;; -- there are font buffers created
									;; -- the slot's font has not been
									;;    loaded
Microsoft (R) Macro Assembler Version 5.10                  5/17/24 09:44:02
DOS - Code Page Switching - Printer Device Driver           Page     1-80


 152C  2E: 83 7F 1A 04			CMP	CS:[BX].STATE,LOCKED	;; WGR are we locked?				 ;AN000;
 1531  75 26				JNE	IR_0			;; WGR no..continue				 ;AN000;
 1533  2E: 89 57 4E			MOV	CS:[BX].SAVED_CP,DX	;; WGR yes...save the code page 		 ;AN000;
 1537  81 FB 009C R			CMP	BX,OFFSET BUF1		;; WGR if this is lpt1..then			 ;AN000;
 153B  75 0B				JNE	NEXT_1			;; WGR						 ;AN000;
 153D  8D 36 004A R			LEA	SI,BUF0 		;; WGR copy to PRN buffer.			 ;AN000;
 1541  2E: 89 54 4E			MOV	CS:[SI].SAVED_CP,DX	;; WGR						 ;AN000;
 1545  E9 1741 R			JMP	ALL_RESET		;; WGR						 ;AN000;
 1548				NEXT_1: 				;; WGR						 ;AN000;
 1548  81 FB 004A R			CMP	BX,OFFSET BUF0		;; WGR if this is PRN..then..			 ;AN000;
 154C  75 08				JNE	NEXT_2			;; WGR						 ;AN000;
 154E  8D 36 009C R			LEA	SI,BUF1 		;; WGR copy to lpt1 buffer.			 ;AN000;
 1552  2E: 89 54 4E			MOV	CS:[SI].SAVED_CP,DX	;; WGR						 ;AN000;
 1556				NEXT_2: 				;; WGR						 ;AN000;
 1556  E9 1741 R			JMP	ALL_RESET		;; WGR exit invoke with good status		 ;AN000;
 1559				IR_0:					;; WGR						 ;AN000;
				;	 test	 cs:[di].SLT_AT, AT_ACT  ;AN001;If it is currently active, then do nothing
				;	 jnz	 Next_2 		 ;AN001;
 1559  2E: 83 7F 30 00			CMP	BUF.RBUFMX,0		;;
 155E  74 78				JE	INVK_RAM_PHYSICAL	;;
									;;
 1560  2E: 8B 45 02			MOV	AX,CS:[DI].SLT_AT	;;
 1564  25 0001				AND	AX,AT_RAM1		;; supports only ONE physical ram
 1567  75 6F				JNZ	INVK_RAM_PHYSICAL	;;
									;;
 1569  2E: 81 4F 1C 2000		OR	BUF.STATUS,LOADED	;; font has not been loaded
									;;
									;;
 156F  5A				POP	DX			;; stack -1
 1570  52				PUSH	DX			;; stack  1  (size)
									;;
									;;
 1571  51				PUSH	CX			;;
 1572  56				PUSH	SI			;;
 1573  57				PUSH	DI			;;
									;;
 1574  2B D1				SUB	DX,CX			;;
 1576  2E: 8B 47 38			MOV	AX,BUF.FTSTART		;;
 157A				LOCATE_FONT :				;;
 157A  23 D2				AND	DX,DX			;;
 157C  74 07				JZ	FONT_LOCATED		;;
 157E  2E: 03 47 34			ADD	AX,BUF.FTSZPA		;;
 1582  4A				DEC	DX			;;
 1583  EB F5				JMP	LOCATE_FONT		;;
									;;
 1585				FONT_LOCATED :				;;
									;; AX = FONT LOCATION (AX:0)
 1585  2E: 2B 7F 2E			SUB	DI,BUF.RAMSO		;;
 1589  D1 EF				SHR	DI,1			;; offset to the start of .FTDLEN
									;;
 158B  2E: 03 7F 3C			add	DI,buf.ftdlo		;; length of font data
 158F  2E: 8B 0D			mov	cx,cs:word ptr [di]	;;
				
				
Microsoft (R) Macro Assembler Version 5.10                  5/17/24 09:44:02
DOS - Code Page Switching - Printer Device Driver           Page     1-81


				;Before sending data, let's check the status of the printer
 1592  E8 175F R			call	Prt_status_check	;AN001;Check the printer status
 1595  74 06				jz	Send_Ram_Data		;AN001;O.K.?
 1597  5F				pop	di			;AN001;Balance the stack
 1598  5E				pop	si			;AN001;
 1599  59				pop	cx			;AN001;
 159A  EB 38 90				jmp	Ram_Prt_Status_Err	;AN001;return with error.
 159D				Send_Ram_Data:
 159D  2E: 8B 77 12			MOV	SI,BUF.RNORMO		;;
 15A1  2E: C6 04 14			MOV	CS:[SI].RHC_LEN,20	;;
 15A5  2E: C6 44 02 08			MOV	CS:[SI].RHC_CMD,CMD_WRT ;;
 15AA  2E: 89 4C 12			MOV	CS:[SI].RH3_CNT,CX	;;
 15AE  2E: C7 44 0E 0000		MOV	CS:[SI].RH3_DTAO,0	;;
 15B4  2E: 89 44 10			MOV	CS:[SI].RH3_DTAS,AX	;;
									;;
 15B8  53				PUSH	BX			;;
									;;
 15B9  53				PUSH	BX			;;
 15BA  5F				POP	DI			;; save BX in DI
 15BB  0E				PUSH	CS			;;
 15BC  07				POP	ES			;;
 15BD  8B DE				MOV	BX,SI			;; ES:BX = REQ_NORMn (CS:[SI])
									;;
 15BF  2E: FF 5D 06			CALL	DWORD PTR CS:[DI].LPT_STRAO
									;;
 15C3  2E: FF 5D 0A			CALL	DWORD PTR CS:[DI].LPT_INTRO
									;;
 15C7  5B				POP	BX			;;
									;;
 15C8  2E: 8B 44 03			MOV	AX,CS:[SI].RHC_STA	;;
									;;
 15CC  5F				POP	DI			;;
 15CD  5E				POP	SI			;;
 15CE  59				POP	CX			;;
									;;
 15CF  25 8000				AND	AX,STAT_ERROR		;; any error returned by normal device?
 15D2  74 04				JZ	INVK_RAM_PHYSICAL	;;
									;;
 15D4				Ram_Prt_Status_err:
 15D4  59				POP	CX			;; stack -1
 15D5  E9 174D R			JMP	IVK_DEVERR		;;
									;;-------------------------------------
									;; **** SEND THE SELECTION CONTROL ****
									;;
 15D8				INVK_RAM_PHYSICAL :			;;
									;;
 15D8  5A				POP	DX			;; stack -1
 15D9  52				PUSH	DX			;; stack  1  (size)
									;;
 15DA  57				PUSH	DI			;; stack 2
 15DB  56				PUSH	SI			;; stack 3
 15DC  06				PUSH	ES			;; stack 4
									;;
									;;
Microsoft (R) Macro Assembler Version 5.10                  5/17/24 09:44:02
DOS - Code Page Switching - Printer Device Driver           Page     1-82


									;; **** SUPPORT ONLY ONE PHYSICAL RAM
									;;
 15DD  2E: 8B 7F 1E			MOV	DI,BUF.PDESCO		;;
 15E1  2E: 8B 7D 18			MOV	DI,CS:[DI].SELR_O	;; the RAM-select controls
 15E5  33 C0				XOR	AX,AX			;;
 15E7  EB 75 90				JMP	CTL_DEF 		;;
									;;
									;; *******************************
									;; ** INVOKE HARDWARE CODEPAGE	**
									;; *******************************
									;; -- check if it is CLASS 1 device,
									;;    If so then send slection control
									;;    from the font buffer at FTSTART
									;;
									;; CX=inverse order of slot cp found
 15EA				IVK_HWCPCP:				;; code page found in HWCP slots
									;; set up the pointer to first controls
 15EA  2E: 83 7F 1A 04			CMP	CS:[BX].STATE,LOCKED	;; WGR are we locked?				 ;AN000;
 15EF  75 26				JNE	IR_1			;; WGR no..continue				 ;AN000;
 15F1  2E: 89 57 4E			MOV	CS:[BX].SAVED_CP,DX	;; WGR yes...save the code page 		 ;AN000;
 15F5  81 FB 009C R			CMP	BX,OFFSET BUF1		;; WGR if this is lpt1..then			 ;AN000;
 15F9  75 0B				JNE	NEXT_3			;; WGR						 ;AN000;
 15FB  8D 36 004A R			LEA	SI,BUF0 		;; WGR copy to PRN buffer.			 ;AN000;
 15FF  2E: 89 54 4E			MOV	CS:[SI].SAVED_CP,DX	;; WGR						 ;AN000;
 1603  E9 1741 R			JMP	ALL_RESET		;; WGR						 ;AN000;
 1606				NEXT_3: 				;; WGR						 ;AN000;
 1606  81 FB 004A R			CMP	BX,OFFSET BUF0		;; WGR if this is PRN..then..			 ;AN000;
 160A  75 08				JNE	NEXT_4			;; WGR						 ;AN000;
 160C  8D 36 009C R			LEA	SI,BUF1 		;; WGR copy to lpt1 buffer.			 ;AN000;
 1610  2E: 89 54 4E			MOV	CS:[SI].SAVED_CP,DX	;; WGR						 ;AN000;
 1614				NEXT_4: 				;; WGR						 ;AN000;
 1614  E9 1741 R			JMP	ALL_RESET		;; WGR exit invoke with good status		 ;AN000;
 1617				IR_1:					;; WGR						 ;AN000;
				;	 test	 cs:[di].SLT_AT, AT_ACT  ;AN001;If it is currently active, then do nothing
				;	 jnz	 Next_4 		 ;AN001;
 1617  5A				POP	DX			;; stack -1
 1618  52				PUSH	DX			;; stack  1  (size)
									;;
 1619  57				PUSH	DI			;; stack 2
 161A  56				PUSH	SI			;; stack 3
 161B  06				PUSH	ES			;; stack 4
									;;
 161C  2B D1				SUB	DX,CX			;; the slot's order in HWCP-slots(0-n)
									;;
 161E  2E: 83 7F 18 01			CMP	BUF.PCLASS,1		;;
 1623  75 20				JNE	SELECT_SLOT		;;
									;;
 1625  2E: 8B 47 38			MOV	AX,BUF.FTSTART		;; ***** CLASS 1 CODEPAGE SELECT  ****
 1629  23 D2				AND	DX,DX			;;
 162B  74 07				JZ	ADJUST_DI		;;
									;;
 162D				SELECTCP_LP :				;;
 162D  2E: 03 47 34			ADD	AX,BUF.FTSZPA		;;
									;;
Microsoft (R) Macro Assembler Version 5.10                  5/17/24 09:44:02
DOS - Code Page Switching - Printer Device Driver           Page     1-83


 1631  4A				DEC	DX			;;
 1632  75 F9				JNZ	SELECTCP_LP		;;
									;;
 1634				ADJUST_DI :				;;
 1634  8B F8				mov	DI,AX			;;
 1636  0E				PUSH	CS			;;
 1637  58				POP	AX			;;
 1638  2B F8				SUB	DI,AX			;;
 163A  D1 E7				SHL	DI,1			;;
 163C  D1 E7				SHL	DI,1			;;
 163E  D1 E7				SHL	DI,1			;;
 1640  D1 E7				SHL	DI,1			;;
 1642  EB 1A 90				JMP	CTL_DEF 		;;
									;;
									;; ** SELECT HARDWARE PHYSICAL SLOT **
 1645				SELECT_SLOT :				;;
 1645  2E: 8B 7F 1E			MOV	DI,BUF.PDESCO		;;
 1649  2E: 8B 7D 16			MOV	DI,CS:[DI].SELH_O	;; the HARDWARE-select controls
 164D  33 C0				XOR	AX,AX			;;
 164F  EB 01 90				JMP	RCTL_NXT		;;
									;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
									;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 1652				RCTL_NXT:				;; locate the right control sequence
 1652  23 D2				AND	DX,DX			;;
 1654  74 08				JZ	CTL_DEF 		;;
 1656  2E: 8A 05			MOV	AL,CS:[DI]		;;
 1659  03 F8				ADD	DI,AX			;;
 165B  4A				DEC	DX			;;
 165C  EB F4				JMP	RCTL_NXT		;;
									;;
									;; ********************************
									;; ** SEND OUT SELECTION CONTROL **
									;; ********************************
									;;
									;; code page is to be invoked
 165E				CTL_DEF :				;; DI points to the control sequence
				;Check the status of the printer before writing.
 165E  E8 175F R			call	Prt_status_check	;AN001;Check the printer status
 1661  74 03				jz	Ctl_Def_Send		;AN001;O.K.?
 1663  EB 59 90				jmp	Ctl_Dev_Err		;AN001;Error.
				
 1666				Ctl_Def_Send:
 1666  2E: 8B 77 12			MOV	SI,BUF.RNORMO		;;
 166A  2E: C6 04 14			MOV	CS:[SI].RHC_LEN,20	;;
 166E  2E: C6 44 02 08			MOV	CS:[SI].RHC_CMD,CMD_WRT ;;
									;;
 1673  33 C9				XOR	CX,CX			;;
 1675  2E: 8A 0D			MOV	CL,CS:[DI]		;;
									;;
 1678				CTL_NEXT_BYTE : 			;;
									;;
 1678  2E: 83 7F 18 01			CMP	BUF.PCLASS,1		;;
 167D  74 0A				JE	CTL_CLASS1		;;
									;;
Microsoft (R) Macro Assembler Version 5.10                  5/17/24 09:44:02
DOS - Code Page Switching - Printer Device Driver           Page     1-84


 167F  2E: 89 4C 12			MOV	CS:[SI].RH3_CNT,CX	;; send all at once
 1683  B9 0001				MOV	CX,1			;; sent only once.
 1686  EB 07 90				JMP	CTL_COMMON		;;
									;;
 1689				CTL_CLASS1 :				;; sent byte by byte to overcome
 1689  2E: C7 44 12 0001		MOV	CS:[SI].RH3_CNT,1	;; DOS timeout on kingman printer
 168F				CTL_COMMON :				;;
 168F  47				INC	DI			;;
 1690  2E: 89 7C 0E			MOV	CS:[SI].RH3_DTAO,DI	;;
 1694  0E				PUSH	CS			;;
 1695  58				POP	AX			;;
 1696  2E: 89 44 10			MOV	CS:[SI].RH3_DTAS,AX	;;
									;;
 169A  57				PUSH	DI			;;
 169B  53				PUSH	BX			;;
									;;
 169C  53				PUSH	BX			;;
 169D  5F				POP	DI			;; save BX in DI
 169E  0E				PUSH	CS			;;
 169F  07				POP	ES			;;
 16A0  8B DE				MOV	BX,SI			;; ES:BX = REQ_NORMn (CS:[SI])
									;;
 16A2  2E: FF 5D 06			CALL	DWORD PTR CS:[DI].LPT_STRAO
									;;
 16A6  2E: FF 5D 0A			CALL	DWORD PTR CS:[DI].LPT_INTRO
									;;
 16AA  5B				POP	BX			;;
 16AB  5F				POP	DI			;;
									;;
 16AC  2E: 8B 44 03			MOV	AX,CS:[SI].RHC_STA	;;
									;;
 16B0  25 8000				AND	AX,STAT_ERROR		;; any error returned by normal device?
 16B3  75 09				JNZ	CTL_DEV_ERR		;;
 16B5  49				DEC	CX			;;
 16B6  75 C0				JNZ	CTL_NEXT_BYTE		;;
									;;
 16B8  07				POP	ES			;; stack -4
 16B9  5E				POP	SI			;; stack -3
 16BA  5F				POP	DI			;; stack -2
 16BB  EB 08 90				JMP	IVK_CP			;;
									;;
 16BE				CTL_DEV_ERR :				;;
 16BE  07				POP	ES			;; stack -4
 16BF  5E				POP	SI			;; stack -3
 16C0  5F				POP	DI			;; stack -2
 16C1  59				POP	CX			;; stack -1
 16C2  E9 174D R			JMP	IVK_DEVERR		;;
									;;
									;; **********************************
									;; ** ADJUST WHICH CODEPAGE TO BE  **
									;; ** ACTIVE			   **
									;; **********************************
									;;
									;; -- set the attribute bit of the
Microsoft (R) Macro Assembler Version 5.10                  5/17/24 09:44:02
DOS - Code Page Switching - Printer Device Driver           Page     1-85


									;;    slot (SLT_AT) to active for
									;;    the code page just invoked.
									;; -- reset others to non-active.
									;;
									;;
 16C5				IVK_CP: 				;; SI = start of the slots compared
									;; DI = where code page was found
 16C5  59				POP	CX			;; stack -1
 16C6  56				PUSH	SI			;; stack 1 = start of slots compared
 16C7  2E: 8B 47 1C			mov	AX,BUF.STATUS		;;
 16CB  25 2000				AND	AX,LOADED		;;
 16CE  B8 2000				MOV	AX,AT_ACT		;;
 16D1  74 03				JZ	NO_LOAD 		;;
 16D3  0D 0001				OR	AX,AT_RAM1		;; reset loaded to physical RAM #1,
									;; this is reset only when there is
									;; font loading in this round of invoke
 16D6				NO_LOAD:				;; (for RAM codepages only)
 16D6  F7 D0				NOT	AX			;;
 16D8				NXT_CP: 				;;
 16D8  2E: 21 44 02			AND	CS:[SI].SLT_AT,AX	;; not active (and not loaded)
 16DC  46				INC	SI			;;
 16DD  46				INC	SI			;;
 16DE  46				INC	SI			;;
 16DF  46				INC	SI			;;
 16E0  49				DEC	CX			;;
 16E1  75 F5				JNZ	NXT_CP			;;
 16E3  2E: 81 4D 02 2000		OR	CS:[DI].SLT_AT,AT_ACT	;; the codepage found becomes active
 16E9  2E: 8B 47 1C			MOV	AX,BUF.STATUS		;;
 16ED  25 2000				AND	AX,LOADED		;;
 16F0  74 0B				JZ	HWCP_RESET		;;
 16F2  2E: 83 4D 02 01			OR	CS:[DI].SLT_AT,AT_RAM1	;; the font has just been loaded
 16F7  2E: 81 67 1C DFFF		AND	BUF.STATUS,NOT LOADED	;;
									;;
 16FD				HWCP_RESET :				;;
									;;
 16FD  5E				POP	SI			;; stack -1 (slot : ATs adjusted )
 16FE  56				PUSH	SI			;; stack 1 = start of slots compared
									;;
 16FF  2E: 8B 7F 24			MOV	DI,BUF.HARDSO		;;
 1703  3B F7				CMP	SI,DI			;;
 1705  74 18				JE	RAM_RESET		;;
									;; HWCP's AT to be reset
 1707  2E: 8B 4F 20			MOV	CX,BUF.HSLMX		;;
 170B  23 C9				AND	CX,CX			;;
 170D  74 10				JZ	RAM_RESET		;;
 170F  B8 2000				MOV	AX,AT_ACT		;;
 1712  F7 D0				NOT	AX			;;
 1714				RESET_HWCP :				;;
 1714  2E: 21 45 02			AND	CS:[DI].SLT_AT,AX	;; HWCP is not active
 1718  47				INC	DI			;;
 1719  47				INC	DI			;;
 171A  47				INC	DI			;;
 171B  47				INC	DI			;;
 171C  49				DEC	CX			;;
Microsoft (R) Macro Assembler Version 5.10                  5/17/24 09:44:02
DOS - Code Page Switching - Printer Device Driver           Page     1-86


 171D  75 F5				JNZ	RESET_HWCP		;;
									;;
									;;
 171F				RAM_RESET:				;;
									;;
 171F  5E				POP	SI			;; stack -1 (slot : ATs adjusted )
 1720  56				PUSH	SI			;; stack 1 = start of slots compared
									;;
 1721  2E: 8B 7F 2E			MOV	DI,BUF.RAMSO		;;
 1725  3B F7				CMP	SI,DI			;;
 1727  74 18				JE	ALL_RESET		;;
									;; HWCP's AT to be reset
 1729  2E: 8B 4F 2A			MOV	CX,BUF.RSLMX		;;
 172D  23 C9				AND	CX,CX			;; HWCP's no.
 172F  74 10				JZ	ALL_RESET		;;
 1731  B8 2000				MOV	AX,AT_ACT		;;
 1734  F7 D0				NOT	AX			;;
 1736				RESET_RAM :				;;
 1736  2E: 21 45 02			AND	CS:[DI].SLT_AT,AX	;; HWCP is not active
 173A  47				INC	DI			;;
 173B  47				INC	DI			;;
 173C  47				INC	DI			;;
 173D  47				INC	DI			;;
 173E  49				DEC	CX			;;
 173F  75 F5				JNZ	RESET_RAM		;;
									;;
 1741				ALL_RESET :				;;
 1741  5E				POP	SI			;; stack -1
									;;
 1742  33 C0				XOR	AX,AX			;;
 1744  EB 10 90				JMP	IVK_RET 		;;
									;;
 1747				NO_INVOKE :				;;
									;;
 1747  B8 8007				MOV	AX,STAT_NOCPIV		;;
 174A  EB 0A 90				JMP	IVK_RET 		;;
									;;
 174D				IVK_DEVERR :				;;
 174D  B8 800A				MOV	AX,STAT_DEVERR		;;
 1750  EB 04 90				JMP	IVK_RET 		;G;
									;;
 1753				IVK_CMDERR :				;G;
 1753  B8 8003				MOV	AX,STAT_CMDERR		;G;
									;;
 1756				IVK_RET :				;;
 1756  2E: C4 7F 0E			LES	DI,dword ptr buf.rh_ptro;;
 175A  26: 89 45 03			MOV	RH.RHC_STA,AX		;;
									;;
 175E  C3				RET				;;
									;;
 175F				INVOKE	ENDP				;;
									;;
				;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 175F				Prt_Status_Check	proc	near		;AN001;
Microsoft (R) Macro Assembler Version 5.10                  5/17/24 09:44:02
DOS - Code Page Switching - Printer Device Driver           Page     1-87


				;Check the printer device status
				;Out) if Zero flag set - Ok.
				;     All registers saved.
				
 175F  06				push	es				;AN001;
 1760  56				push	si				;AN001;
				
 1761  2E: 8B 77 12			mov	si, BUF.RNORMO			;AN001;
 1765  2E: C6 04 0D			mov	cs:[si].RHC_LEN, 13		;AN001;
 1769  2E: C6 44 02 0A			mov	cs:[si].RHC_CMD, 10		;AN001;device driver status check
				
 176E  57				push	di				;AN001;
 176F  53				push	bx				;AN001;
				
 1770  53				push	bx				;AN001;
 1771  5F				pop	di				;AN001;
 1772  0E				push	cs				;AN001;
 1773  07				pop	es				;AN001;ES:BX -> REQ_NORMn (was cs:si)
 1774  8B DE				mov	bx, si				;AN001;
				
 1776  2E: FF 5D 06			call	dword ptr cs:[di].LPT_STRAO	;AN001;Strategy
 177A  2E: FF 5D 0A			call	dword ptr cs:[di].LPT_INTRO	;AN001;Intrrupt
 177E  2E: F7 44 03 8000		test	cs:[si].RHC_STA, STAT_ERROR	;AN001;
 1784  5B				pop	bx				;AN001;
 1785  5F				pop	di				;AN001;
				
 1786  5E				pop	si				;AN001;
 1787  07				pop	es				;AN001;
 1788  C3				ret					;AN001;
 1789				Prt_Status_Check	endp			;AN001;
				
				
				
				;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
				;;
				;;====	Generic IOCTL Query Invoked  =======
				;;
				;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
									;;
 1789				Q_INVOKED PROC				;;
 1789  1E				push	ds			;;
									;;
 178A  2E: 8B 47 1A			MOV	AX,BUF.STATE		;; ???????????????
 178E  3D 0004				CMP	AX,LOCKED		;; WGR						 ;AN000;
 1791  75 10				JNE	QI_0			;; WGR						 ;AN000;
 1793  2E: 8B 47 4E			MOV	AX,BUF.SAVED_CP 	;; WGR						 ;AN000;
 1797  26: C5 75 13			LDS	SI,RH.GIH_GBA		;; WGR						 ;AN000;
 179B  3D FFFF				CMP	AX,-1			;; WGR						 ;AN000;
 179E  74 44				JE	QIV_NOACT		;; WGR						 ;AN000;
 17A0  EB 4B 90				JMP	QI_1			;; WGR						 ;AN000;
 17A3				QI_0:					;; WGR						 ;AN000;
 17A3  3D 0001				CMP	AX,CPSW 		;; reject only in NORMAL !!!!
 17A6  75 57				JNE	QIV_CMDERR		;G;
									;;-------------------------
Microsoft (R) Macro Assembler Version 5.10                  5/17/24 09:44:02
DOS - Code Page Switching - Printer Device Driver           Page     1-88


 17A8  26: C5 75 13			LDS	SI,RH.GIH_GBA		;;
									;;
 17AC  2E: 8B 7F 2E			MOV	DI,BUF.RAMSO		;;
 17B0  2E: 8B 4F 2A			MOV	CX,BUF.RSLMX		;;
 17B4  23 C9				AND	CX,CX			;;
 17B6  74 10				JZ	QIV_HARD		;;
									;;
 17B8				QIV_RAMLP :				;;
 17B8  2E: 8B 45 02			MOV	AX,CS:[DI].SLT_AT	;; check the RAM slots
 17BC  25 2000				AND	AX,AT_ACT		;;
 17BF  75 29				JNZ	QIV_FOUND		;;
 17C1  47				INC	DI			;;
 17C2  47				INC	DI			;;
 17C3  47				INC	DI			;;
 17C4  47				INC	DI			;;
 17C5  49				DEC	CX			;;
 17C6  75 F0				JNZ	QIV_RAMLP		;;
									;;
 17C8				QIV_HARD :				;;
 17C8  2E: 8B 7F 24			MOV	DI,BUF.HARDSO		;;
 17CC  2E: 8B 4F 20			MOV	CX,BUF.HSLMX		;;
 17D0  23 C9				AND	CX,CX			;;
 17D2  74 10				JZ	QIV_NOACT		;;
									;;
 17D4				QIV_HARDLP :				;;
 17D4  2E: 8B 45 02			MOV	AX,CS:[DI].SLT_AT	;; check the RAM slots
 17D8  25 2000				AND	AX,AT_ACT		;;
 17DB  75 0D				JNZ	QIV_FOUND		;;
 17DD  47				INC	DI			;;
 17DE  47				INC	DI			;;
 17DF  47				INC	DI			;;
 17E0  47				INC	DI			;;
 17E1  49				DEC	CX			;;
 17E2  75 F0				JNZ	QIV_HARDLP		;;
									;;
 17E4				QIV_NOACT :				;;
									;;
 17E4  B8 8007				MOV	AX,STAT_NOCPIV		;;
 17E7  EB 19 90				JMP	QIV_RET 		;;
									;;
									;;
 17EA				QIV_FOUND :				;;
 17EA  2E: 8B 05			MOV	AX,CS:[DI].SLT_CP	;;
 17ED				QI_1:					;; WGR						 ;AN000;
 17ED  C7 04 0002			MOV	GIOB.GB2_LEN,2		;;
 17F1  89 44 02				MOV	GIOB.GB2_CP,AX		;;
									;;
 17F4  33 C0				XOR	AX,AX			;;
 17F6  EB 0A 90				JMP	QIV_RET 		;;
									;;
 17F9				QIV_DEVERR :				;;
 17F9  B8 800A				MOV	AX,STAT_DEVERR		;;
 17FC  EB 04 90				JMP	QIV_RET 		;G;
									;;
Microsoft (R) Macro Assembler Version 5.10                  5/17/24 09:44:02
DOS - Code Page Switching - Printer Device Driver           Page     1-89


 17FF				QIV_CMDERR :				;G;
 17FF  B8 8003				MOV	AX,STAT_CMDERR		;G;
									;;
 1802				QIV_RET :				;;
 1802  2E: C4 7F 0E			LES	DI,dword ptr buf.rh_ptro ;;
 1806  26: 89 45 03			MOV	RH.RHC_STA,AX		;;
									;;
 180A  1F				pop	ds			;;
									;;
 180B  C3				RET				;;
									;;
 180C				Q_INVOKED ENDP				;;
				;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
				;;
				;;====	Generic IOCTL Query List  =======
				;;
				;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 180C				Q_LIST	PROC				;;
									;;
 180C  1E				push	ds			;;
									;;
 180D  2E: 8B 47 1A			MOV	AX,BUF.STATE		;;  ????????????????
 1811  3D 0001				CMP	AX,CPSW 		;; reject only in NORMAL
 1814  74 08				JE	QLS_CPSW		;;
 1816  3D 0004				CMP	AX,LOCKED		;; WGR						 ;AN000;
 1819  74 03				JE	QLS_CPSW		;; WGR						 ;AN000;
 181B  E9 18AC R			JMP	QLS_CMDERR		;G;
 181E				QLS_CPSW :				;;-------------------------
 181E  26: C5 75 13			LDS	SI,RH.GIH_GBA		;;
 1822  56				PUSH	SI			;; stack 1 -- GB3 (SI)
									;;
 1823  2E: 8B 7F 24			MOV	DI,BUF.HARDSO		;;
 1827  2E: 8B 4F 22			MOV	CX,BUF.HARDMX		;;
 182B  2E: 8B 57 20			MOV	DX,BUF.HSLMX		;; DX = number of entries
 182F  8D 74 02				LEA	SI,[SI].GB3_GBL 	;;
 1832  89 0C				MOV	GIOB.GBL_LEN,CX 	;;
									;;
 1834				QL_HARDLP:				;;
 1834  23 C9				AND	CX,CX			;;
 1836  74 0F				JZ	QL_PREPARE		;;
 1838  2E: 8B 05			MOV	AX,CS:[DI].SLT_CP	;;
 183B  89 44 02				MOV	GIOB.GBL_CP,AX		;;
 183E  47				INC	DI			;;
 183F  47				INC	DI			;;
 1840  47				INC	DI			;;
 1841  47				INC	DI			;;
 1842  46				INC	SI			;;
 1843  46				INC	SI			;;
 1844  49				DEC	CX			;;
 1845  EB ED				JMP	QL_HARDLP		;;
									;;
 1847				QL_PREPARE:				;;
 1847  2E: 8B 4F 20			MOV	CX,BUF.HSLMX		;;
 184B  2E: 2B 4F 22			SUB	CX,BUF.HARDMX		;; less the no. of HWCP
Microsoft (R) Macro Assembler Version 5.10                  5/17/24 09:44:02
DOS - Code Page Switching - Printer Device Driver           Page     1-90


 184F  2E: 8B 57 2A			MOV	DX,BUF.RSLMX		;;
 1853  03 D1				ADD	DX,CX			;; DX = total number of entries
 1855  46				INC	SI			;;
 1856  46				INC	SI			;;
 1857  89 14				MOV	GIOB.GBL_LEN,DX 	;;
 1859				QL_CARTLP:				;;
 1859  23 C9				AND	CX,CX			;;
 185B  74 0F				JZ	QL_RAM_PREP		;;
 185D  2E: 8B 05			MOV	AX,CS:[DI].SLT_CP	;;
 1860  89 44 02				MOV	GIOB.GBL_CP,AX		;;
 1863  47				INC	DI			;;
 1864  47				INC	DI			;;
 1865  47				INC	DI			;;
 1866  47				INC	DI			;;
 1867  46				INC	SI			;;
 1868  46				INC	SI			;;
 1869  49				DEC	CX			;;
 186A  EB ED				JMP	QL_CARTLP		;;
									;;
									;;
 186C				QL_RAM_PREP:				;;
 186C  2E: 8B 7F 2E			MOV	DI,BUF.RAMSO		;;
 1870  2E: 8B 4F 2A			MOV	CX,BUF.RSLMX		;;
									;;
 1874				QL_RAMLP :				;;
 1874  23 C9				AND	CX,CX			;;
 1876  74 0F				JZ	QL_DONE 		;;
 1878  2E: 8B 05			MOV	AX,CS:[DI].SLT_CP	;;
 187B  89 44 02				MOV	GIOB.GBL_CP,AX		;;
 187E  47				INC	DI			;;
 187F  47				INC	DI			;;
 1880  47				INC	DI			;;
 1881  47				INC	DI			;;
 1882  46				INC	SI			;;
 1883  46				INC	SI			;;
 1884  49				DEC	CX			;;
 1885  EB ED				JMP	QL_RAMLP		;;
									;;
 1887				QL_DONE:				;;
 1887  5E				POP	SI			;; stack -1
 1888  2E: 8B 57 20			mov	dx,buf.hslmx		;;
 188C  2E: 03 57 2A			add	DX,BUF.RSLMX		;;
 1890  42				INC	DX			;;
 1891  42				INC	DX			;;
 1892  B9 0001				MOV	CX,1			;;
 1895  D3 E2				SHL	DX,CL			;;
 1897  89 14				MOV	GIOB.GB3_LEN,DX 	;;
									;;
 1899  33 C0				XOR	AX,AX			;;
 189B  83 FA 04				CMP	DX,GB3_MINILEN		;; min. GBL length
 189E  77 0F				JA	QLS_RET 		;;
 18A0  B8 8007				MOV	AX,STAT_NOCP		;;
 18A3  EB 0A 90				JMP	QLS_RET 		;;
									;;
Microsoft (R) Macro Assembler Version 5.10                  5/17/24 09:44:02
DOS - Code Page Switching - Printer Device Driver           Page     1-91


 18A6				QLS_DEVERR :				;;
 18A6  B8 800A				MOV	AX,STAT_DEVERR		;;
 18A9  EB 04 90				JMP	QLS_RET 		;G;
									;;
 18AC				QLS_CMDERR :				;G;
 18AC  B8 8003				MOV	AX,STAT_CMDERR		;G;
									;;
 18AF				QLS_RET :				;;
 18AF  2E: C4 7F 0E			LES	DI,dword ptr buf.rh_ptro ;;
 18B3  26: 89 45 03			MOV	RH.RHC_STA,AX		;;
									;;
 18B7  1F				pop	ds			;;
 18B8  C3				RET				;;
									;;
 18B9				Q_LIST	ENDP				;;
				;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
				;
				;	CHECK_PRINT_ACTIVE
				;
				;	THIS ROUTINE IS CALLED BEFORE THE INVOKE, DESIGNATE
				;	COMMANDS ARE OPERATED ON.  THIS IS TO PREVENT CONFLICT
				;	BETWEEN THE BACKGROUND PRINTING AND THE DOWNLOAD SEQUENCE.
				;
				;	INPUT:
				;		CS:[BX].DEV_HDRO  OFFSET AND SEGMENT OF ACTIVE DEVICE
				;		CS:[BX].DEV_HDRS
				;
				;	WARNING:  IF ANOTHER DEVICE DRIVER IS TO TAKE THE LPTx, THEN
				;		  THIS WILL not FIND OUT THAT THE PRINTER.SYS IS ACTIVE.
				;
				;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 18B9				CHECK_PRINT_ACTIVE	PROC		;G;
 18B9  50				PUSH	AX			;G; SAVE THE REGISTERS............
 18BA  56				PUSH	SI			;G;
 18BB  57				PUSH	DI			;G;
 18BC  1E				PUSH	DS			;G;
 18BD  06				PUSH	ES			;G;
									;G;
 18BE  2E: 8B 7F 04			MOV	DI,BUF.DEV_HDRS 	;G; SETUP ES: = ACTIVE DEVICE SEGMENT
 18C2  8E C7				MOV	ES,DI			;G;		  &
 18C4  2E: 8B 7F 02			MOV	DI,BUF.DEV_HDRO 	;G; SETUP DI: = ACTIVE DEVICE OFFSET
									;G;
 18C8  B8 0106				MOV	AX,0106H		;G; PRINT (GET LIST DEVICE)
 18CB  F8				CLC				;G;
 18CC  73 10				JNC	CPA_5			;G; CY=0 IF NOT LOADED/NOT ACTIVE
									;G;
 18CE  3B F7				CMP	SI,DI			;G; ES:DI POINTS TO THE ACTIVE DEVICE
 18D0  75 0C				JNE	CPA_5			;G;
 18D2  8C DE				MOV	SI,DS			;G;
 18D4  8C C7				MOV	DI,ES			;G;
 18D6  3B F7				CMP	SI,DI			;G;
 18D8  75 04				JNE	CPA_5			;G;
 18DA  F9				STC				;G; OTHERWISE, THIS DEVICE IS PRESENTLY
 18DB  EB 02 90				JMP	CPA_6			;G; UNDER PRINT!!!  PREVENT DATASTREAM
Microsoft (R) Macro Assembler Version 5.10                  5/17/24 09:44:02
DOS - Code Page Switching - Printer Device Driver           Page     1-92


									;G; CONFLICT IN THIS CASE.
									;G;
				;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;G; PRINT.COM IS ASLEEP OR IS NOT
									;G; PRESENTLY LOADED.  THE PRINTER.SYS
 18DE  F8			CPA_5:	CLC				;G; CAN CONTINUE IT PROCESS!
 18DF  07			CPA_6:	POP	ES			;G; RESTORE REGISTERS.....
 18E0  1F				POP	DS			;G;
 18E1  5F				POP	DI			;G;
 18E2  5E				POP	SI			;G;
 18E3  58				POP	AX			;G;
 18E4  C3				RET				;G;
 18E5				CHECK_PRINT_ACTIVE	ENDP		;G;
				;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
				
				
				
 18E5				CSEG	ENDS
					END
Microsoft (R) Macro Assembler Version 5.10                  5/17/24 09:44:02
DOS - Code Page Switching - Printer Device Driver           Symbols-1


Structures and Records:

                N a m e                 Width   # fields
                                        Shift   Width   Mask    Initial

BUF_DATA . . . . . . . . . . . .  	0052	0024
  BFLAG  . . . . . . . . . . . .  	0000
  DEV_HDRO . . . . . . . . . . .  	0002
  DEV_HDRS . . . . . . . . . . .  	0004
  LPT_STRAO  . . . . . . . . . .  	0006
  LPT_STRAS  . . . . . . . . . .  	0008
  LPT_INTRO  . . . . . . . . . .  	000A
  LPT_INTRS  . . . . . . . . . .  	000C
  RH_PTRO  . . . . . . . . . . .  	000E
  RH_PTRS  . . . . . . . . . . .  	0010
  RNORMO . . . . . . . . . . . .  	0012
  PRN_BUFO . . . . . . . . . . .  	0014
  DID_PRN  . . . . . . . . . . .  	0016
  PCLASS . . . . . . . . . . . .  	0018
  STATE  . . . . . . . . . . . .  	001A
  STATUS . . . . . . . . . . . .  	001C
  PDESCO . . . . . . . . . . . .  	001E
  HSLMX  . . . . . . . . . . . .  	0020
  HARDMX . . . . . . . . . . . .  	0022
  HARDSO . . . . . . . . . . . .  	0024
  HCARMX . . . . . . . . . . . .  	0026
  HRBUFO . . . . . . . . . . . .  	0028
  RSLMX  . . . . . . . . . . . .  	002A
  RAMMX  . . . . . . . . . . . .  	002C
  RAMSO  . . . . . . . . . . . .  	002E
  RBUFMX . . . . . . . . . . . .  	0030
  RMBUFO . . . . . . . . . . . .  	0032
  FTSZPA . . . . . . . . . . . .  	0034
  FTSIZE . . . . . . . . . . . .  	0036
  FTSTART  . . . . . . . . . . .  	0038
  FTSLOTO  . . . . . . . . . . .  	003A
  FTDLO  . . . . . . . . . . . .  	003C
  FSELEN . . . . . . . . . . . .  	003E
  FSELMAX  . . . . . . . . . . .  	0040
  PAR_EXTRACTO . . . . . . . . .  	0042
  SAVED_CP . . . . . . . . . . .  	004E
  BUFEND . . . . . . . . . . . .  	0050
DHS  . . . . . . . . . . . . . .  	0012	0006
  DH_NEXTO . . . . . . . . . . .  	0000
  DH_NEXTS . . . . . . . . . . .  	0002
  DH_STRAO . . . . . . . . . . .  	0006
  DH_INTRO . . . . . . . . . . .  	0008
  DH_NAME  . . . . . . . . . . .  	000A
FBUFS  . . . . . . . . . . . . .  	000A	0004
  FLAG . . . . . . . . . . . . .  	0000
  BUFFER_LEN . . . . . . . . . .  	0002
  BUFFER_ADDR  . . . . . . . . .  	0004
  NUM_FTBLK  . . . . . . . . . .  	0008
FTBLK  . . . . . . . . . . . . .  	002A	0014
Microsoft (R) Macro Assembler Version 5.10                  5/17/24 09:44:02
DOS - Code Page Switching - Printer Device Driver           Symbols-2


  FTB_LENGTH . . . . . . . . . .  	0000
  FTB_STATUS . . . . . . . . . .  	0002
  FTB_TYPE . . . . . . . . . . .  	0004
  FTB_TID  . . . . . . . . . . .  	0006
  FTB_CP . . . . . . . . . . . .  	000E
  FTB_MOD  . . . . . . . . . . .  	0010
  FTB_FONTS  . . . . . . . . . .  	0012
  FTB_ROWS . . . . . . . . . . .  	0014
  FTB_COLS . . . . . . . . . . .  	0015
  FTB_X  . . . . . . . . . . . .  	0016
  FTB_Y  . . . . . . . . . . . .  	0017
  FTB_COUNT  . . . . . . . . . .  	0018
  FTB_SELECT . . . . . . . . . .  	001A
  FTB_SELLEN . . . . . . . . . .  	001C
  FTB_DLEFT  . . . . . . . . . .  	001E
  FTB_DLEN . . . . . . . . . . .  	0020
  FTB_DALO . . . . . . . . . . .  	0022
  FTB_DAHI . . . . . . . . . . .  	0024
  TARGET_LO  . . . . . . . . . .  	0026
  TARGET_HI  . . . . . . . . . .  	0028
GB1S . . . . . . . . . . . . . .  	0008	0004
  GB1_FLAG . . . . . . . . . . .  	0000
  GB1_LEN  . . . . . . . . . . .  	0002
  GB1_NUM  . . . . . . . . . . .  	0004
  GB1_CP . . . . . . . . . . . .  	0006
GB2S . . . . . . . . . . . . . .  	0004	0002
  GB2_LEN  . . . . . . . . . . .  	0000
  GB2_CP . . . . . . . . . . . .  	0002
GB3S . . . . . . . . . . . . . .  	0004	0002
  GB3_LEN  . . . . . . . . . . .  	0000
  GB3_GBL  . . . . . . . . . . .  	0002
GBLS . . . . . . . . . . . . . .  	0004	0002
  GBL_LEN  . . . . . . . . . . .  	0000
  GBL_CP . . . . . . . . . . . .  	0002
GIH  . . . . . . . . . . . . . .  	0017	0006
  GIH_MAF  . . . . . . . . . . .  	000D
  GIH_MIF  . . . . . . . . . . .  	000E
  GIH_SI . . . . . . . . . . . .  	000F
  GIH_DI . . . . . . . . . . . .  	0011
  GIH_GBA  . . . . . . . . . . .  	0013
PARSE_DESG . . . . . . . . . . .  	0006	0003
  NUM_VALUES . . . . . . . . . .  	0000
  NUM_DESGS  . . . . . . . . . .  	0002
  NUM_FONTS  . . . . . . . . . .  	0004
PARSE_HWCP . . . . . . . . . . .  	0016	000B
  NUM_HWCPS  . . . . . . . . . .  	0000
  HWCP_1 . . . . . . . . . . . .  	0002
  HWCP_2 . . . . . . . . . . . .  	0004
  HWCP_3 . . . . . . . . . . . .  	0006
  HWCP_4 . . . . . . . . . . . .  	0008
  HWCP_5 . . . . . . . . . . . .  	000A
  HWCP_6 . . . . . . . . . . . .  	000C
  HWCP_7 . . . . . . . . . . . .  	000E
  HWCP_8 . . . . . . . . . . . .  	0010
Microsoft (R) Macro Assembler Version 5.10                  5/17/24 09:44:02
DOS - Code Page Switching - Printer Device Driver           Symbols-3


  HWCP_9 . . . . . . . . . . . .  	0012
  HWCP_10  . . . . . . . . . . .  	0014
PARSE_NAME . . . . . . . . . . .  	000A	0002
  N_LENGTH . . . . . . . . . . .  	0000
  FNAME  . . . . . . . . . . . .  	0002
PARSE_OFFSETS  . . . . . . . . .  	000C	0006
  DN_OFFSET  . . . . . . . . . .  	0002
  DI_OFFSET  . . . . . . . . . .  	0004
  DCP_OFFSET . . . . . . . . . .  	0006
  DD_OFFSET  . . . . . . . . . .  	0008
PAR_DESGT  . . . . . . . . . . .  	0006	0003
  PAR_DESGL  . . . . . . . . . .  	0000
  PAR_DESG . . . . . . . . . . .  	0002
  PAR_FONT . . . . . . . . . . .  	0004
PAR_DEVOT  . . . . . . . . . . .  	000C	0006
  PAR_ONUM . . . . . . . . . . .  	0000
  PAR_DNMO . . . . . . . . . . .  	0002
  PAR_DIDO . . . . . . . . . . .  	0004
  PAR_HWCPO  . . . . . . . . . .  	0006
  PAR_DESGO  . . . . . . . . . .  	0008
  PAR_PARMO  . . . . . . . . . .  	000A
PAR_DIDT . . . . . . . . . . . .  	0003	0002
  PAR_DIDL . . . . . . . . . . .  	0000
  PAR_DID  . . . . . . . . . . .  	0002
PAR_DNMT . . . . . . . . . . . .  	0003	0002
  PAR_DNML . . . . . . . . . . .  	0000
  PAR_DNM  . . . . . . . . . . .  	0002
PAR_HWCPT  . . . . . . . . . . .  	0004	0002
  PAR_HWCPL  . . . . . . . . . .  	0000
  PAR_HWCP . . . . . . . . . . .  	0002
PAR_OT . . . . . . . . . . . . .  	0004	0002
  PAR_DEV_NUM  . . . . . . . . .  	0000
  PAR_OFF  . . . . . . . . . . .  	0002
PAR_PARMT  . . . . . . . . . . .  	0004	0002
  PAR_PARML  . . . . . . . . . .  	0000
  PAR_PARM . . . . . . . . . . .  	0002
PDS  . . . . . . . . . . . . . .  	001C	0004
  SELH_O . . . . . . . . . . . .  	0016
  SELR_O . . . . . . . . . . . .  	0018
  SELB_O . . . . . . . . . . . .  	001A
PDSH . . . . . . . . . . . . . .  	0016	0009
  PD_LEN . . . . . . . . . . . .  	0000
  TYPEID . . . . . . . . . . . .  	0002
  VMINOR . . . . . . . . . . . .  	000A
  VMAJOR . . . . . . . . . . . .  	000B
  CLASS  . . . . . . . . . . . .  	000C
  FONTSZ . . . . . . . . . . . .  	000E
  HSLOTS . . . . . . . . . . . .  	0010
  HWCPMIN  . . . . . . . . . . .  	0012
  RSLOTS . . . . . . . . . . . .  	0014
RH0  . . . . . . . . . . . . . .  	0019	0007
  RH0_ENDO . . . . . . . . . . .  	000E
  RH0_ENDS . . . . . . . . . . .  	0010
  RH0_BPBA . . . . . . . . . . .  	0012
Microsoft (R) Macro Assembler Version 5.10                  5/17/24 09:44:02
DOS - Code Page Switching - Printer Device Driver           Symbols-4


  RH0_CONFIG_ERRMSG  . . . . . .  	0017
RH3  . . . . . . . . . . . . . .  	0014	0005
  RH3_DTAO . . . . . . . . . . .  	000E
  RH3_DTAS . . . . . . . . . . .  	0010
  RH3_CNT  . . . . . . . . . . .  	0012
RHC  . . . . . . . . . . . . . .  	000D	0005
  RHC_LEN  . . . . . . . . . . .  	0000
  RHC_CMD  . . . . . . . . . . .  	0002
  RHC_STA  . . . . . . . . . . .  	0003
SLTS . . . . . . . . . . . . . .  	0004	0002
  SLT_CP . . . . . . . . . . . .  	0000
  SLT_AT . . . . . . . . . . . .  	0002

Segments and Groups:

                N a m e         	Length	 Align	Combine Class

CSEG . . . . . . . . . . . . . .  	18E5	PARA	PUBLIC	'CODE'

Symbols:            

                N a m e         	Type	 Value	 Attr

ADJUST_DI  . . . . . . . . . . .  	L NEAR	1634	CSEG
ALL_RESET  . . . . . . . . . . .  	L NEAR	1741	CSEG
ASSIGN_CP  . . . . . . . . . . .  	L NEAR	13B9	CSEG
ASSIGN_CP_CART . . . . . . . . .  	L NEAR	13A0	CSEG
ASSIGN_NEXT  . . . . . . . . . .  	L NEAR	1403	CSEG
ASSIGN_RAM . . . . . . . . . . .  	L NEAR	13A3	CSEG
AT_ACT . . . . . . . . . . . . .  	NUMBER	2000	
AT_FONT  . . . . . . . . . . . .  	NUMBER	0200	
AT_HWCP  . . . . . . . . . . . .  	NUMBER	4000	
AT_LOAD  . . . . . . . . . . . .  	NUMBER	0100	
AT_NO_FONT . . . . . . . . . . .  	NUMBER	FDFF	
AT_NO_LOAD . . . . . . . . . . .  	NUMBER	FEFF	
AT_OCC . . . . . . . . . . . . .  	NUMBER	1000	
AT_OLD . . . . . . . . . . . . .  	NUMBER	8000	
AT_RAM1  . . . . . . . . . . . .  	NUMBER	0001	
AT_RAM2  . . . . . . . . . . . .  	NUMBER	0002	
AT_RAM3  . . . . . . . . . . . .  	NUMBER	0004	
AT_RAM4  . . . . . . . . . . . .  	NUMBER	0008	
AT_RAMS  . . . . . . . . . . . .  	NUMBER	000F	
AT_SELECT  . . . . . . . . . . .  	NUMBER	0400	

BAD_DEVICE_MSG . . . . . . . . .  	NUMBER	0002	
BAD_SYNTAX_MSG . . . . . . . . .  	NUMBER	000C	
BF_LPT1  . . . . . . . . . . . .  	NUMBER	0001	
BF_LPT2  . . . . . . . . . . . .  	NUMBER	0002	
BF_LPT3  . . . . . . . . . . . .  	NUMBER	0003	
BF_MEM_DONE  . . . . . . . . . .  	NUMBER	8000	
BF_PRN . . . . . . . . . . . . .  	NUMBER	0000	
BUF  . . . . . . . . . . . . . .  	TEXT  CS:[BX]		
BUF0 . . . . . . . . . . . . . .  	L NEAR	004A	CSEG	Global
BUF1 . . . . . . . . . . . . . .  	L NEAR	009C	CSEG	Global
Microsoft (R) Macro Assembler Version 5.10                  5/17/24 09:44:02
DOS - Code Page Switching - Printer Device Driver           Symbols-5


BUF2 . . . . . . . . . . . . . .  	L NEAR	00EE	CSEG	Global
BUF3 . . . . . . . . . . . . . .  	L NEAR	0140	CSEG	Global
BUF_DEFINE . . . . . . . . . . .  	L NEAR	101A	CSEG

CASES  . . . . . . . . . . . . .  	L WORD	0828	CSEG
CHECK_FSTAT  . . . . . . . . . .  	L NEAR	0C8D	CSEG
CHECK_OTHER  . . . . . . . . . .  	L NEAR	11BC	CSEG
CHECK_PRINT_ACTIVE . . . . . . .  	N PROC	18B9	CSEG	Length = 002C
CHECK_RETURN . . . . . . . . . .  	L NEAR	0C42	CSEG
CMD_CODES  . . . . . . . . . . .  	L BYTE	081F	CSEG
CMD_GIO  . . . . . . . . . . . .  	NUMBER	0013	
CMD_INDX . . . . . . . . . . . .  	NUMBER	0004	
CMD_INI  . . . . . . . . . . . .  	NUMBER	0000	
CMD_WRT  . . . . . . . . . . . .  	NUMBER	0008	
CMP_CP . . . . . . . . . . . . .  	L NEAR	103E	CSEG
COMMON_INTR  . . . . . . . . . .  	L NEAR	0AE0	CSEG
COMPLEX  . . . . . . . . . . . .  	NUMBER	0004	
COPY_SELECT  . . . . . . . . . .  	L NEAR	0DB8	CSEG
CPA_5  . . . . . . . . . . . . .  	L NEAR	18DE	CSEG
CPA_6  . . . . . . . . . . . . .  	L NEAR	18DF	CSEG
CPSW . . . . . . . . . . . . . .  	NUMBER	0001	
CTL4201_B  . . . . . . . . . . .  	L BYTE	0478	CSEG	Length = 0020
CTL4201_H  . . . . . . . . . . .  	L NEAR	0438	CSEG
CTL4201_R  . . . . . . . . . . .  	L NEAR	043E	CSEG
CTL4208_B  . . . . . . . . . . .  	L BYTE	05B1	CSEG	Length = 0020
CTL4208_H  . . . . . . . . . . .  	L NEAR	0571	CSEG
CTL4208_R  . . . . . . . . . . .  	L NEAR	0591	CSEG
CTL5202_B  . . . . . . . . . . .  	L BYTE	0515	CSEG	Length = 0020
CTL5202_H  . . . . . . . . . . .  	L NEAR	04D4	CSEG
CTL5202_OFFS . . . . . . . . . .  	NUMBER	0008	
CTL5202_R  . . . . . . . . . . .  	L NEAR	0514	CSEG
CTLRES2_B  . . . . . . . . . . .  	L BYTE	064E	CSEG	Length = 0020
CTLRES2_H  . . . . . . . . . . .  	L NEAR	060D	CSEG
CTLRES2_R  . . . . . . . . . . .  	L NEAR	060E	CSEG
CTL_ADDR . . . . . . . . . . . .  	L NEAR	0D83	CSEG
CTL_CLASS1 . . . . . . . . . . .  	L NEAR	1689	CSEG
CTL_COMMON . . . . . . . . . . .  	L NEAR	168F	CSEG
CTL_DEF  . . . . . . . . . . . .  	L NEAR	165E	CSEG
CTL_DEF_SEND . . . . . . . . . .  	L NEAR	1666	CSEG
CTL_DEV_ERR  . . . . . . . . . .  	L NEAR	16BE	CSEG
CTL_LOCATED  . . . . . . . . . .  	L NEAR	0D8E	CSEG
CTL_MAX  . . . . . . . . . . . .  	NUMBER	0020	
CTL_NEXT_BYTE  . . . . . . . . .  	L NEAR	1678	CSEG
CTL_NOT_COPIED . . . . . . . . .  	L NEAR	0D03	CSEG

DEFINE_DID . . . . . . . . . . .  	L NEAR	111B	CSEG
DEN_ENDED  . . . . . . . . . . .  	L NEAR	136C	CSEG
DEN_FAIL . . . . . . . . . . . .  	L NEAR	144B	CSEG
DEN_FAIL_LOOP  . . . . . . . . .  	L NEAR	1470	CSEG
DEN_FAIL_NEXT  . . . . . . . . .  	L NEAR	1491	CSEG
DEN_FAIL_RET . . . . . . . . . .  	L NEAR	1498	CSEG
DEN_FONT . . . . . . . . . . . .  	L NEAR	135E	CSEG
DEN_FTABLE . . . . . . . . . . .  	L NEAR	1343	CSEG
DEN_NOT_CPSW . . . . . . . . . .  	L NEAR	131A	CSEG
Microsoft (R) Macro Assembler Version 5.10                  5/17/24 09:44:02
DOS - Code Page Switching - Printer Device Driver           Symbols-6


DEN_NOT_NORMAL . . . . . . . . .  	L NEAR	1322	CSEG
DEN_NO_SELECT  . . . . . . . . .  	L NEAR	1446	CSEG
DEN_OTHER  . . . . . . . . . . .  	L NEAR	132A	CSEG
DEN_RAM_FAIL . . . . . . . . . .  	L NEAR	1460	CSEG
DEN_REFRESH  . . . . . . . . . .  	L NEAR	130F	CSEG
DEN_RET  . . . . . . . . . . . .  	L NEAR	149F	CSEG
DEN_WRITE  . . . . . . . . . . .  	L NEAR	1335	CSEG
DESG_END . . . . . . . . . . . .  	NUMBER	0003	
DESG_WR  . . . . . . . . . . . .  	NUMBER	0002	
DESIGNATE_END  . . . . . . . . .  	N PROC	12EC	CSEG	Length = 01C2
DESIGNATE_START  . . . . . . . .  	N PROC	0F10	CSEG	Length = 03DC
DEVICE_NUM . . . . . . . . . . .  	L WORD	06E1	CSEG	Global
DEVN_LEN . . . . . . . . . . . .  	NUMBER	0008	
DEV_HDR0 . . . . . . . . . . . .  	L NEAR	0000	CSEG
DEV_HDR1 . . . . . . . . . . . .  	L NEAR	0012	CSEG
DEV_HDR2 . . . . . . . . . . . .  	L NEAR	0024	CSEG
DEV_HDR3 . . . . . . . . . . . .  	L NEAR	0036	CSEG
DEV_NAME0  . . . . . . . . . . .  	L NEAR	000A	CSEG
DEV_NAME1  . . . . . . . . . . .  	L NEAR	001C	CSEG
DEV_NAME2  . . . . . . . . . . .  	L NEAR	002E	CSEG
DEV_NAME3  . . . . . . . . . . .  	L NEAR	0040	CSEG
DE_01  . . . . . . . . . . . . .  	L NEAR	12FB	CSEG
DE_11  . . . . . . . . . . . . .  	L NEAR	14A5	CSEG
DOSLPT_FOUND . . . . . . . . . .  	L NEAR	0B45	CSEG
DSF_CARTCP . . . . . . . . . . .  	NUMBER	0001	
DSF_FIFOCP . . . . . . . . . . .  	NUMBER	8000	
DST_BUFLP  . . . . . . . . . . .  	L NEAR	0FF9	CSEG
DST_BUFNXT . . . . . . . . . . .  	L NEAR	101D	CSEG
DST_CART . . . . . . . . . . . .  	L NEAR	0FA7	CSEG
DST_CHECK_FBUFFER  . . . . . . .  	L NEAR	11E8	CSEG
DST_CMDERR . . . . . . . . . . .  	L NEAR	0FA1	CSEG
DST_DESIGNATE  . . . . . . . . .  	L NEAR	0FC3	CSEG
DST_DEVERR . . . . . . . . . . .  	L NEAR	0F9B	CSEG
DST_FT_LOCATED . . . . . . . . .  	L NEAR	122A	CSEG
DST_HAS_BUFFER . . . . . . . . .  	L NEAR	1210	CSEG
DST_HWCP_CHK . . . . . . . . . .  	L NEAR	1297	CSEG
DST_HWCP_CMP . . . . . . . . . .  	L NEAR	12A6	CSEG
DST_HWCP_LP  . . . . . . . . . .  	L NEAR	12A6	CSEG
DST_HWCP_NEXT  . . . . . . . . .  	L NEAR	12B2	CSEG
DST_IVK_CP . . . . . . . . . . .  	L NEAR	12BD	CSEG
DST_LOCATE_FT  . . . . . . . . .  	L NEAR	121F	CSEG
DST_NORMAL . . . . . . . . . . .  	L NEAR	0F96	CSEG
DST_NOT_NULL . . . . . . . . . .  	L NEAR	0F4D	CSEG
DST_NO_IVK . . . . . . . . . . .  	L NEAR	12B9	CSEG
DST_RAM  . . . . . . . . . . . .  	L NEAR	0F7B	CSEG
DST_RAMLP  . . . . . . . . . . .  	L NEAR	11EC	CSEG
DST_RAM_CMP  . . . . . . . . . .  	L NEAR	1287	CSEG
DST_RAM_LOCATED  . . . . . . . .  	L NEAR	11FF	CSEG
DST_RAM_LP . . . . . . . . . . .  	L NEAR	1287	CSEG
DST_REFRESH  . . . . . . . . . .  	L NEAR	11D7	CSEG
DST_REF_INVK . . . . . . . . . .  	L NEAR	127B	CSEG
DST_RET  . . . . . . . . . . . .  	L NEAR	0FA4	CSEG
DST_RETURN . . . . . . . . . . .  	L NEAR	1270	CSEG
DST_SLTLP  . . . . . . . . . . .  	L NEAR	1049	CSEG
Microsoft (R) Macro Assembler Version 5.10                  5/17/24 09:44:02
DOS - Code Page Switching - Printer Device Driver           Symbols-7


DST_SLTNXT . . . . . . . . . . .  	L NEAR	10A1	CSEG
DST_SLTREPLACED  . . . . . . . .  	L NEAR	1095	CSEG
DS_00  . . . . . . . . . . . . .  	L NEAR	0F1C	CSEG
DS_01  . . . . . . . . . . . . .  	L NEAR	0F29	CSEG
DS_02  . . . . . . . . . . . . .  	L NEAR	0F31	CSEG
DS_03  . . . . . . . . . . . . .  	L NEAR	0F2E	CSEG

EIGHT  . . . . . . . . . . . . .  	NUMBER	0008	
ESC_CHAR . . . . . . . . . . . .  	NUMBER	001B	

FAIL . . . . . . . . . . . . . .  	NUMBER	4000	
FDL_BAD  . . . . . . . . . . . .  	L NEAR	0EEC	CSEG
FDL_CALL_ITR . . . . . . . . . .  	L NEAR	0EC9	CSEG
FDL_CALL_STR . . . . . . . . . .  	L NEAR	0EC2	CSEG
FDL_GOOD1  . . . . . . . . . . .  	L NEAR	0EDD	CSEG
FDL_GOOD2  . . . . . . . . . . .  	L NEAR	1269	CSEG
FDL_ITR_RETURN . . . . . . . . .  	L NEAR	0ECD	CSEG
FILL_BUFFER  . . . . . . . . . .  	L NEAR	0FF6	CSEG
FIVE . . . . . . . . . . . . . .  	NUMBER	0005	
FLAG_RESTART . . . . . . . . . .  	NUMBER	0001	
FONT_DOWNL . . . . . . . . . . .  	L NEAR	116D	CSEG
FONT_DOWNLOAD  . . . . . . . . .  	L NEAR	0E96	CSEG
FONT_LOCATED . . . . . . . . . .  	L NEAR	1585	CSEG
FONT_PARSER  . . . . . . . . . .  	L NEAR	0000		External
FONT_RETURNED  . . . . . . . . .  	L NEAR	0CAD	CSEG
FONT_SELECT  . . . . . . . . . .  	L NEAR	0DC4	CSEG
FOUR . . . . . . . . . . . . . .  	NUMBER	0004	
FPKT . . . . . . . . . . . . . .  	TEXT  DS:[SI]		
FP_CALL  . . . . . . . . . . . .  	L NEAR	0C26	CSEG
FP_RETURN  . . . . . . . . . . .  	L NEAR	0C29	CSEG
FSTAT_BOTTOM . . . . . . . . . .  	NUMBER	FFF0	
FSTAT_COMPLETE . . . . . . . . .  	NUMBER	FFFF	
FSTAT_FONT . . . . . . . . . . .  	NUMBER	FFFE	
FSTAT_FOUND  . . . . . . . . . .  	NUMBER	FFFD	
FSTAT_MATCH  . . . . . . . . . .  	NUMBER	FFFC	
FSTAT_SEARCH . . . . . . . . . .  	NUMBER	FFFB	
FTABLE . . . . . . . . . . . . .  	V WORD	0000		External
FTDL_DONE  . . . . . . . . . . .  	L NEAR	11AE	CSEG
FTDL_LOOP  . . . . . . . . . . .  	L NEAR	1193	CSEG
FTDL_NEXT  . . . . . . . . . . .  	L NEAR	11A5	CSEG
FTDL_OFF1  . . . . . . . . . . .  	L WORD	03B8	CSEG
FTDL_OFF2  . . . . . . . . . . .  	L WORD	03D2	CSEG
FTDL_OFF3  . . . . . . . . . . .  	L WORD	03EC	CSEG
FTP  . . . . . . . . . . . . . .  	TEXT  ES:[BX]		

GB3_MINILEN  . . . . . . . . . .  	NUMBER	0004	
GET_CODEPAGE . . . . . . . . . .  	L NEAR	10D6	CSEG
GET_NEXT . . . . . . . . . . . .  	L NEAR	110B	CSEG
GIOB . . . . . . . . . . . . . .  	TEXT  DS:[SI]		
GIO_CASES  . . . . . . . . . . .  	L NEAR	0B69	CSEG
GIO_CODES  . . . . . . . . . . .  	L BYTE	0823	CSEG
GIO_COMMAND  . . . . . . . . . .  	L NEAR	0B69	CSEG
GIO_INDX . . . . . . . . . . . .  	NUMBER	0005	
GOOD . . . . . . . . . . . . . .  	NUMBER	0000	
Microsoft (R) Macro Assembler Version 5.10                  5/17/24 09:44:02
DOS - Code Page Switching - Printer Device Driver           Symbols-8


GOOD_CLASS1  . . . . . . . . . .  	L NEAR	0D65	CSEG

HARDSL_MAX . . . . . . . . . . .  	NUMBER	000C	
HARD_CARTE . . . . . . . . . . .  	L NEAR	1385	CSEG
HARD_HWCPE . . . . . . . . . . .  	L NEAR	1374	CSEG
HARD_SL1 . . . . . . . . . . . .  	L NEAR	0192	CSEG	Global
HARD_SL1B  . . . . . . . . . . .  	L NEAR	0196	CSEG
HARD_SL1C  . . . . . . . . . . .  	L NEAR	019A	CSEG
HARD_SL1D  . . . . . . . . . . .  	L NEAR	019E	CSEG
HARD_SL1E  . . . . . . . . . . .  	L NEAR	01A2	CSEG
HARD_SL1F  . . . . . . . . . . .  	L NEAR	01A6	CSEG
HARD_SL1G  . . . . . . . . . . .  	L NEAR	01AA	CSEG
HARD_SL1H  . . . . . . . . . . .  	L NEAR	01AE	CSEG
HARD_SL1I  . . . . . . . . . . .  	L NEAR	01B2	CSEG
HARD_SL1J  . . . . . . . . . . .  	L NEAR	01B6	CSEG
HARD_SL1K  . . . . . . . . . . .  	L NEAR	01BA	CSEG
HARD_SL1L  . . . . . . . . . . .  	L NEAR	01BE	CSEG
HARD_SL1M  . . . . . . . . . . .  	L NEAR	01C2	CSEG
HARD_SL2 . . . . . . . . . . . .  	L NEAR	01C6	CSEG	Global
HARD_SL2B  . . . . . . . . . . .  	L NEAR	01CA	CSEG
HARD_SL2C  . . . . . . . . . . .  	L NEAR	01CE	CSEG
HARD_SL2D  . . . . . . . . . . .  	L NEAR	01D2	CSEG
HARD_SL2E  . . . . . . . . . . .  	L NEAR	01D6	CSEG
HARD_SL2F  . . . . . . . . . . .  	L NEAR	01DA	CSEG
HARD_SL2G  . . . . . . . . . . .  	L NEAR	01DE	CSEG
HARD_SL2H  . . . . . . . . . . .  	L NEAR	01E2	CSEG
HARD_SL2I  . . . . . . . . . . .  	L NEAR	01E6	CSEG
HARD_SL2J  . . . . . . . . . . .  	L NEAR	01EA	CSEG
HARD_SL2K  . . . . . . . . . . .  	L NEAR	01EE	CSEG
HARD_SL2L  . . . . . . . . . . .  	L NEAR	01F2	CSEG
HARD_SL2M  . . . . . . . . . . .  	L NEAR	01F6	CSEG
HARD_SL3 . . . . . . . . . . . .  	L NEAR	01FA	CSEG	Global
HARD_SL3B  . . . . . . . . . . .  	L NEAR	01FE	CSEG
HARD_SL3C  . . . . . . . . . . .  	L NEAR	0202	CSEG
HARD_SL3D  . . . . . . . . . . .  	L NEAR	0206	CSEG
HARD_SL3E  . . . . . . . . . . .  	L NEAR	020A	CSEG
HARD_SL3F  . . . . . . . . . . .  	L NEAR	020E	CSEG
HARD_SL3G  . . . . . . . . . . .  	L NEAR	0212	CSEG
HARD_SL3H  . . . . . . . . . . .  	L NEAR	0216	CSEG
HARD_SL3I  . . . . . . . . . . .  	L NEAR	021A	CSEG
HARD_SL3J  . . . . . . . . . . .  	L NEAR	021E	CSEG
HARD_SL3K  . . . . . . . . . . .  	L NEAR	0222	CSEG
HARD_SL3L  . . . . . . . . . . .  	L NEAR	0226	CSEG
HARD_SL3M  . . . . . . . . . . .  	L NEAR	022A	CSEG
HARD_SL4 . . . . . . . . . . . .  	L NEAR	022E	CSEG	Global
HARD_SL4B  . . . . . . . . . . .  	L NEAR	0232	CSEG
HARD_SL4C  . . . . . . . . . . .  	L NEAR	0236	CSEG
HARD_SL4D  . . . . . . . . . . .  	L NEAR	023A	CSEG
HARD_SL4E  . . . . . . . . . . .  	L NEAR	023E	CSEG
HARD_SL4F  . . . . . . . . . . .  	L NEAR	0242	CSEG
HARD_SL4G  . . . . . . . . . . .  	L NEAR	0246	CSEG
HARD_SL4H  . . . . . . . . . . .  	L NEAR	024A	CSEG
HARD_SL4I  . . . . . . . . . . .  	L NEAR	024E	CSEG
HARD_SL4J  . . . . . . . . . . .  	L NEAR	0252	CSEG
Microsoft (R) Macro Assembler Version 5.10                  5/17/24 09:44:02
DOS - Code Page Switching - Printer Device Driver           Symbols-9


HARD_SL4K  . . . . . . . . . . .  	L NEAR	0256	CSEG
HARD_SL4L  . . . . . . . . . . .  	L NEAR	025A	CSEG
HARD_SL4M  . . . . . . . . . . .  	L NEAR	025E	CSEG
HASBEEN_COPIED . . . . . . . . .  	L NEAR	0D9E	CSEG
HAS_FONT_DATA  . . . . . . . . .  	L NEAR	0E2C	CSEG
HBUF_SL1 . . . . . . . . . . . .  	L WORD	0322	CSEG
HBUF_SL2 . . . . . . . . . . . .  	L WORD	033C	CSEG
HBUF_SL3 . . . . . . . . . . . .  	L WORD	0356	CSEG
HP . . . . . . . . . . . . . . .  	TEXT  DS:[SI]		
HWCP_CHK . . . . . . . . . . . .  	L NEAR	1505	CSEG
HWCP_CMP . . . . . . . . . . . .  	L NEAR	1514	CSEG
HWCP_LP  . . . . . . . . . . . .  	L NEAR	1517	CSEG
HWCP_NEXT  . . . . . . . . . . .  	L NEAR	1521	CSEG
HWCP_RESET . . . . . . . . . . .  	L NEAR	16FD	CSEG

INIT . . . . . . . . . . . . . .  	L NEAR	0000		External
INIT_CHK . . . . . . . . . . . .  	L WORD	0048	CSEG	Global
INTERRUPT0 . . . . . . . . . . .  	F PROC	083C	CSEG	Length = 038A
INTERRUPT1 . . . . . . . . . . .  	F PROC	08EA	CSEG	Length = 009A
INTERRUPT2 . . . . . . . . . . .  	F PROC	0984	CSEG	Length = 00AE
INTERRUPT3 . . . . . . . . . . .  	F PROC	0A32	CSEG	Length = 00AE
INVK_RAM_PHYSICAL  . . . . . . .  	L NEAR	15D8	CSEG
INVOKE . . . . . . . . . . . . .  	N PROC	14AE	CSEG	Global	Length = 02B1
IRPT_CMD_EXIT  . . . . . . . . .  	L NEAR	0B8F	CSEG
IR_0 . . . . . . . . . . . . . .  	L NEAR	1559	CSEG
IR_1 . . . . . . . . . . . . . .  	L NEAR	1617	CSEG
IVK_CMDERR . . . . . . . . . . .  	L NEAR	1753	CSEG
IVK_CP . . . . . . . . . . . . .  	L NEAR	16C5	CSEG
IVK_DEVERR . . . . . . . . . . .  	L NEAR	174D	CSEG
IVK_GOODCP . . . . . . . . . . .  	L NEAR	14E6	CSEG
IVK_GOODN  . . . . . . . . . . .  	L NEAR	14DA	CSEG
IVK_HWCPCP . . . . . . . . . . .  	L NEAR	15EA	CSEG
IVK_PROCESS  . . . . . . . . . .  	L NEAR	14BF	CSEG
IVK_PROCESS_CONT . . . . . . . .  	L NEAR	14C7	CSEG
IVK_RAMCP  . . . . . . . . . . .  	L NEAR	152C	CSEG
IVK_RET  . . . . . . . . . . . .  	L NEAR	1756	CSEG

L1 . . . . . . . . . . . . . . .  	L NEAR	0B02	CSEG
L2 . . . . . . . . . . . . . . .  	L NEAR	0B45	CSEG
L3 . . . . . . . . . . . . . . .  	L NEAR	0B40	CSEG
L4 . . . . . . . . . . . . . . .  	L NEAR	0B45	CSEG
LOADED . . . . . . . . . . . . .  	NUMBER	2000	
LOCATE_FONT  . . . . . . . . . .  	L NEAR	157A	CSEG
LOCATE_SLOT  . . . . . . . . . .  	L NEAR	0C5B	CSEG
LOCKED . . . . . . . . . . . . .  	NUMBER	0004	
LPT1_INITED  . . . . . . . . . .  	L NEAR	0969	CSEG
LPT1_MEM_CREATE  . . . . . . . .  	L NEAR	097B	CSEG
LPT1_MEM_DONE  . . . . . . . . .  	L NEAR	0981	CSEG
LPT1_NO_STACK  . . . . . . . . .  	L NEAR	092D	CSEG
LPT2_INITED  . . . . . . . . . .  	L NEAR	0A17	CSEG
LPT2_MEM_DONE  . . . . . . . . .  	L NEAR	0A2F	CSEG
LPT2_NO_STACK  . . . . . . . . .  	L NEAR	09C7	CSEG
LPT3_INITED  . . . . . . . . . .  	L NEAR	0AC5	CSEG
LPT3_MEM_DONE  . . . . . . . . .  	L NEAR	0ADD	CSEG
Microsoft (R) Macro Assembler Version 5.10                  5/17/24 09:44:02
DOS - Code Page Switching - Printer Device Driver           Symbols-10


LPT3_NO_STACK  . . . . . . . . .  	L NEAR	0A75	CSEG

MAF_CON  . . . . . . . . . . . .  	NUMBER	0003	
MAF_PTR  . . . . . . . . . . . .  	NUMBER	0005	
MEM_REQUEST  . . . . . . . . . .  	L WORD	083A	CSEG
MIF_DEN  . . . . . . . . . . . .  	NUMBER	004D	
MIF_DST  . . . . . . . . . . . .  	NUMBER	004C	
MIF_IVK  . . . . . . . . . . . .  	NUMBER	004A	
MIF_QIV  . . . . . . . . . . . .  	NUMBER	006A	
MIF_QLS  . . . . . . . . . . . .  	NUMBER	006B	
MORE_FONT  . . . . . . . . . . .  	L NEAR	0D56	CSEG

NAME_LEN . . . . . . . . . . . .  	NUMBER	0008	
NEW_CODEPAGE . . . . . . . . . .  	L NEAR	10F2	CSEG
NEXT_1 . . . . . . . . . . . . .  	L NEAR	1548	CSEG
NEXT_2 . . . . . . . . . . . . .  	L NEAR	1556	CSEG
NEXT_3 . . . . . . . . . . . . .  	L NEAR	1606	CSEG
NEXT_4 . . . . . . . . . . . . .  	L NEAR	1614	CSEG
NEXT_FTBLK . . . . . . . . . . .  	L NEAR	0C9A	CSEG
NHD  . . . . . . . . . . . . . .  	TEXT  ES:[DI]		
NINE . . . . . . . . . . . . . .  	NUMBER	0009	
NORMAL . . . . . . . . . . . . .  	NUMBER	0000	
NORM_DRIVER  . . . . . . . . . .  	N PROC	0BC6	CSEG	Length = 0011
NOT0FFFF . . . . . . . . . . . .  	L NEAR	0B0E	CSEG
NOT_ACTIVE . . . . . . . . . . .  	L NEAR	13EE	CSEG
NOT_CLASS1 . . . . . . . . . . .  	L NEAR	0CCE	CSEG
NO_FONT_DOWNL  . . . . . . . . .  	L NEAR	11B4	CSEG
NO_INVOKE  . . . . . . . . . . .  	L NEAR	1747	CSEG
NO_LOAD  . . . . . . . . . . . .  	L NEAR	16D6	CSEG
NO_MORE_FTBLK  . . . . . . . . .  	L NEAR	0F05	CSEG
NO_MORE_SLOT . . . . . . . . . .  	L NEAR	1114	CSEG
NO_REFRESH . . . . . . . . . . .  	L NEAR	0F71	CSEG
NUMBER . . . . . . . . . . . . .  	NUMBER	0001	
NXT_CP . . . . . . . . . . . . .  	L NEAR	16D8	CSEG

OFF  . . . . . . . . . . . . . .  	NUMBER	0000	
ON . . . . . . . . . . . . . . .  	NUMBER	0001	
ONE  . . . . . . . . . . . . . .  	NUMBER	0001	

PARSE_FTBLK  . . . . . . . . . .  	L NEAR	0C49	CSEG
PREPARE_FTB  . . . . . . . . . .  	L NEAR	10BC	CSEG
PRINTER_DESC1  . . . . . . . . .  	L NEAR	041C	CSEG
PRINTER_DESC2  . . . . . . . . .  	L NEAR	04B8	CSEG
PRINTER_DESC3  . . . . . . . . .  	L NEAR	0555	CSEG
PRINTER_DESC4  . . . . . . . . .  	L NEAR	05F1	CSEG
PRINTER_DESC_NUM . . . . . . . .  	L WORD	0412	CSEG	Global
PRINTER_DESC_TBL . . . . . . . .  	L WORD	0414	CSEG	Global
PRN_INITED . . . . . . . . . . .  	L NEAR	08CF	CSEG
PRN_MEM_CREATE . . . . . . . . .  	L NEAR	08E1	CSEG
PRN_MEM_DONE . . . . . . . . . .  	L NEAR	08E7	CSEG
PRN_NO_STACK . . . . . . . . . .  	L NEAR	087F	CSEG
PRT_STATUS_CHECK . . . . . . . .  	N PROC	175F	CSEG	Length = 002A
PSE  . . . . . . . . . . . . . .  	TEXT  ES:[DI]		

Microsoft (R) Macro Assembler Version 5.10                  5/17/24 09:44:02
DOS - Code Page Switching - Printer Device Driver           Symbols-11


QIV_CMDERR . . . . . . . . . . .  	L NEAR	17FF	CSEG
QIV_DEVERR . . . . . . . . . . .  	L NEAR	17F9	CSEG
QIV_FOUND  . . . . . . . . . . .  	L NEAR	17EA	CSEG
QIV_HARD . . . . . . . . . . . .  	L NEAR	17C8	CSEG
QIV_HARDLP . . . . . . . . . . .  	L NEAR	17D4	CSEG
QIV_NOACT  . . . . . . . . . . .  	L NEAR	17E4	CSEG
QIV_RAMLP  . . . . . . . . . . .  	L NEAR	17B8	CSEG
QIV_RET  . . . . . . . . . . . .  	L NEAR	1802	CSEG
QI_0 . . . . . . . . . . . . . .  	L NEAR	17A3	CSEG
QI_1 . . . . . . . . . . . . . .  	L NEAR	17ED	CSEG
QLS_CMDERR . . . . . . . . . . .  	L NEAR	18AC	CSEG
QLS_CPSW . . . . . . . . . . . .  	L NEAR	181E	CSEG
QLS_DEVERR . . . . . . . . . . .  	L NEAR	18A6	CSEG
QLS_RET  . . . . . . . . . . . .  	L NEAR	18AF	CSEG
QL_CARTLP  . . . . . . . . . . .  	L NEAR	1859	CSEG
QL_DONE  . . . . . . . . . . . .  	L NEAR	1887	CSEG
QL_HARDLP  . . . . . . . . . . .  	L NEAR	1834	CSEG
QL_PREPARE . . . . . . . . . . .  	L NEAR	1847	CSEG
QL_RAMLP . . . . . . . . . . . .  	L NEAR	1874	CSEG
QL_RAM_PREP  . . . . . . . . . .  	L NEAR	186C	CSEG
Q_INVOKED  . . . . . . . . . . .  	N PROC	1789	CSEG	Length = 0083
Q_LIST . . . . . . . . . . . . .  	N PROC	180C	CSEG	Length = 00AD

RAMSL_MAX  . . . . . . . . . . .  	NUMBER	000C	
RAM_CMP  . . . . . . . . . . . .  	L NEAR	14F3	CSEG
RAM_LP . . . . . . . . . . . . .  	L NEAR	14F6	CSEG
RAM_PRT_STATUS_ERR . . . . . . .  	L NEAR	15D4	CSEG
RAM_RESET  . . . . . . . . . . .  	L NEAR	171F	CSEG
RAM_SL1  . . . . . . . . . . . .  	L NEAR	0262	CSEG	Global
RAM_SL1B . . . . . . . . . . . .  	L NEAR	0266	CSEG
RAM_SL1C . . . . . . . . . . . .  	L NEAR	026A	CSEG
RAM_SL1D . . . . . . . . . . . .  	L NEAR	026E	CSEG
RAM_SL1E . . . . . . . . . . . .  	L NEAR	0272	CSEG
RAM_SL1F . . . . . . . . . . . .  	L NEAR	0276	CSEG
RAM_SL1G . . . . . . . . . . . .  	L NEAR	027A	CSEG
RAM_SL1H . . . . . . . . . . . .  	L NEAR	027E	CSEG
RAM_SL1I . . . . . . . . . . . .  	L NEAR	0282	CSEG
RAM_SL1J . . . . . . . . . . . .  	L NEAR	0286	CSEG
RAM_SL1K . . . . . . . . . . . .  	L NEAR	028A	CSEG
RAM_SL1L . . . . . . . . . . . .  	L NEAR	028E	CSEG
RAM_SL2  . . . . . . . . . . . .  	L NEAR	0292	CSEG	Global
RAM_SL2B . . . . . . . . . . . .  	L NEAR	0296	CSEG
RAM_SL2C . . . . . . . . . . . .  	L NEAR	029A	CSEG
RAM_SL2D . . . . . . . . . . . .  	L NEAR	029E	CSEG
RAM_SL2E . . . . . . . . . . . .  	L NEAR	02A2	CSEG
RAM_SL2F . . . . . . . . . . . .  	L NEAR	02A6	CSEG
RAM_SL2G . . . . . . . . . . . .  	L NEAR	02AA	CSEG
RAM_SL2H . . . . . . . . . . . .  	L NEAR	02AE	CSEG
RAM_SL2I . . . . . . . . . . . .  	L NEAR	02B2	CSEG
RAM_SL2J . . . . . . . . . . . .  	L NEAR	02B6	CSEG
RAM_SL2K . . . . . . . . . . . .  	L NEAR	02BA	CSEG
RAM_SL2L . . . . . . . . . . . .  	L NEAR	02BE	CSEG
RAM_SL3  . . . . . . . . . . . .  	L NEAR	02C2	CSEG	Global
RAM_SL3B . . . . . . . . . . . .  	L NEAR	02C6	CSEG
Microsoft (R) Macro Assembler Version 5.10                  5/17/24 09:44:02
DOS - Code Page Switching - Printer Device Driver           Symbols-12


RAM_SL3C . . . . . . . . . . . .  	L NEAR	02CA	CSEG
RAM_SL3D . . . . . . . . . . . .  	L NEAR	02CE	CSEG
RAM_SL3E . . . . . . . . . . . .  	L NEAR	02D2	CSEG
RAM_SL3F . . . . . . . . . . . .  	L NEAR	02D6	CSEG
RAM_SL3G . . . . . . . . . . . .  	L NEAR	02DA	CSEG
RAM_SL3H . . . . . . . . . . . .  	L NEAR	02DE	CSEG
RAM_SL3I . . . . . . . . . . . .  	L NEAR	02E2	CSEG
RAM_SL3J . . . . . . . . . . . .  	L NEAR	02E6	CSEG
RAM_SL3K . . . . . . . . . . . .  	L NEAR	02EA	CSEG
RAM_SL3L . . . . . . . . . . . .  	L NEAR	02EE	CSEG
RAM_SL4  . . . . . . . . . . . .  	L NEAR	02F2	CSEG	Global
RAM_SL4B . . . . . . . . . . . .  	L NEAR	02F6	CSEG
RAM_SL4C . . . . . . . . . . . .  	L NEAR	02FA	CSEG
RAM_SL4D . . . . . . . . . . . .  	L NEAR	02FE	CSEG
RAM_SL4E . . . . . . . . . . . .  	L NEAR	0302	CSEG
RAM_SL4F . . . . . . . . . . . .  	L NEAR	0306	CSEG
RAM_SL4G . . . . . . . . . . . .  	L NEAR	030A	CSEG
RAM_SL4H . . . . . . . . . . . .  	L NEAR	030E	CSEG
RAM_SL4I . . . . . . . . . . . .  	L NEAR	0312	CSEG
RAM_SL4J . . . . . . . . . . . .  	L NEAR	0316	CSEG
RAM_SL4K . . . . . . . . . . . .  	L NEAR	031A	CSEG
RAM_SL4L . . . . . . . . . . . .  	L NEAR	031E	CSEG
RBUF_SL1 . . . . . . . . . . . .  	L WORD	0370	CSEG
RBUF_SL2 . . . . . . . . . . . .  	L WORD	0388	CSEG
RBUF_SL3 . . . . . . . . . . . .  	L WORD	03A0	CSEG
RCTL_NXT . . . . . . . . . . . .  	L NEAR	1652	CSEG
RC_EOL . . . . . . . . . . . . .  	NUMBER	-0001	
RC_NO_ERROR  . . . . . . . . . .  	NUMBER	0000	
RC_OP_MISSING  . . . . . . . . .  	NUMBER	0002	
REFRESH  . . . . . . . . . . . .  	NUMBER	0800	
REPLX  . . . . . . . . . . . . .  	NUMBER	8000	
REQ_NORM1  . . . . . . . . . . .  	L 	0690	CSEG
REQ_NORM2  . . . . . . . . . . .  	L 	06AB	CSEG
REQ_NORM3  . . . . . . . . . . .  	L 	06C6	CSEG
RESERVED1  . . . . . . . . . . .  	L WORD	07DB	CSEG	Global
RESERVED2  . . . . . . . . . . .  	L WORD	07DD	CSEG	Global
RESET_BUF  . . . . . . . . . . .  	L NEAR	0FC8	CSEG
RESET_HWCP . . . . . . . . . . .  	L NEAR	1714	CSEG
RESET_RAM  . . . . . . . . . . .  	L NEAR	1736	CSEG
RESIDENT_END . . . . . . . . . .  	V WORD	0000		External
RET0_IN_STACK  . . . . . . . . .  	L NEAR	0BB5	CSEG
RET0_NO_STACK  . . . . . . . . .  	L NEAR	0BBD	CSEG
RH . . . . . . . . . . . . . . .  	TEXT  ES:[DI]		
ROOM_FOR_FONT  . . . . . . . . .  	L NEAR	0E71	CSEG

SELECTCP_LP  . . . . . . . . . .  	L NEAR	162D	CSEG
SELECT_0 . . . . . . . . . . . .  	L NEAR	0CC0	CSEG
SELECT_1 . . . . . . . . . . . .  	L NEAR	0CEF	CSEG
SELECT_BAD . . . . . . . . . . .  	L NEAR	0E0E	CSEG
SELECT_CLASS1  . . . . . . . . .  	L NEAR	0D59	CSEG
SELECT_NOT0  . . . . . . . . . .  	L NEAR	0CC4	CSEG
SELECT_NOT_LONG  . . . . . . . .  	L NEAR	0CE3	CSEG
SELECT_NOT_PASSED  . . . . . . .  	L NEAR	0CDA	CSEG
SELECT_SLOT  . . . . . . . . . .  	L NEAR	1645	CSEG
Microsoft (R) Macro Assembler Version 5.10                  5/17/24 09:44:02
DOS - Code Page Switching - Printer Device Driver           Symbols-13


SEND_RAM_DATA  . . . . . . . . .  	L NEAR	159D	CSEG
SET_DID  . . . . . . . . . . . .  	L NEAR	1141	CSEG
SEVEN  . . . . . . . . . . . . .  	NUMBER	0007	
SIX  . . . . . . . . . . . . . .  	NUMBER	0006	
SKIP_ALL_SELLEN  . . . . . . . .  	L NEAR	0DFE	CSEG
SKIP_HWCP  . . . . . . . . . . .  	L NEAR	0FE5	CSEG
SKIP_SELECT  . . . . . . . . . .  	L NEAR	0DF0	CSEG
SKIP_SLOT  . . . . . . . . . . .  	L NEAR	0C50	CSEG
SLOT_FOUND . . . . . . . . . . .  	L NEAR	0C73	CSEG
SLOT_OCC . . . . . . . . . . . .  	L NEAR	13DF	CSEG
SLT_BUF_DEF  . . . . . . . . . .  	L NEAR	1089	CSEG
STACK_ALLOCATED  . . . . . . . .  	V WORD	0000		External
STACK_SIZE . . . . . . . . . . .  	NUMBER	0028	
STAT_BADATA  . . . . . . . . . .  	NUMBER	800C	
STAT_BADDEN  . . . . . . . . . .  	NUMBER	800C	
STAT_BFFDEN  . . . . . . . . . .  	NUMBER	8000	
STAT_CMDERR  . . . . . . . . . .  	NUMBER	8003	
STAT_DELETE  . . . . . . . . . .  	NUMBER	8000	
STAT_DEVERR  . . . . . . . . . .  	NUMBER	800A	
STAT_DONE  . . . . . . . . . . .  	NUMBER	0001	
STAT_DUPLCP  . . . . . . . . . .  	NUMBER	800A	
STAT_ERROR . . . . . . . . . . .  	NUMBER	8000	
STAT_NOBUFF  . . . . . . . . . .  	NUMBER	800C	
STAT_NOCP  . . . . . . . . . . .  	NUMBER	8007	
STAT_NOCPIV  . . . . . . . . . .  	NUMBER	8007	
STAT_NOFIND  . . . . . . . . . .  	NUMBER	8008	
STAT_TOMANY  . . . . . . . . . .  	NUMBER	800A	
STORE_FONT . . . . . . . . . . .  	L NEAR	0E22	CSEG
STORE_FONT_BUFFER  . . . . . . .  	L NEAR	0E35	CSEG
STORE_SELECT . . . . . . . . . .  	L NEAR	0D17	CSEG
STRATEGY0  . . . . . . . . . . .  	F PROC	07DF	CSEG	Length = 0010
STRATEGY1  . . . . . . . . . . .  	F PROC	07EF	CSEG	Length = 0010
STRATEGY2  . . . . . . . . . . .  	F PROC	07FF	CSEG	Length = 0010
STRATEGY3  . . . . . . . . . . .  	F PROC	080F	CSEG	Length = 0010
STRING . . . . . . . . . . . . .  	NUMBER	0003	
SUPPORTED  . . . . . . . . . . .  	L NEAR	0B82	CSEG

TABLE  . . . . . . . . . . . . .  	L BYTE	06E1	CSEG	Global
TABLE1_1 . . . . . . . . . . . .  	L WORD	06EB	CSEG
TABLE1_2 . . . . . . . . . . . .  	L WORD	06F7	CSEG
TABLE1_3 . . . . . . . . . . . .  	L WORD	0701	CSEG
TABLE1_4 . . . . . . . . . . . .  	L WORD	070B	CSEG
TABLE1_5 . . . . . . . . . . . .  	L WORD	0721	CSEG
TABLE2_1 . . . . . . . . . . . .  	L WORD	0727	CSEG
TABLE2_2 . . . . . . . . . . . .  	L WORD	0733	CSEG
TABLE2_3 . . . . . . . . . . . .  	L WORD	073D	CSEG
TABLE2_4 . . . . . . . . . . . .  	L WORD	0747	CSEG
TABLE2_5 . . . . . . . . . . . .  	L WORD	075D	CSEG
TABLE3_1 . . . . . . . . . . . .  	L WORD	0763	CSEG
TABLE3_2 . . . . . . . . . . . .  	L WORD	076F	CSEG
TABLE3_3 . . . . . . . . . . . .  	L WORD	0779	CSEG
TABLE3_4 . . . . . . . . . . . .  	L WORD	0783	CSEG
TABLE3_5 . . . . . . . . . . . .  	L WORD	0799	CSEG
TABLE4_1 . . . . . . . . . . . .  	L WORD	079F	CSEG
Microsoft (R) Macro Assembler Version 5.10                  5/17/24 09:44:02
DOS - Code Page Switching - Printer Device Driver           Symbols-14


TABLE4_2 . . . . . . . . . . . .  	L WORD	07AB	CSEG
TABLE4_3 . . . . . . . . . . . .  	L WORD	07B5	CSEG
TABLE4_4 . . . . . . . . . . . .  	L WORD	07BF	CSEG
TABLE4_5 . . . . . . . . . . . .  	L WORD	07D5	CSEG
TABLE_LEN  . . . . . . . . . . .  	NUMBER	0122	
TEMP_SI  . . . . . . . . . . . .  	L WORD	068E	CSEG
TEN  . . . . . . . . . . . . . .  	NUMBER	000A	
THREE  . . . . . . . . . . . . .  	NUMBER	0003	
TWO  . . . . . . . . . . . . . .  	NUMBER	0002	
TYPE_DISPLAY . . . . . . . . . .  	NUMBER	0001	
TYPE_PRINTER . . . . . . . . . .  	NUMBER	0002	

UN_SUP . . . . . . . . . . . . .  	L NEAR	0B66	CSEG

WRITE  . . . . . . . . . . . . .  	N PROC	0BD7	CSEG	Length = 0339
WRITE_RET  . . . . . . . . . . .  	L NEAR	0F0F	CSEG
WRT_DESG_GOOD  . . . . . . . . .  	L NEAR	0C03	CSEG
WRT_DESIGNATE  . . . . . . . . .  	L NEAR	0BF7	CSEG
WRT_FONT . . . . . . . . . . . .  	L NEAR	0BEF	CSEG
WRT_IGNORE . . . . . . . . . . .  	L NEAR	0EF8	CSEG
WRT_NORMAL . . . . . . . . . . .  	L NEAR	0EF5	CSEG
WRT_NOT_NORMAL . . . . . . . . .  	L NEAR	0BE7	CSEG

X1 . . . . . . . . . . . . . . .  	L NEAR	0B2B	CSEG
X2 . . . . . . . . . . . . . . .  	L NEAR	0B39	CSEG

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

@CPU . . . . . . . . . . . . . .  	TEXT  0101h		
@FILENAME  . . . . . . . . . . .  	TEXT  cpspm10		
@VERSION . . . . . . . . . . . .  	TEXT  510		


   4428 Source  Lines
   4428 Total   Lines
    699 Symbols

  46294 + 166167 Bytes symbol space free

      0 Warning Errors
      0 Severe  Errors
