Microsoft (R) Macro Assembler Version 5.10                  2/14/25 23:45:42
DOS KEYB Command  -  Interrupt 9 Non-US Support             Page     1-1


				
				        PAGE    ,132
				        TITLE   DOS KEYB Command  -  Interrupt 9 Non-US Support
				
				;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
				;; DOS - NLS Support - KEYB Command
				;; (C) Copyright 1988 Microsoft
				;;
				;; File Name:  KEYBI9.ASM
				;; ----------
				;;
				;; Description:
				;; ------------
				;;       Converts scan codes to ASCII for non-US keyboards.
				;;       This orutine uses the tables loaded into the SHARED_DATA_AREA
				;;       from KEYBOARD.SYS by the KEYB_COMMAND module.
				;;
				;; Documentation Reference:
				;; ------------------------
				;;       PC DOS 3.3 Detailed Design Document - May  1986
				;;
				;; Procedures Contained in This File:
				;; ----------------------------------
				;;       KEYB_STATE_PROCESSOR - Scan to ASCII translator.
				;;
				;; External Procedure References:
				;; ------------------------------
				;;       None.
				;;
				;; Linkage Information:  Refer to file KEYB.ASM
				;; --------------------
				;;
				;; Change History:
				;; ---------------
				;;
				;;
				;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
				                                       ;;
				;****
				        INCLUDE KEYBEQU.INC            ;;
			     C	.LIST
				        INCLUDE DSEG.inc               ;; System data segments
			     C	;---Revised 8-17-84 FOR KBX	(ADDED ADDITIONAL KEYBOARD FLAG - KB_FLAG_3)
			     C	;----------------------------------------
			     C	;	 0286 INTERRUPT LOCATIONS (READ):
			     C	;----------------------------------------
 0000                        C	ABS0	SEGMENT AT 0
 0000                        C	STG_LOC0		LABEL	BYTE
 0008                        C		ORG 2*4
 0008                        C	NMI_PTR 		LABEL	WORD
 0014                        C		ORG 5*4
 0014                        C	INT5_PTR		LABEL	WORD
 0020                        C		ORG 8*4
 0020                        C	INT_ADDR		LABEL	WORD
Microsoft (R) Macro Assembler Version 5.10                  2/14/25 23:45:42
DOS KEYB Command  -  Interrupt 9 Non-US Support             Page     1-2


 0020                        C	INT_PTR 		LABEL	DWORD
 0040                        C		ORG 10H*4
 0040                        C	VIDEO_INT		LABEL	WORD
 004C                        C		ORG 13H*4			; NEW FDISK
 004C                        C	ORG_VECTOR		LABEL	DWORD
 0060                        C		ORG 18H*4
 0060                        C	BASIC_PTR		LABEL	WORD
 0064                        C		ORG 19H*4
 0064                        C	BOOT_VEC		LABEL	DWORD
 0064                        C	BOOT_VECTOR		LABEL	DWORD
 0074                        C		ORG 1DH*4
 0074                        C	PARM_PTR		LABEL	DWORD	; POINTER TO VIDEO PARMS
 0078                        C		ORG 1EH*4
 0078                        C	DISK_POINTER		LABEL	DWORD
 007C                        C		ORG 01FH*4
 007C                        C	EXT_PTR 		LABEL	DWORD
 0100                        C		ORG 40H*4			; DISKETTE POINTER
 0100                        C	DISK_VECTOR		LABEL	DWORD
 0104                        C	       ORG 41H*4
 0104                        C	HF_TBL_VEC		LABEL	DWORD
 0118                        C		ORG 46H*4
 0118                        C	HF1_TBL_VEC		LABEL	DWORD
 01C0                        C		ORG 70H*4
 01C0                        C	SLAVE_INT_PTR		LABEL	DWORD
 01C0                        C	RTC_INT_VEC		LABEL	DWORD	; REAL TIME CLOCK INT
 01D8                        C		ORG 76H*4			; FIXED DISK INTERRUPT VECTOR
 01D8                        C	HDISK_INT		LABEL	DWORD
 0400                        C		ORG	400H
 0400                        C	DATA_AREA		 LABEL BYTE	;ABSOLUTE LOCATION OF DATA SEGMENT
 0400                        C	DATA_WORD		 LABEL WORD
 0500                        C		ORG	0500H
 0500                        C	MFG_TEST_RTN		 LABEL	FAR
 7C00                        C		ORG	7C00H
 7C00                        C	BOOT_LOCN		 LABEL	FAR
 7C00                        C	ABS0	ENDS
Microsoft (R) Macro Assembler Version 5.10                  2/14/25 23:45:42
DOS KEYB Command  -  Interrupt 9 Non-US Support             Page     1-3


			     C	PAGE
			     C	;------------------------------------------------
			     C	; STACK -- USED DURING INITIALIZATION ONLY	:
			     C	;------------------------------------------------
 0000                        C	STACK	SEGMENT AT 30H
 0000  0080[                 C		DW	128 DUP(?)
	   ????              C	
			 ]   C	
			     C	
 0100                        C	TOS	LABEL	WORD
 0100                        C	STACK	ENDS
			     C	;----------------------------------------
			     C	;	ROM BIOS DATA AREAS		:
			     C	;----------------------------------------
 0000                        C	DATA	SEGMENT AT 40H
			     C	;DATA_BASE	 LABEL	 BYTE
 0000  0004[                 C	RS232_BASE	DW	4 DUP(?)	; ADDRESSES OF RS232 ADAPTERS
	   ????              C	
			 ]   C	
			     C	
 0008  0004[                 C	PRINTER_BASE	DW	4 DUP(?)	; ADDRESSES OF PRINTERS
	   ????              C	
			 ]   C	
			     C	
 0010  0001[                 C	EQUIP_FLAG	DW	1 DUP(?)	; INSTALLED HARDWARE
	   ????              C	
			 ]   C	
			     C	
 0012  0001[                 C	MFG_TST 	DB	1 DUP(?)	; INITIALIZATION FLAG
	   ??                C	
			 ]   C	
			     C	
 0013  0001[                 C	MEMORY_SIZE	DW	1 DUP(?)	; MEMORY SIZE IN K BYTES
	   ????              C	
			 ]   C	
			     C	
 0015  0001[                 C	MFG_ERR_FLAG	DB	1 DUP(?)	; SCRATCHPAD FOR MANUFACTURING
	   ??                C	
			 ]   C	
			     C	
 0016  0001[                 C			DB	1 DUP(?)	; ERROR CODES
	   ??                C	
			 ]   C	
			     C	
Microsoft (R) Macro Assembler Version 5.10                  2/14/25 23:45:42
DOS KEYB Command  -  Interrupt 9 Non-US Support             Page     1-4


			     C	PAGE
			     C	;----------------------------------------
			     C	;	KEYBOARD DATA AREAS		:
			     C	;----------------------------------------
 0017  0001[                 C	KB_FLAG 	DB	1 DUP(?)
	   ??                C	
			 ]   C	
			     C	
 0018  0001[                 C	KB_FLAG_1	DB	1 DUP(?)	; SECOND BYTE OF KEYBOARD STATUS
	   ??                C	
			 ]   C	
			     C	
 0019  0001[                 C	ALT_INPUT	DB	1 DUP(?)	; STORAGE FOR ALTERNATE KEYPAD ENTRY
	   ??                C	
			 ]   C	
			     C	
 001A  0001[                 C	BUFFER_HEAD	DW	1 DUP(?)	; POINTER TO HEAD OF KEYBOARD BUFFER
	   ????              C	
			 ]   C	
			     C	
 001C  0001[                 C	BUFFER_TAIL	DW	1 DUP(?)	; POINTER TO TAIL OF KEYBOARD BUFFER
	   ????              C	
			 ]   C	
			     C	
 001E  0010[                 C	KB_BUFFER	DW	16 DUP(?)	; ROOM FOR 15 ENTRIES
	   ????              C	
			 ]   C	
			     C	
 003E                        C	KB_BUFFER_END	LABEL	WORD
			     C	
			     C	;------ HEAD = TAIL INDICATES THAT THE BUFFER IS EMPTY
			     C	
			     C	;----------------------------------------
			     C	;	DISKETTE DATA AREAS		:
			     C	;----------------------------------------
 003E  0001[                 C	SEEK_STATUS	DB	1 DUP(?)	; DRIVE RECALIBRATION STATUS
	   ??                C	
			 ]   C	
			     C	
			     C						; BIT 3-0 = DRIVE 3-0 NEEDS RECAL
			     C						; BEFORE NEXT SEEK IF BIT IS = 0
 003F  0001[                 C	MOTOR_STATUS	DB	1 DUP(?)	; MOTOR STATUS
	   ??                C	
			 ]   C	
			     C	
			     C						; BIT 3-0 = DRIVE 3-0 IS CURRENTLY
			     C						;   RUNNING
			     C						; BIT 7 = CURRENT OPERATION IS A WRITE,
			     C						;   REQUIRES DELAY
 0040  0001[                 C	MOTOR_COUNT	DB	1 DUP(?)	; TIME OUT COUNTER FOR DRIVE TURN OFF
	   ??                C	
			 ]   C	
			     C	
 0041  0001[                 C	DISKETTE_STATUS DB	1 DUP(?)	; RETURN CODE STATUS BYTE
Microsoft (R) Macro Assembler Version 5.10                  2/14/25 23:45:42
DOS KEYB Command  -  Interrupt 9 Non-US Support             Page     1-5


	   ??                C	
			 ]   C	
			     C	
 0042                        C	CMD_BLOCK	LABEL	BYTE
 0042                        C	HD_ERROR	LABEL	BYTE
 0042  0007[                 C	NEC_STATUS	DB	7 DUP(?)	; STATUS BYTES FROM NEC
	   ??                C	
			 ]   C	
			     C	
Microsoft (R) Macro Assembler Version 5.10                  2/14/25 23:45:42
DOS KEYB Command  -  Interrupt 9 Non-US Support             Page     1-6


			     C	PAGE
			     C	;----------------------------------------
			     C	;	VIDEO DISPLAY DATA AREA 	:
			     C	;----------------------------------------
 0049  0001[                 C	CRT_MODE	DB	1 DUP(?)	; CURRENT CRT MODE
	   ??                C	
			 ]   C	
			     C	
 004A  0001[                 C	CRT_COLS	DW	1 DUP(?)	; NUMBER OF COLUMNS ON SCREEN
	   ????              C	
			 ]   C	
			     C	
 004C  0001[                 C	CRT_LEN 	DW	1 DUP(?)	; LENGTH OF REGEN IN BYTES
	   ????              C	
			 ]   C	
			     C	
 004E  0001[                 C	CRT_START	DW	1 DUP(?)	; STARTING ADDRESS IN REGEN BUFFER
	   ????              C	
			 ]   C	
			     C	
 0050  0008[                 C	CURSOR_POSN	DW	8 DUP(?)	; CURSOR FOR EACH OF UP TO 8 PAGES
	   ????              C	
			 ]   C	
			     C	
 0060  0001[                 C	CURSOR_MODE	DW	1 DUP(?)	; CURRENT CURSOR MODE SETTING
	   ????              C	
			 ]   C	
			     C	
 0062  0001[                 C	ACTIVE_PAGE	DB	1 DUP(?)	; CURRENT PAGE BEING DISPLAYED
	   ??                C	
			 ]   C	
			     C	
 0063  0001[                 C	ADDR_6845	DW	1 DUP(?)	; BASE ADDRESS FOR ACTIVE DISPLAY CARD
	   ????              C	
			 ]   C	
			     C	
 0065  0001[                 C	CRT_MODE_SET	DB	1 DUP(?)	; CURRENT SETTING OF THE 3X8 REGISTER
	   ??                C	
			 ]   C	
			     C	
 0066  0001[                 C	CRT_PALLETTE	DB	1 DUP(?)	; CURRENT PALLETTE SETTING COLOR CARD
	   ??                C	
			 ]   C	
			     C	
Microsoft (R) Macro Assembler Version 5.10                  2/14/25 23:45:42
DOS KEYB Command  -  Interrupt 9 Non-US Support             Page     1-7


			     C	PAGE
			     C	;----------------------------------------
			     C	;	POST DATA AREA			:
			     C	;----------------------------------------
 0067  0001[                 C	IO_ROM_INIT	DW	1 DUP(?)	; PNTR TO OPTIONAL I/O ROM INIT ROUTINE
	   ????              C	
			 ]   C	
			     C	
 0069  0001[                 C	IO_ROM_SEG	DW	1 DUP(?)	; POINTER TO IO ROM SEGMENT
	   ????              C	
			 ]   C	
			     C	
 006B  0001[                 C	INTR_FLAG	DB	1 DUP(?)	; FLAG TO INDICATE AN INTERRUPT HAPPEND
	   ??                C	
			 ]   C	
			     C	
			     C	;----------------------------------------
			     C	;	TIMER DATA AREA 		:
			     C	;----------------------------------------
 006C  0001[                 C	TIMER_LOW	DW	1 DUP(?)	; LOW WORD OF TIMER COUNT
	   ????              C	
			 ]   C	
			     C	
 006E  0001[                 C	TIMER_HIGH	DW	1 DUP(?)	; HIGH WORD OF TIMER COUNT
	   ????              C	
			 ]   C	
			     C	
 0070  0001[                 C	TIMER_OFL	DB	1 DUP(?)	; TIMER HAS ROLLED OVER SINCE LAST READ
	   ??                C	
			 ]   C	
			     C	
			     C	;----------------------------------------
			     C	;	SYSTEM DATA AREA		:
			     C	;----------------------------------------
 0071  0001[                 C	BIOS_BREAK	DB	1 DUP(?)	; BIT 7=1 IF BREAK KEY HAS BEEN HIT
	   ??                C	
			 ]   C	
			     C	
 0072  0001[                 C	RESET_FLAG	DW	1 DUP(?)	; WORD=1234H IF KEYBOARD RESET UNDERWAY
	   ????              C	
			 ]   C	
			     C	
Microsoft (R) Macro Assembler Version 5.10                  2/14/25 23:45:42
DOS KEYB Command  -  Interrupt 9 Non-US Support             Page     1-8


			     C	PAGE
			     C	;----------------------------------------
			     C	;	HARD FILE DATA AREAS		:
			     C	;----------------------------------------
 0074  0001[                 C	DISK_STATUS1	DB	1 DUP(?)
	   ??                C	
			 ]   C	
			     C	
 0075  0001[                 C	HF_NUM		DB	1 DUP(?)
	   ??                C	
			 ]   C	
			     C	
 0076  0001[                 C	CONTROL_BYTE	DB	1 DUP(?)
	   ??                C	
			 ]   C	
			     C	
 0077  0001[                 C	PORT_OFF	DB	1 DUP(?)
	   ??                C	
			 ]   C	
			     C	
			     C	;------------------------------------------------------
			     C	;	PRINTER AND RS232 TIME-OUT VARIABLES	      :
			     C	;------------------------------------------------------
 0078  0004[                 C	PRINT_TIM_OUT	DB	4 DUP(?)
	   ??                C	
			 ]   C	
			     C	
 007C  0004[                 C	RS232_TIM_OUT	DB	4 DUP(?)
	   ??                C	
			 ]   C	
			     C	
			     C	;----------------------------------------
			     C	;	ADDITIONAL KEYBOARD DATA AREA	:
			     C	;----------------------------------------
 0080  0001[                 C	BUFFER_START	DW	1 DUP(?)
	   ????              C	
			 ]   C	
			     C	
 0082  0001[                 C	BUFFER_END	DW	1 DUP(?)
	   ????              C	
			 ]   C	
			     C	
			     C	;---------------------------------------
			     C	;	ADDITIONAL FLOPPY DATA	       ;
			     C	;---------------------------------------
 008B                        C		ORG	8BH
 008B  0001[                 C	LASTRATE	DB	1 DUP(?)	; LAST DATA RATE SELECTED
	   ??                C	
			 ]   C	
			     C	
Microsoft (R) Macro Assembler Version 5.10                  2/14/25 23:45:42
DOS KEYB Command  -  Interrupt 9 Non-US Support             Page     1-9


			     C	PAGE
			     C	;---------------------------------------
			     C	;	ADDITIONAL HARD FILE DATA      :
			     C	;---------------------------------------
 008C                        C		ORG	8CH
 008C  0001[                 C	HF_STATUS	DB	1 DUP(?)	; STATUS REGISTER
	   ??                C	
			 ]   C	
			     C	
 008D  0001[                 C	HF_ERROR	DB	1 DUP(?)	; ERROR REGISTER
	   ??                C	
			 ]   C	
			     C	
 008E  0001[                 C	HF_INT_FLAG	DB	1 DUP(?)	; HARD FILE INTERRUPT FLAG
	   ??                C	
			 ]   C	
			     C	
 008F  0001[                 C	HF_CNTRL	DB	1 DUP(?)	; COMBO HARD FILE/FLOPPY CARD BIT 0=1
	   ??                C	
			 ]   C	
			     C	
			     C	;----------------------------------------
			     C	;	ADDITIONAL DISKETTE AREA       :
			     C	;----------------------------------------
 0090                        C		ORG	90H
 0090                        C	DSK_STATE	LABEL	BYTE
 0090  0001[                 C			DB	1 DUP(?)	; DRIVE 0 MEDIA STATE
	   ??                C	
			 ]   C	
			     C	
 0091  0001[                 C			DB	1 DUP(?)	; DRIVE 1 MEDIA STATE
	   ??                C	
			 ]   C	
			     C	
 0092  0001[                 C			DB	1 DUP(?)	; DRIVE 0 OPERATION START STATE
	   ??                C	
			 ]   C	
			     C	
 0093  0001[                 C			DB	1 DUP(?)	; DRIVE 1 OPERATION START STATE
	   ??                C	
			 ]   C	
			     C	
 0094  0001[                 C	DSK_TRK 	DB	1 DUP(?)	; DRIVE 0 PRESENT CYLINDER
	   ??                C	
			 ]   C	
			     C	
 0095  0001[                 C			DB	1 DUP(?)	; DRIVE 1 PRESENT CYLINDER
	   ??                C	
			 ]   C	
			     C	
 0096  0001[                 C			DB	1 DUP(?)	; RESERVED
	   ??                C	
			 ]   C	
			     C	
Microsoft (R) Macro Assembler Version 5.10                  2/14/25 23:45:42
DOS KEYB Command  -  Interrupt 9 Non-US Support             Page     1-10


			     C	;----------------------------------------				AEV
			     C	;	ADDITIONAL KEYBOARD FLAG FOR KBX:				AEV
			     C	;----------------------------------------				AEV
 0096                        C		ORG	96H			;				AEV
 0096  0001[                 C	KB_FLAG_3	DB	1 DUP(?)	;				AEV
	   ??                C	
			 ]   C	
			     C	
			     C	;----------------------------------------
			     C	;	ADDITIONAL KEYBOARD LED FLAG	:
			     C	;----------------------------------------
 0097                        C		ORG	97H
 0097  0001[                 C	KB_FLAG_2	DB	1 DUP(?)
	   ??                C	
			 ]   C	
			     C	
Microsoft (R) Macro Assembler Version 5.10                  2/14/25 23:45:42
DOS KEYB Command  -  Interrupt 9 Non-US Support             Page     1-11


			     C	PAGE
			     C	;----------------------------------------
			     C	;	REAL TIME CLOCK DATA AREA	:
			     C	;----------------------------------------
 0098                        C		ORG	98H
 0098  0001[                 C	USER_FLAG	DW	1 DUP(?)	; OFFSET ADDR OF USERS WAIT FLAG
	   ????              C	
			 ]   C	
			     C	
 009A  0001[                 C	USER_FLAG_SEG	DW	1 DUP(?)	; SEG ADDR OF USER WAIT FLAG
	   ????              C	
			 ]   C	
			     C	
 009C  0001[                 C	RTC_LOW 	DW	1 DUP(?)	; LOW WORD OF USER WAIT FLAG
	   ????              C	
			 ]   C	
			     C	
 009E  0001[                 C	RTC_HIGH	DW	1 DUP(?)	; HIGH WORD OF USER WAIT FLAG
	   ????              C	
			 ]   C	
			     C	
 00A0  0001[                 C	RTC_WAIT_FLAG	DB	1 DUP(?)	; WAIT ACTIVE FLAG
	   ??                C	
			 ]   C	
			     C	
 00A1                        C	DATA	ENDS
			     C	;----------------------------------------
			     C	;	EXTRA DATA AREA 		:
			     C	;----------------------------------------
 0000                        C	XXDATA	SEGMENT AT 50H
 0000  0001[                 C	STATUS_BYTE	DB	1 DUP(?)
	   ??                C	
			 ]   C	
			     C	
 0001                        C	XXDATA	ENDS
			     C	;----------------------------------------
			     C	;	VIDEO DISPLAY BUFFER		:
			     C	;----------------------------------------
 0000                        C	VIDEO_RAM	SEGMENT AT 0B800H
 0000                        C	REGEN	LABEL	BYTE
 0000                        C	REGENW	LABEL	WORD
 0000  4000[                 C		DB	16384 DUP(?)
	   ??                C	
			 ]   C	
			     C	
 4000                        C	VIDEO_RAM	ENDS
				        INCLUDE POSTEQU.inc            ;; System equates
			     C	; Revised FOR KBX (ADD EQUATES FOR KB_FLAG_3) AEV  8-17-84
			     C	;----------------------------------------------------------------------------
			     C	;		EQUATES 		:
			     C	;----------------------------------------------------------------------------
 = 0000                      C	TTEST		EQU	0		; CONDITIONAL ASM (TEST2.SRC)
 = 0000                      C	KY_LOCK 	EQU	0		; CONDITIONAL ASM (TEST2.SRC)
 = 0000                      C	KEY_NUMS	EQU	0		; CONDITIONAL ASM (KYBD.SRC)
Microsoft (R) Macro Assembler Version 5.10                  2/14/25 23:45:42
DOS KEYB Command  -  Interrupt 9 Non-US Support             Page     1-12


			     C	;----------------------------------------------------------------------------
 = 00F0                      C	X287		EQU	0F0H		; MATH PROCESSOR
			     C	;----------------------------------------------------------------------------
 = 0020                      C	LOOP_POST	EQU	020H		; MFG LOOP POST JUMPER
			     C	;----------------------------------------------------------------------------
 = 0010                      C	REFRESH_BIT	EQU	010H		; REFRESH TEST BIT
			     C	;----------------------------------------------------------------------------
 = 0000                      C	POST_SS 	EQU	0H		; POST STACK SEGMENT
 = 8000                      C	POST_SP 	EQU	8000H		; POST STACK POINTER
 = FFFF                      C	TEMP_STACK_LO	EQU	0FFFFH		;
 = 0000                      C	TEMP_STACK_HI	EQU	0		; SET PROTECTED MODE TEMP_SS
			     C						; 0:FFFFH
			     C	;----------------------------------------------------------------------------
 = 0060                      C	PORT_A		EQU	60H		; 8042 KEYBOARD SCAN/DIAG OUTPUTS
 = 0061                      C	PORT_B		EQU	61H		; 8042 READ WRITE REGISTER
 = 00C0                      C	PARITY_ERR	EQU	0C0H		; RAM/IO CHANNEL PARITY ERROR
 = 00F3                      C	RAM_PAR_ON	EQU	11110011B	; AND THIS VALUE
 = 000C                      C	RAM_PAR_OFF	EQU	00001100B	; OR THIS VALUE
 = 0040                      C	IO_CHK		EQU	01000000B	; IO CHECK?
 = 0080                      C	PRTY_CHK	EQU	10000000B	; PARITY CHECK?
			     C	
 = 0064                      C	STATUS_PORT	EQU	64H		;8042 STATUS PORT
 = 0001                      C	OUT_BUF_FULL	EQU	01H		; 0 = +OUTPUT BUFFER FULL
 = 0002                      C	INPT_BUF_FULL	EQU	02H		; 1 = +INPUT BUFFER FULL
 = 0004                      C	SYS_FLAG	EQU	04H		; 2 = -SYSTEM FLAG -POR/-SELF TEST
 = 0008                      C	CMD_DATA	EQU	08H		; 3 = -COMMAND/+DATA
 = 0010                      C	KYBD_INH	EQU	10H		; 4 = +KEYBOARD INHIBITED
 = 0020                      C	TRANS_TMOUT	EQU	20H		; 5 = +TRANSMIT TIMEOUT
 = 0040                      C	RCV_TMOUT	EQU	40H		; 6 = +RECEIVE TIME OUT
 = 0080                      C	PARITY_EVEN	EQU	80H		; 7 = +PARITY IS EVEN
 = 00FE                      C	SHUT_CMD	EQU	0FEH		; CAUSE A SHUTDOWN COMMAND
 = 00AB                      C	INTR_FACE_CK	EQU	0ABH		; CHECK 8042 INTERFACE CMD
 = 00E0                      C	KYBD_CLK_DATA	EQU	0E0H		; GET KYBD CLOCK AND DATA CMD
 = 0001                      C	KYBD_CLK	EQU	001H		; KEYBOARD CLOCK BIT 0
			     C	;----------MANUFACTURING PORT------------------------------------------------
 = 0080                      C	MFG_PORT	EQU	80H		; MANUFACTURING CHECKPOINT PORT
			     C	;----------MANUFACTURING BIT DEFINITION FOR MFG_ERR_FLAG+1-------------------
 = 0001                      C	MEM_FAIL	EQU	00000001B      ; STORAGE TEST FAILED (ERROR 20X)
 = 0002                      C	PRO_FAIL	EQU	00000010B      ; VIRTUAL MODE TEST FAILED (ERROR 104)
 = 0004                      C	LMCS_FAIL	EQU	00000100B      ; LOW MEG CHIP SELECT FAILED (ERROR 109)
 = 0008                      C	KYCLK_FAIL	EQU	00001000B      ; KEYBOARD CLOCK TEST FAILED (ERROR 304)
 = 0010                      C	KY_SYS_FAIL	EQU	00010000B      ; KEYBOARD OR SYSTEM FAILED (ERROR 303)
 = 0020                      C	KYBD_FAIL	EQU	00100000B      ; KEYBOARD FAILED (ERROR 301)
 = 0040                      C	DSK_FAIL	EQU	01000000B      ; DISKETTE TEST FAILED (ERROR 601)
 = 0080                      C	KEY_FAIL	EQU	10000000B      ; KEYBOARD LOCKED (ERROR 302)
			     C	;----------8042 INPUT PORT BIT DEFINITION------------------------------------
 = 0010                      C	BASE_RAM	EQU	10H		;BASE R/W MEMORY
 = 0020                      C	MFG_JMP 	EQU	20H		;LOOP POST JUMPER
 = 0040                      C	DSP_JMP 	EQU	40H		;DISPLAY TYPE JUMPER
 = 0080                      C	KEY_BD_INHIB	EQU	80H		;KEYBOARD INHIBIT SWITCH
			     C	;----------8042 RAM DEFINITION-----------------------------------------------
 = 0010                      C	INH_KEYBOARD	EQU	10H		;BYTE 0 BIT 4 OF 8042 RAM
			     C	;-------------- COMMANDS ----------------------------------------------------
 = 0020                      C	READ_8042_RAM	EQU	20H		; BITS 0-4 = ADDRESS (20-3F)
Microsoft (R) Macro Assembler Version 5.10                  2/14/25 23:45:42
DOS KEYB Command  -  Interrupt 9 Non-US Support             Page     1-13


 = 0060                      C	WRITE_8042_RAM	EQU	60H		;
 = 00AA                      C	SELF_8042_TEST	EQU	0AAH		; 8042 SELF TEST
 = 00C0                      C	READ_8042_INPUT EQU	0C0H		; READ 8042 INPUT PORT
 = 00AE                      C	ENA_KBD 	EQU	0AEH		; ENABLE KEYBOARD COMMAND
 = 00AD                      C	DIS_KBD 	EQU	0ADH		; DISABLE KEYBOARD COMMAND
 = 00DF                      C	ENABLE_BIT20	EQU	0DFH		; ENABLE ADDR LINE BIT 20
 = 00DD                      C	DISABLE_BIT20	EQU	0DDH		; DISABLE ADDR LINE BIT 20
			     C	;-------------- KEYBOARD/LED COMMANDS --------------------------------------
 = 00F1                      C	KB_MENU 	EQU	0F1H		; SELECT MENU COMMAND
 = 00F3                      C	KB_TYPA_RD	EQU	0F3H		; SET TYPAMATIC RATE/DELAY	   RWV 10-07-85
 = 00F4                      C	KB_ENABLE	EQU	0F4H		; KEYBOARD ENABLE
 = 00F7                      C	KB_MAKE_BREAK	EQU	0F7H		; TYPAMATIC
 = 00FE                      C	KB_ECHO 	EQU	0FEH		; ECHO COMMAND
 = 00FF                      C	KB_RESET	EQU	0FFH		; SELF DIAGNOSTIC COMMAND
 = 00ED                      C	LED_CMD 	EQU	0EDH		; LED WRITE COMMAND
			     C	;--------------- KEYBOARD RESPONSE -----------------------------------------
 = 00AA                      C	KB_OK		EQU	0AAH		; RESPONSE FROM SELF DIAG
 = 00FA                      C	KB_ACK		EQU	0FAH		; ACKNOWLEDGE FROM TRANSMISSION
 = 00FF                      C	KB_OVER_RUN	EQU	0FFH		; OVER RUN
 = 00FE                      C	KB_RESEND	EQU	0FEH		; RESEND REQUEST
 = 00F0                      C	KB_BREAK	EQU	0F0H		; KEYBOARD BREAK CODE
			     C	;-------------- CMOS EQUATES -------------------------------------------------
 = 0070                      C	CMOS_PORT	EQU	070H		; IO ADDRESS OF CMOS PORT
 = 008A                      C	CLK_UP		EQU	08AH		; CLOCK UPDATE STATUS
 = 008B                      C	CMOS_ALARM	EQU	08BH		;
 = 0090                      C	CMOS_BEGIN	EQU	090H		;
 = 00AD                      C	CMOS_END	EQU	0ADH		;
 = 008F                      C	SHUT_DOWN	EQU	08FH		; SHUTDOWN OFFSET
 = 008D                      C	BATTERY_COND_STATUS EQU 08DH		; BATTERY STATUS
 = 00B1                      C	M_SIZE_HI	EQU	0B1H		; IO MEMORY SIZE HIGH BYTE (POST)
 = 00B0                      C	M_SIZE_LO	EQU	0B0H		; IO MEMORY SIZE LO BYTE   (POST)
 = 0096                      C	M1_SIZE_HI	EQU	096H		; 0->640K CONFIG MEMORY SIZE (SETUP)
 = 0095                      C	M1_SIZE_LO	EQU	095H		;   LOW BYTE (SETUP)
 = 0098                      C	M2_SIZE_HI	EQU	098H		; 640K->UP CONFIG MEMORY SIZE (SETUP)
 = 0097                      C	M2_SIZE_LO	EQU	097H		;   LOW BYTE (SETUP)
 = 0094                      C	C_EQUIP 	EQU	094H		; CMOS EQUIPMENT FLAG
 = 0092                      C	HD_FILE_TYPE	EQU	092H		; HARD FILE TYPE BYTE
Microsoft (R) Macro Assembler Version 5.10                  2/14/25 23:45:42
DOS KEYB Command  -  Interrupt 9 Non-US Support             Page     1-14


			     C	PAGE
			     C	;--------------- CMOS DIAG_STATUS ERROR FLAGS--------------------------------
 = 008E                      C	DIAG_STATUS	EQU	08EH		; CMOS ADDRESS OF DIAG_STATUS
 = 0080                      C	BAD_BAT 	EQU	080H		; DEAD BATTERY
 = 0040                      C	BAD_CKSUM	EQU	040H		; CHECKSUM ERROR
 = 0020                      C	BAD_CONFIG	EQU	020H		; MINIMUM CONFIG USED INSTEAD OF CMOS
 = 0010                      C	W_MEM_SIZE	EQU	010H		; MEMORY SIZE NOT EQUAL TO CONFIG
 = 0008                      C	HF_FAIL 	EQU	008H		; HARD FILE FAILURE ON INIT
 = 0004                      C	CMOS_CLK_FAIL	EQU	004H		; CMOS CLK NOT UPDATING OR NOT VALID
			     C	;--------------- CMOS INFORMATION FLAGS--------------------------------------
 = 00B3                      C	INFO_STATUS	EQU	0B3H		; CMOS ADDRESS OF INFO BYTE
 = 0080                      C	M640K		EQU	080H		; 512K -> 640K CARD INSTALLED
 = 0040                      C	NEW_INST	EQU	040H		; FLAG USED BY CMOS SETUP UTILITY
 = 0020                      C	HF_BOOT 	EQU	020H		; BOOT HARD FILE FLAG
			     C	;--------------- INTERRUPT EQUATES ------------------------------------------
 = 0020                      C	INTA00		EQU	20H		; 8259 PORT
 = 0021                      C	INTA01		EQU	21H		; 8259 PORT
 = 0020                      C	EOI		EQU	20H
 = 00A0                      C	INTB00		EQU	0A0H		; 2ND 8259
 = 00A1                      C	INTB01		EQU	0A1H		;
 = 0070                      C	INT_TYPE	EQU	070H		; START OF 8259 INTERRUPT TABLE LOCATION
 = 0010                      C	INT_VIDEO	EQU	010H		; VIDEO VECTOR
			     C	;---------------------------------------------------------------------------
 = 0040                      C	TIMER		EQU	40H
 = 0043                      C	TIM_CTL 	EQU	43H		; 8253 TIMER CONTROL PORT ADDR
 = 0040                      C	TIMER0		EQU	40H		; 8253 TIMER/CNTER 0 PORT ADDR
 = 0001                      C	TMINT		EQU	01		; TIMER 0 INTR RECVD MASK
			     C	;--------------------------------------------------------------------------
 = 0008                      C	DMA08		EQU	08		; DMA STATUS REG PORT ADDR
 = 0000                      C	DMA		EQU	00		; DMA CH.0 ADDR. REG PORT ADDR
			     C	;--------------------------------------------------------------------------
 = 00D0                      C	DMA18		EQU	0D0H		; 2ND DMA STATUS PORT ADDR
 = 00C0                      C	DMA1		EQU	0C0H		; 2ND DMA CH.0 ADDR. REG PORT ADDR
			     C	;--------------------------------------------------------------------------
 = 0081                      C	DMA_PAGE	EQU	81H		; START OF DMA PAGE REGISTERS
 = 008F                      C	LAST_DMA_PAGE	EQU	8FH		; LAST DMA PAGE REGISTER
			     C	;--------------------------------------------------------------------------
 = 0540                      C	MAX_PERIOD	EQU	540H
 = 0410                      C	MIN_PERIOD	EQU	410H
 = 0060                      C	KBD_IN		EQU	60H		; KEYBOARD DATA IN ADDR PORT
 = 0002                      C	KBDINT		EQU	02		; KEYBOARD INTR MASK
 = 0060                      C	KB_DATA 	EQU	60H		; KEYBOARD SCAN CODE PORT
 = 0061                      C	KB_CTL		EQU	61H		; CONTROL BITS FOR KEYBOARD SENSE DATA
 = 0080                      C	KB_ERR		EQU	80H		; KEYBOARD TRANSMIT ERROR FLAG
			     C	;----- SHIFT FLAG EQUATES WITHIN KB_FLAG
 = 0080                      C	INS_STATE	EQU	80H		; INSERT STATE IS ACTIVE
 = 0040                      C	CAPS_STATE	EQU	40H		; CAPS LOCK STATE HAS BEEN TOGGLED
 = 0020                      C	NUM_STATE	EQU	20H		; NUM LOCK STATE HAS BEEN TOGGLED
 = 0010                      C	SCROLL_STATE	EQU	10H		; SCROLL LOCK STATE HAS BEEN TOGGLED
 = 0008                      C	ALT_SHIFT	EQU	08H		; ALTERNATE SHIFT KEY DEPRESSED
 = 0004                      C	CTL_SHIFT	EQU	04H		; CONTROL SHIFT KEY DEPRESSED
 = 0002                      C	LEFT_SHIFT	EQU	02H		; LEFT SHIFT KEY DEPRESSED
 = 0001                      C	RIGHT_SHIFT	EQU	01H		; RIGHT SHIFT KEY DEPRESSED
			     C	;----- SHIFT FLAG EQUATES WITHIN KB_FLAG_1
Microsoft (R) Macro Assembler Version 5.10                  2/14/25 23:45:42
DOS KEYB Command  -  Interrupt 9 Non-US Support             Page     1-15


 = 0080                      C	INS_SHIFT	EQU	80H		; INSERT KEY IS DEPRESSED
 = 0040                      C	CAPS_SHIFT	EQU	40H		; CAPS LOCK KEY IS DEPRESSED
 = 0020                      C	NUM_SHIFT	EQU	20H		; NUM LOCK KEY IS DEPRESSED
 = 0010                      C	SCROLL_SHIFT	EQU	10H		; SCROLL LOCK KEY IS DEPRESSED
 = 0008                      C	HOLD_STATE	EQU	08H		; SUSPEND KEY HAS BEEN TOGGLED
 = 0004                      C	SYS_SHIFT	EQU	04H		; SYSTEM KEY DEPRESSED AND HELD
 = 0002                      C	L_ALT_SHIFT	EQU	02H		; LEFT ALT KEY DOWN		   RWV 8-28-85
 = 0001                      C	L_CTL_SHIFT	EQU	01H		; LEFT CTL KEY DOWN		   RWV 8-28-85
			     C	;---------------FLAGS WITHIN KB_FLAG_2
 = 0080                      C	KB_ERR		EQU	80H		; KEYBOARD TRANSMIT ERROR FLAG
 = 0040                      C	KB_PR_LED	EQU	40H		; MODE INDICATOR UPDATE
 = 0020                      C	KB_FE		EQU	20H		; RESEND RECEIVED FLAG
 = 0010                      C	KB_FA		EQU	10H		; ACK RECEIVED
 = 0008                      C	CIRCUS_SYSTEM	EQU	08H		; CIRCUS SYSTEM INDICATOR
 = 0007                      C	KB_LEDS 	EQU	07H		; KEYBOARD LED STATE BITS
			     C	;			04H		; CAPS LOCK INDICATOR
			     C	;			02H		; NUM LOCK INDICATOR
			     C	;			01H		; SCROLL LOCK INDICATOR
			     C	;---------------FLAGS WITHIN KB_FLAG_3
 = 0080                      C	RD_ID		EQU	80H		; DOING A READ ID (MUST BE BIT0)   AEV
 = 0040                      C	LC_AB		EQU	40H		; LAST CHAR WAS FIRST ID CHAR	   AEV
 = 0020                      C	SET_NUM_LK	EQU	20H		; FORCE NUM LOCK IF RD ID & KBX    AEV
 = 0010                      C	KBX		EQU	10H		; ENHANCED KEYBOARD INSTALLED	   RWV 7-18-85
 = 0008                      C	R_ALT_SHIFT	EQU	08H		; RIGHT ALT KEY DOWN		   RWV 7-18-85
 = 0008                      C	GRAPH_ON	EQU	08H		; ALT GRAPHICS KEY DOWN (WT ONLY)  AEV
 = 0004                      C	R_CTL_SHIFT	EQU	04H		; RIGHT CTL KEY DOWN		   RWV 7-18-85
 = 0002                      C	LC_E0		EQU	02H		; LAST CODE WAS THE E0 HIDDEN CODE RWV 7-18-85
 = 0001                      C	LC_E1		EQU	01H		; LAST CODE WAS THE E1 HIDDEN CODE RWV 7-18-85
			     C	;----- SCAN CODE EQUATES FOR THE KEYBOARD
 = 0045                      C	NUM_KEY 	EQU	69		; SCAN CODE FOR NUMBER LOCK
 = 0046                      C	SCROLL_KEY	EQU	70		; SCAN CODE FOR SCROLL LOCK
 = 0038                      C	ALT_KEY 	EQU	56		; SCAN CODE FOR ALTERNATE KEY
 = 001D                      C	CTL_KEY 	EQU	29		; SCAN CODE FOR CONTROL KEY
 = 003A                      C	CAPS_KEY	EQU	58		; SCAN CODE FOR SHIFT LOCK
 = 002A                      C	LEFT_KEY	EQU	42		; SCAN CODE FOR LEFT SHIFT
 = 0036                      C	RIGHT_KEY	EQU	54		; SCAN CODE FOR RIGHT SHIFT
 = 0052                      C	INS_KEY 	EQU	82		; SCAN CODE FOR INSERT KEY
 = 0053                      C	DEL_KEY 	EQU	83		; SCAN CODE FOR DELETE KEY
 = 0054                      C	SYS_KEY 	EQU	84		; SCAN CODE FOR SYSTEM KEY
			     C	;-------------- ENHANCED KEYBOARD EQUATES
 = 00AB                      C	ID_1		EQU	0ABH		; 1ST ID CHAR FOR KBX
 = 0041                      C	ID_2		EQU	041H		; 2ND ID CHAR FOR KBX		   AEV
 = 0054                      C	ID_2A		EQU	054H		; ALTERNATE 2ND ID CHAR FOR KBX    RWV 8-16-85
 = 0057                      C	F11_M		EQU	87		; F11 KEY MAKE
 = 0058                      C	F12_M		EQU	88		; F12 KEY MAKE
 = 00E0                      C	MC_E0		EQU	224		; GENERAL MARKER CODE
 = 00E1                      C	MC_E1		EQU	225		; PAUSE KEY MARKER CODE
			     C	
			     C	;-------------- DISKETTE EQUATES
 = 0080                      C	INT_FLAG	EQU	080H		; INTERRUPT OCCURRENCE FLAG
 = 0025                      C	MOTOR_WAIT	EQU	37		; 2 SECS OF COUNTS FOR MOTOR TURN OFF
 = 0080                      C	TIME_OUT	EQU	80H		; ATTACHMENT FAILED TO RESPOND
 = 0040                      C	BAD_SEEK	EQU	40H		; SEEK OPERATION FAILED
 = 0020                      C	BAD_NEC 	EQU	20H		; NEC CONTROLLER HAS FAILED
Microsoft (R) Macro Assembler Version 5.10                  2/14/25 23:45:42
DOS KEYB Command  -  Interrupt 9 Non-US Support             Page     1-16


 = 0010                      C	BAD_CRC 	EQU	10H		; BAD CRC ON DISKETTE READ
 = 0009                      C	DMA_BOUNDARY	EQU	09H		; ATTEMPT TO DMA ACROSS 64K BOUNDARY
 = 0008                      C	BAD_DMA 	EQU	08H		; DMA OVERRUN ON OPERATION
 = 0006                      C	MEDIA_CHANGE	EQU	06H		; MEDIA REMOVED ON DUAL ATTACH CARD
 = 0004                      C	RECORD_NOT_FND	EQU	04H		; REQUESTED SECTOR NOT FOUND
 = 0003                      C	WRITE_PROTECT	EQU	03H		; WRITE ATTEMPTED ON WRITE PROT DISK
 = 0002                      C	BAD_ADDR_MARK	EQU	02H		; ADDRESS MARK NOT FOUND
 = 0001                      C	BAD_CMD 	EQU	01H		; BAD COMMAND PASSED TO DISKETTE I/O
			     C	
 = 0002                      C	XRATE		EQU	02H		; 250KBS DATA TRANSFER RATE
 = 0001                      C	DUAL		EQU	01H		; DUAL ATTACH CARD PRESENT FLAG
			     C	
 = 0080                      C	DSK_CHG 	EQU	080H		; DISKETTE CHANGE FLAG MASK BIT
 = 0007                      C	STATE_MSK	EQU	007H		; USED TO STRIP OFF STATE OF MEDIA
 = 00F8                      C	REV_STATE	EQU	0F8H		; USED AS MASK FOR STATE BITS
 = 0010                      C	DETERMINED	EQU	010H		; SET STATE DETERMINED IN STATE BITS
 = 0003                      C	TRAN_MSK	EQU	03H		; ISOLATE SHIFTED TRANSFER RATE BITS
 = 0020                      C	DOUBLE_STEP	EQU	020H		; MASK TO TURN ON DOUBLE STEPPING
 = 00F0                      C	MOTOR_MSK	EQU	0F0H		; MASK TO CLEAR MOTOR ON BITS
 = 0002                      C	MAX_DRV 	EQU	002H		; MAX NUMBER OF DRIVES
			     C	;HOME		 EQU	 010H		 ; TRACK 0 MASK
 = 0004                      C	SENSE_DRV_ST	EQU	004H		; SENSE DRIVE STATUS COMMAND
 = 0001                      C	ONE		EQU	001H		; SEEK ONE TRACK
 = 0030                      C	TRK_SLAP	EQU	030H		; CRASH STOP (48 TPI DRIVES)
 = 000A                      C	QUIET_SEEK	EQU	00AH		; SEEK TO TRACK 10
 = 000F                      C	HD12_SETTLE	EQU	015D		; 1.2 M HEAD SETTLE TIME
 = 0014                      C	HD320_SETTLE	EQU	020D		; 320 K HEAD SETTLE TIME
 = 0080                      C	WRITE_OP	EQU	080H		; WRITE OPERATION FLAG
 = 0010                      C	DD_MASK 	EQU	010H		; MASK TO INDICATE DRIVE IS 80 TRACKS
Microsoft (R) Macro Assembler Version 5.10                  2/14/25 23:45:42
DOS KEYB Command  -  Interrupt 9 Non-US Support             Page     1-17


			     C	PAGE
			     C	;------ DISK CHANGE LINE EQUATES
 = 0001                      C	NOCHGLN 	EQU	001H		; NO DISK CHANGE LINE AVAILABLE
 = 0002                      C	CHGLN		EQU	002H		; DISK CHANGE LINE AVAILABLE
			     C	;------ MEDIA/DRIVE STATE INDICATORS
 = 0093                      C	M326D326	EQU	093H		; STATE MACHINE - 320/360 MEDIA/DRIVE
 = 0074                      C	M326D12 	EQU	074H		; STATE MACHINE - 320/360 MEDIA,1.2DRIVE
 = 0015                      C	M12D12		EQU	015H		; STATE MACHINE - 1.2 MEDIA/DRIVE
 = 0061                      C	POA_DUAL	EQU	061H		; 300K DATA TRANSFER RATE & STATE 1
 = 0080                      C	POA_START	EQU	080H		; 250K DATA TRANSFER RATE & STATE 0
 = 0008                      C	TRK_80		EQU	008H		; DISKETTE DRIVE HAS 80 TRACKS
			     C	;------ CMOS NON-VOLATILE RAM EQUATES
 = 000E                      C	CMOSDSB_ADDR	EQU	00EH		; DISKETTE STATUS BYTE ADDRESS
 = 0070                      C	CADR_PRT	EQU	070H		; CMOS ADDRESS PORT ADDRESS
 = 0071                      C	CDATA_PRT	EQU	071H		; CMOS DATA PORT ADDRESS
 = 00C0                      C	CMOS_GOOD	EQU	0C0H		; BATTERY AND CHECKSUM INDICATOR
 = 0010                      C	CMOSDSK_BYTE	EQU	010H		; DISKETTE BYTE ADDRESS
 = 000F                      C	LOWNIB		EQU	00FH		; ISOLATE LOW NIBBLE IN REGISTER MASK
 = 0002                      C	INVALID_DRV	EQU	002H		; FIRST INVALID DISKETTE TYPE
			     C	;----------------------------------------
			     C	;	TIMER DATA AREA 		:
			     C	;----------------------------------------
			     C	; COUNTS_SEC	EQU	18
			     C	; COUNTS_MIN	EQU	1092
			     C	; COUNTS_HOUR	EQU	65543
			     C	; COUNTS_DAY	EQU	1573040 = 1800B0H
Microsoft (R) Macro Assembler Version 5.10                  2/14/25 23:45:42
DOS KEYB Command  -  Interrupt 9 Non-US Support             Page     1-18


			     C	PAGE
				        INCLUDE KEYBSHAR.INC           ;;
			     C	.LIST
				        INCLUDE KEYBI2F.INC            ;;
			     C	.LIST
			     C	
				        INCLUDE KEYBI9C.INC            ;;
			     C	.LIST
			     C	
				        INCLUDE KEYBCPSD.INC           ;;
			     C	.LIST
			     C	
				        INCLUDE KEYBCMD.INC            ;;
			     C	.LIST
			     C	
			     C	
				                                       ;;
				        PUBLIC KEYB_STATE_PROCESSOR    ;;
				                                       ;;
 0000				CODE    SEGMENT PUBLIC 'CODE'          ;;
				                                       ;;
				        ASSUME  CS:CODE,DS:CODE        ;;
				                                       ;;
				;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
				;;
				;; Procedure: KEYB_STATE_PROCESSOR
				;;
				;; Description:
				;;     Convert scan to ASCII using the tables loaded into the
				;;     SHARED_DATA_AREA.  Conversion is directed by the STATE LOGIC
				;;     commands contained in the SHARED_DATA_AREA.  This routine
				;;     interprets those commands.
				;;
				;; Input Registers:
				;;     N/A
				;;
				;; Output Registers:
				;;     N/A
				;;
				;; Logic:
				;;     Enable interrupts
				;;     Save registers
				;;
				;;
				;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
				                                       ;;
 = 0080				BREAK_CODE    EQU  80H                 ;;
				                                       ;;
 0000  00			HOT_KEY_ACTIVE  DB   0                 ;; 1 if hot key is active
				                                       ;;
				                                       ;;
				                                       ;; These are copies of the BIOS FLAGS
 0001				FLAGS_TO_TEST    LABEL BYTE            ;;  KB_FLAG, KB_FLAG_1,2,3
 0001  0004[			KB_SHADOW_FLAGS  DB   NUM_BIOS_FLAGS DUP(0) ;;
Microsoft (R) Macro Assembler Version 5.10                  2/14/25 23:45:42
DOS KEYB Command  -  Interrupt 9 Non-US Support             Page     1-19


	   00			
			 ]	
				
 0005  00			EXT_KB_FLAG      DB   0                ;; Extended KB Flag for shift states
 0006  00			NLS_FLAG_1       DB   0                ;; NLS Flags for dead key etc
 0007  00			NLS_FLAG_2       DB   0                ;;  .
				                                       ;;
 0008  00 00			SAVED_NLS_FLAGS  DB   0,0              ;; Saved copy of the NLS flags
				                                       ;;
 000A  00			OPTION_BYTE     DB    0                ;; Set by OPTION command
				                                       ;;
 000B  0017 R			KB_FLAG_PTRS    DW   OFFSET KB_FLAG    ;; These are pointers to the BIOS flags
 000D  0018 R			                DW   OFFSET KB_FLAG_1  ;;  we must test
 000F  0097 R			                DW   OFFSET KB_FLAG_2  ;;
 0011  0096 R			                DW   OFFSET KB_FLAG_3  ;;
				                                       ;;
 0013  0000			XLAT_TAB_PTR    DW   0                 ;; pointer to xlat tables for cur state
				                                       ;;
				;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
				
				
 0015  00			NEST_LEVEL      DB   0                 ;;
 0016  00			PROCESS_LEVEL   DB   0                 ;;
 0017  00			TAKE_ELSE       DB   0                 ;;
 0018  00			BUSY_FLAG       DB   0                 ;; Flag to prevent re-entry
				                                       ;;
 0019				CMD_JUMP_TABLE  LABEL  WORD            ;;
 0019  014B R			        DW   OFFSET  IFF_PROC          ;; CODE  0
 001B  032B R			        DW   OFFSET  ANDF_PROC         ;;       1
 001D  0189 R			        DW   OFFSET  ELSEF_PROC        ;;       2
 001F  01BB R			        DW   OFFSET  ENDIFF_PROC       ;;       3
 0021  01D0 R			        DW   OFFSET  XLATT_PROC        ;;       4
 0023  02A7 R			        DW   OFFSET  OPTION_PROC       ;;       5
 0025  035E R			        DW   OFFSET  SET_FLAG_PROC     ;;       6
 0027  0108 R			        DW   OFFSET  PUT_ERROR_PROC    ;;       7
 0029  00DD R			        DW   OFFSET  IFKBD_PROC        ;;       8
 002B  02F3 R			        DW   OFFSET  GOTO_PROC         ;;       9
 002D  02E1 R			        DW   OFFSET  BEEP_PROC         ;;       A
 002F  02CA R			        DW   OFFSET  RESET_NLS_PROC    ;;       B
 0031  00DA R			        DW   OFFSET  UNKNOWN_COMMAND   ;;       C
 0033  00DA R			        DW   OFFSET  UNKNOWN_COMMAND   ;;       D
 0035  00DA R			        DW   OFFSET  UNKNOWN_COMMAND   ;;       E
 0037  00DA R			        DW   OFFSET  UNKNOWN_COMMAND   ;;       F
				                                       ;;
				                                       ;;
				;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
				                                       ;;
 0039				KEYB_STATE_PROCESSOR   PROC   NEAR     ;;
				                                       ;;
 0039  2E: F6 06 0010 E 01	        TEST   CS:SD.TABLE_OK,1        ;;
       90			
 0040  75 02			        JNZ    WE_HAVE_A_TABLE         ;;
 0042  F8			        CLC                            ;; BACK TO US INT 9
 0043  C3				RET			       ;;
Microsoft (R) Macro Assembler Version 5.10                  2/14/25 23:45:42
DOS KEYB Command  -  Interrupt 9 Non-US Support             Page     1-20


				
					EVEN
				
 0044				WE_HAVE_A_TABLE:                       ;;
					
 0044  1E			        PUSH   DS                      ;; save DS
 0045  06			        PUSH   ES                      ;; save ES
 0046  50			        PUSH   AX                      ;; save scan code for caller
 0047  53			        PUSH   BX                      ;; save shift states for caller
				
 0048  0E			        PUSH   CS                      ;;
 0049  1F			        POP    DS                      ;; DS = our seg
 004A  BB ---- R		        MOV    BX,DATA                 ;;
 004D  8E C3			        MOV    ES,BX                   ;; addressability to BIOS data
				                                       ;;
				                                       ;;
 004F  80 3E 0000 E FF		        CMP     COUNTRY_FLAG,0FFH      ;; Q..country mode?
 0054  74 03			        JE      INIT_STATE_PROCESSING  ;; Y..continue
 0056  E9 0145 R		        JMP     GOTO_BIOS              ;; N..exit
				                                       ;;
				;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
				;; -------STATE SECTION PROCESSING-------
				;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
				                                       ;;
 0059				INIT_STATE_PROCESSING:                 ;;
				;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
				;; Set NLS shift flags EITHER_SHIFT, EITHER_ALT, EITHER_CTRL
				;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
				                                       ;;
				                                       ;; Q..in shift state?
 0059  26: F6 06 0017 R 03	        TEST   ES:KB_FLAG,RIGHT_SHIFT+LEFT_SHIFT
 005F  75 07			        JNZ    IN_SHIFT_STATE          ;; Y..go set bit
 0061  80 26 0005 R 7F		        AND    EXT_KB_FLAG,NOT EITHER_SHIFT ;; N..clear bit
 0066  EB 05			        JMP    SHORT TEST_CTL          ;;
 0068				IN_SHIFT_STATE:                        ;;
 0068  80 0E 0005 R 80		        OR     EXT_KB_FLAG,EITHER_SHIFT ;;
 006D				TEST_CTL:                              ;;
 006D  26: F6 06 0017 R 04	        TEST   ES:KB_FLAG,CTL_SHIFT    ;; Q..in control state?
 0073  75 0F			        JNZ    IN_CTL_STATE            ;; Y..go set bit
 0075  26: F6 06 0096 R 04	        TEST   ES:KB_FLAG_3,R_CTL_SHIFT ;; Q..how bout the right ctl?
 007B  75 07			        JNZ    IN_CTL_STATE            ;; Y..go set the bit
 007D  80 26 0005 R BF		        AND    EXT_KB_FLAG,NOT EITHER_CTL ;; N..clear the bit
 0082  EB 05			        JMP    SHORT TEST_ALT          ;;
 0084				IN_CTL_STATE:                          ;;
 0084  80 0E 0005 R 40		        OR     EXT_KB_FLAG,EITHER_CTL   ;;
 0089				TEST_ALT:                              ;;
 0089  26: F6 06 0017 R 08	        TEST   ES:KB_FLAG,ALT_SHIFT    ;; Q..in alt state?
 008F  75 0F			        JNZ    IN_ALT_STATE            ;; Y..go set bit
 0091  26: F6 06 0096 R 08	        TEST   ES:KB_FLAG_3,R_ALT_SHIFT ;; Q..how bout the right alt?
 0097  75 07			        JNZ    IN_ALT_STATE            ;; Y..go set the bit
 0099  80 26 0005 R DF		        AND    EXT_KB_FLAG,NOT EITHER_ALT ;; N..clear the bit
 009E  EB 05			        JMP    SHORT COPY_FLAGS        ;;
 00A0				IN_ALT_STATE:                          ;;
 00A0  80 0E 0005 R 20		        OR     EXT_KB_FLAG,EITHER_ALT   ;;
Microsoft (R) Macro Assembler Version 5.10                  2/14/25 23:45:42
DOS KEYB Command  -  Interrupt 9 Non-US Support             Page     1-21


				                                       ;;
				;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
				;; Copy BIOS KB flags from BIOS data seg into the
				;; FLAGS_TO_TEST structure.
				;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
				                                       ;;
 00A5				COPY_FLAGS:                            ;;
 00A5  B9 0004			        MOV    CX,NUM_BIOS_FLAGS       ;;
 00A8  BE 0000			        MOV    SI,0                    ;; pointers to the BIOS flags
 00AB  BF 0000			        MOV    DI,0                    ;; create shadow copies
 00AE				MOVE_NEXT_FLAG:                        ;;
 00AE  8B 9C 000B R		        MOV    BX,KB_FLAG_PTRS[SI]     ;; pointer to next flag
 00B2  26: 8A 07		        MOV    AL,ES:[BX]              ;; flag in AL
 00B5  88 85 0001 R		        MOV    KB_SHADOW_FLAGS[DI],AL  ;; save it in the shadow table
 00B9  47			        INC    DI                      ;;
 00BA  46			        INC    SI                      ;;
 00BB  46			        INC    SI                      ;;
 00BC  E2 F0			        LOOP   MOVE_NEXT_FLAG          ;;
				                                       ;;
				;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
				;; Interpret State Logic Commands
				;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
				                                       ;;
 00BE				PROCESS_STATES:                        ;;
 00BE  C6 06 000A R 00		        MOV    OPTION_BYTE,0           ;; clear options
 00C3  8B 36 0022 E		        MOV    SI,SD.LOGIC_PTR         ;;
 00C7  8D 74 04			        LEA    SI,[SI].SL_LOGIC_CMDS   ;;
 00CA				NEXT_COMMAND:                          ;;
 00CA  8A 1C			        MOV    BL,[SI]                 ;; command byte in BL
 00CC  D0 EB			        SHR    BL,1                    ;;
 00CE  D0 EB			        SHR    BL,1                    ;;
 00D0  D0 EB			        SHR    BL,1                    ;;
 00D2  D0 EB			        SHR    BL,1                    ;; ISOLATE COMMAND CODE
 00D4  D0 E3			        SHL    BL,1                    ;; command code * 2
 00D6  FF A7 0019 R		        JMP    CMD_JUMP_TABLE[BX]      ;; go process command
 00DA				UNKNOWN_COMMAND:                       ;;
 00DA  E9 03CB R		        JMP    FATAL_ERROR             ;; bad news
				                                       ;;
				                                       ;;
				;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 00DD				IFKBD_PROC:                            ;;
 00DD  A0 0015 R		        MOV    AL,NEST_LEVEL           ;;
 00E0  3A 06 0016 R		        CMP    AL,PROCESS_LEVEL        ;; Q..nest level = process level?
 00E4  75 19			        JNE    IFKBD_DONE              ;; N..don't process
				
 00E6  8B 44 01			        MOV    AX,[SI+1]               ;; Keyboard Type Flag
				                                       ;;
 00E9  85 06 000C E		        TEST   SD.KEYB_TYPE,AX         ;; Q..are we the right system?
 00ED  75 07			        JNZ    IFKBD_TEST_OK           ;; Y..
 00EF				IFKBD_TEST_FAILED:                     ;;
 00EF  C6 06 0017 R 01		        MOV    TAKE_ELSE,YES           ;; test failed - take ELSE
 00F4  EB 09			        JMP    SHORT IFKBD_DONE        ;;
 00F6				IFKBD_TEST_OK:                         ;;
 00F6  FE 06 0016 R		        INC    PROCESS_LEVEL           ;; process commands within IF
Microsoft (R) Macro Assembler Version 5.10                  2/14/25 23:45:42
DOS KEYB Command  -  Interrupt 9 Non-US Support             Page     1-22


 00FA  C6 06 0017 R 00		        MOV    TAKE_ELSE,NO            ;;
 00FF				IFKBD_DONE:                            ;;
 00FF  FE 06 0015 R		        INC    NEST_LEVEL              ;; IFKBD increments nest level
 0103  46			        INC    SI                      ;; bump past IFKBD
 0104  46			        INC    SI                      ;;
 0105  46			        INC    SI                      ;;
 0106  EB C2			        JMP    NEXT_COMMAND            ;;
				                                       ;;
				;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
				                                       ;;
 0108				PUT_ERROR_PROC:                        ;;
 0108  A0 0015 R		        MOV    AL,NEST_LEVEL           ;;
 010B  3A 06 0016 R		        CMP    AL,PROCESS_LEVEL        ;; Q..nest level = process level?
 010F  75 16			        JNE    PUT_ERROR_DONE          ;; N..don't process
 0111  8B 3E 001C E		        MOV    DI,SD.ACTIVE_XLAT_PTR   ;; pointer to active Xlat Section
 0115  8A 44 01			        MOV    AL,[SI+1]               ;; state id in AL
 0118  E8 012B R		        CALL   PUT_ERROR               ;; check active section
 011B  72 0A			        JC     PUT_ERROR_DONE          ;; carry set if translation found
 011D  8B 3E 0024 E		        MOV    DI,SD.COMMON_XLAT_PTR   ;; check common Xlat Section
 0121  8A 44 01			        MOV    AL,[SI+1]               ;; state id for XLATT in AL
 0124  E8 012B R		        CALL   PUT_ERROR               ;;
				                                       ;;
 0127				PUT_ERROR_DONE:                        ;;
 0127  46			        INC    SI                      ;;
 0128  46			        INC    SI                      ;;
 0129  EB 9F			        JMP    NEXT_COMMAND            ;;
				                                       ;;
 012B				PUT_ERROR      PROC                    ;;
				;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
				;; Search for a state whose ID matches the ID
				;; on the PUT_ERROR command
				;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
				                                       ;;
 012B  F8			        CLC                            ;;
 012C  8D 7D 04			        LEA    DI,[DI].XS_FIRST_STATE  ;; point to first state in section
 012F				PE_NEXT_STATE:                         ;;
 012F  83 3D 00			        CMP    [DI].XS_STATE_LEN,0     ;; Q..out of states?
 0132  74 10			        JE     PE_EXIT                 ;; Y..exit
 0134  3A 45 02			        CMP    AL,[DI].XS_STATE_ID     ;; Q..is this the requested state?
 0137  74 04			        JE     PE_STATE_MATCH          ;;
 0139  03 3D			        ADD    DI,[DI].XS_STATE_LEN    ;; N..check next state
 013B  EB F2			        JMP    SHORT PE_NEXT_STATE     ;;
				                                       ;;
 013D				PE_STATE_MATCH:                        ;;
 013D  8B 45 05			        MOV    AX,[DI].XS_ERROR_CHAR   ;; get error char in AX
 0140  E8 0000 E		        CALL   BUFFER_FILL             ;;
 0143  F9			        STC                            ;; indicate that we found the state
 0144				PE_EXIT:                               ;;
 0144  C3			        RET                            ;;
				                                       ;;
 0145				PUT_ERROR   ENDP                       ;;
				                                       ;;
				;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
				                                       ;;
Microsoft (R) Macro Assembler Version 5.10                  2/14/25 23:45:42
DOS KEYB Command  -  Interrupt 9 Non-US Support             Page     1-23


 0145				GOTO_BIOS:                             ;;
 0145  F8			        CLC                            ;; clear carry flag indicating
 0146  5B			        POP   BX                       ;;  we should continue INT 9
 0147  58			        POP   AX                       ;;   processing
 0148  07			        POP   ES                       ;;
 0149  1F			        POP   DS                       ;;
 014A  C3			        RET                            ;;
				                                       ;;
				;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
				                                       ;;
 014B				IFF_PROC:                              ;;
 014B  A0 0015 R		        MOV    AL,NEST_LEVEL           ;;
 014E  3A 06 0016 R		        CMP    AL,PROCESS_LEVEL        ;; Q..nest level = process level?
 0152  75 2C			        JNE    IFF_DONE                ;; N..don't process IFF
 0154  8A 1C			        MOV    BL,[SI]                 ;; command byte
 0156  80 E3 07			        AND    BL,FLAG_ID_BITS         ;; isolate flag id
 0159  32 FF			        XOR    BH,BH                   ;;
 015B  8A 87 0001 R		        MOV    AL,FLAGS_TO_TEST[BX]    ;; flag in AL
 015F  F6 04 08			        TEST   BYTE PTR[SI],NOT_TEST   ;; Q..is this a NOT test?
 0162  75 07			        JNZ    ITS_A_NOT               ;;
 0164  84 44 01			        TEST   AL,[SI]+1               ;; Y..check for bit set
 0167  75 0E			        JNZ    IFF_MATCH               ;;
 0169  74 05			        JZ     IFF_NO_MATCH            ;;
 016B				ITS_A_NOT:                             ;;
 016B  84 44 01			        TEST   AL,[SI]+1               ;; Y..check for bit clear
 016E  74 07			        JZ     IFF_MATCH               ;;
 0170				IFF_NO_MATCH:                          ;;
 0170  C6 06 0017 R 01		        MOV    TAKE_ELSE,YES           ;; flag test failed - take ELSE
 0175  EB 09			        JMP    SHORT IFF_DONE          ;;
 0177				IFF_MATCH:                             ;;
 0177  FE 06 0016 R		        INC    PROCESS_LEVEL           ;; process commands within IF
 017B  C6 06 0017 R 00		        MOV    TAKE_ELSE,NO            ;;
				                                       ;;
 0180				IFF_DONE:                              ;;
 0180  FE 06 0015 R		        INC    NEST_LEVEL              ;; IFF increments nest level
 0184  46			        INC    SI                      ;; bump past IFF
 0185  46			        INC    SI                      ;;
 0186  E9 00CA R		        JMP    NEXT_COMMAND            ;;
				                                       ;;
				;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
				                                       ;;
 0189				ELSEF_PROC:                            ;;
 0189  A0 0016 R		        MOV    AL,PROCESS_LEVEL        ;;
 018C  3A 06 0015 R		        CMP    AL,NEST_LEVEL           ;; Q..nest level = process level?
 0190  75 07			        JNE    CHECK_TAKE_ELSEF        ;; N..check for take_else
 0192  FE 0E 0016 R		        DEC    PROCESS_LEVEL           ;; Y..we just finished the "IF" block
 0196  EB 1F 90			        JMP    ELSEF_DONE              ;;    so we are finished with IFF/ELSEF
 0199				CHECK_TAKE_ELSEF:                      ;;
 0199  80 3E 0017 R 01		        CMP    TAKE_ELSE,YES           ;; Q..are we scanning for ELSE?
 019E  75 17			        JNE    ELSEF_DONE              ;; N..done
 01A0  FE 0E 0015 R		        DEC    NEST_LEVEL              ;; ELSEF itself is back a level
 01A4  3A 06 0015 R		        CMP    AL,NEST_LEVEL           ;; Q..nest level = process level?
 01A8  75 09			        JNE    NOT_THIS_ELSEF          ;; N..this else is not the one
 01AA  FE 06 0016 R		        INC    PROCESS_LEVEL           ;; Y..process ELSEF block
Microsoft (R) Macro Assembler Version 5.10                  2/14/25 23:45:42
DOS KEYB Command  -  Interrupt 9 Non-US Support             Page     1-24


 01AE  C6 06 0017 R 00		        MOV    TAKE_ELSE,NO            ;; reset
 01B3				NOT_THIS_ELSEF:                        ;;
 01B3  FE 06 0015 R		        INC    NEST_LEVEL              ;; stuff within the ELSEF is up a level
				                                       ;;
 01B7				ELSEF_DONE:                            ;;
 01B7  46			        INC    SI                      ;; bump past ELSEF
 01B8  E9 00CA R		        JMP    NEXT_COMMAND            ;;
				                                       ;;
				;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 01BB				ENDIFF_PROC:                           ;;
 01BB  A0 0016 R		        MOV    AL,PROCESS_LEVEL        ;;
 01BE  3A 06 0015 R		        CMP    AL,NEST_LEVEL           ;; Q..nest level = process level?
 01C2  75 04			        JNE    ENDIFF_DONE             ;; N..don't adjust process level
 01C4  FE 0E 0016 R		        DEC    PROCESS_LEVEL           ;; Y..we just finished the IF/ELSE
 01C8				ENDIFF_DONE:                            ;;
 01C8  FE 0E 0015 R		        DEC    NEST_LEVEL              ;; ENDIF decrements nest level
 01CC  46			        INC    SI                      ;; bump past ENDIF
 01CD  E9 00CA R		        JMP    NEXT_COMMAND            ;;
				                                       ;;
				;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
				;; Translations may be in the Common or Specific
				;; Sections.  Search the Specific section first
				;; then the common section.
				;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 01D0				XLATT_PROC:                            ;;
 01D0  A0 0016 R		        MOV    AL,PROCESS_LEVEL        ;;
 01D3  3A 06 0015 R		        CMP    AL,NEST_LEVEL           ;; Q..nest level = process level?
 01D7  75 27			        JNE    XLATT_DONE              ;; N..next command
 01D9  8B 3E 001C E		        MOV    DI,SD.ACTIVE_XLAT_PTR   ;; pointer to active Xlat Section
 01DD  8A 44 01			        MOV    AL,[SI+1]               ;; state id for XLATT in AL
 01E0  E8 0205 R		        CALL   TRANSLATE               ;; check active section
 01E3  72 0C			        JC     XLATT_FOUND             ;; carry set if translation found
 01E5  8B 3E 0024 E		        MOV    DI,SD.COMMON_XLAT_PTR   ;; check common Xlat Section
 01E9  8A 44 01			        MOV    AL,[SI+1]               ;; state id for XLATT in AL
 01EC  E8 0205 R		        CALL   TRANSLATE               ;;
 01EF  73 0F			        JNC    XLATT_DONE              ;;
 01F1				XLATT_FOUND:                           ;;
 01F1  80 0E 0005 R 08		        OR     EXT_KB_FLAG,SCAN_MATCH  ;; set flag indicating scan matched
 01F6  F6 06 000A R 80		        TEST   OPTION_BYTE,EXIT_IF_FOUND ;; Q..exit
 01FB  74 03			        JZ     XLATT_DONE              ;;
 01FD  E9 03CD R		        JMP    EXIT                    ;; Y..BYE
				                                       ;;
 0200				XLATT_DONE:                            ;;
 0200  46			        INC    SI                      ;;
 0201  46			        INC    SI                      ;;
 0202  E9 00CA R		        JMP    NEXT_COMMAND            ;;
				                                       ;;
 0205				TRANSLATE PROC                         ;;
				;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
				;; Search for a state whose ID matches the ID
				;; on the XLATT command
				;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
				                                       ;;
 0205  F8			        CLC                            ;;
Microsoft (R) Macro Assembler Version 5.10                  2/14/25 23:45:42
DOS KEYB Command  -  Interrupt 9 Non-US Support             Page     1-25


 0206  8D 7D 04			        LEA    DI,[DI].XS_FIRST_STATE  ;; point to first state in section
 0209				TP_NEXT_STATE:                         ;;
 0209  83 3D 00			        CMP    [DI].XS_STATE_LEN,0     ;; Q..out of states?
 020C  74 1C			        JE     TP_EXIT                 ;; Y..exit
 020E  3A 45 02			        CMP    AL,[DI].XS_STATE_ID     ;; Q..is this the requested state?
 0211  74 04			        JE     TP_STATE_MATCH          ;;
 0213  03 3D			        ADD    DI,[DI].XS_STATE_LEN    ;; N..check next state
 0215  EB F2			        JMP    SHORT TP_NEXT_STATE     ;;
				                                       ;;
 0217				TP_STATE_MATCH:                        ;;
 0217  80 26 0005 R F7		        AND    EXT_KB_FLAG,NOT SCAN_MATCH  ;; reset flag before search
 021C  56			        PUSH   SI                      ;; save pointer to next command
 021D  8D 75 07			        LEA    SI,[DI].XS_FIRST_TAB    ;; point to first xlat table
 0220  89 36 0013 R		        MOV    XLAT_TAB_PTR,SI         ;; start of XLAT tables
 0224  A0 0000 E		        MOV    AL,SCAN_CODE            ;; restore incoming scan code
 0227  EB 02			        JMP    SHORT NEXT_XLAT_TAB     ;;
 0229				TP_DONE:                               ;; return here from XLAT
 0229  5E			        POP    SI                      ;;
 022A				TP_EXIT:                               ;;
 022A  C3			        RET                            ;;
				                                       ;;
				;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
				;; Check xlate tables for matching scan code
				;; The xlate table can be in one of two forms:
				;;    Type 1 = Table contains buffer entries only.
				;;             Scan code is used as an index into xlat table
				;;    Type 2 = Table contains pairs of SCAN/BUFFER_ENTRY.
				;;             Table must be searched for matching scan.
				;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
				                                       ;;
 022B				NEXT_XLAT_TAB:                         ;;
 022B  8B 36 0013 R		        MOV    SI,XLAT_TAB_PTR         ;; pointer to xlat tables
 022F  83 3C 00			        CMP    [SI].XLAT_TAB_SIZE,0    ;; Q..any more xlat tables?
 0232  75 02			        JNE    PROCESS_XLAT_TAB        ;; Y..check um
 0234  EB F3			        JMP    TP_DONE                 ;; N..done
 0236				PROCESS_XLAT_TAB:                      ;;
 0236  8A 54 02			        MOV    DL,[SI].XLAT_OPTIONS    ;; save translate options IN DL
 0239  8B 1C			        MOV    BX,[SI].XLAT_TAB_SIZE   ;; Y..calc pointer to next xlat tab
 023B  03 DE			        ADD    BX,SI                   ;;
 023D  89 1E 0013 R		        MOV    XLAT_TAB_PTR,BX         ;; pointer to next xlat tab
 0241  F6 C2 40			        TEST   DL,TYPE_2_TAB           ;; Q..is this a type 2 table?
 0244  74 2F			        JZ     TYPE_1_LOOKUP           ;; N..go do table lookup
 0246				TYPE_2_SEARCH:                         ;; Y..search table
 0246  32 ED			        XOR    CH,CH                   ;;
 0248  8A 4C 03			        MOV    CL,[SI].XLAT_NUM        ;; number of xlat entries
 024B  BB 0003			        MOV    BX,DEFAULT_TAB_2_ENT_SZ ;; default entry size
 024E  F6 C2 A0			        TEST   DL,ASCII_ONLY+ZERO_SCAN ;; Q..are buffer entries ASCII only?
 0251  74 03			        JZ     NEXT_TAB_2_ENTRY        ;; N..continue
 0253  BB 0002			        MOV    BX,ASC_ONLY_TAB_2_ENT_SZ ;; Y..set size in BX
 0256				NEXT_TAB_2_ENTRY:                      ;; entry size is in BX
 0256  83 F9 00			        CMP    CX,0                    ;; Q..last entry?
 0259  74 D0			        JE     NEXT_XLAT_TAB           ;; y..go to next table
 025B  3A 44 04			        CMP    AL,[SI].XLAT_SCAN       ;; Q..scan match?
 025E  74 06			        JE     FOUND_TAB_2_ENTRY       ;; Y..go create buffer entry
Microsoft (R) Macro Assembler Version 5.10                  2/14/25 23:45:42
DOS KEYB Command  -  Interrupt 9 Non-US Support             Page     1-26


 0260  03 F3			        ADD    SI,BX                   ;; point to next entry
 0262  E2 F2			        LOOP   NEXT_TAB_2_ENTRY        ;;
 0264  EB C5			        JMP    SHORT NEXT_XLAT_TAB     ;;
 0266				FOUND_TAB_2_ENTRY:                     ;; Q..set scan code to 0?
 0266  8A E0			        MOV    AH,AL                   ;; default scan code in AH
 0268  8A 44 05			        MOV    AL,[SI].XLAT_2_BUF_ENTRY ;; ASCII code from table in AL
 026B  F6 C2 A0			        TEST   DL,ASCII_ONLY+ZERO_SCAN ;; Q..are buffer entries ASCII only?
 026E  75 2A			        JNZ    BUFFER_ENTRY_READY      ;; Y..buffer entry is ready
 0270  8A 64 06			        MOV    AH,[SI].XLAT_2_BUF_ENTRY+1 ;; N..scan code from table as well
 0273  EB 25			        JMP    SHORT BUFFER_ENTRY_READY ;; go put entry in buffer
				                                       ;;
 0275				TYPE_1_LOOKUP:                         ;;
 0275  3A 44 03			        CMP    AL,[SI].XLAT_SCAN_LO    ;; Q..is scan in range of this table?
 0278  72 B1			        JB     NEXT_XLAT_TAB           ;; N..next table
 027A  3A 44 04			        CMP    AL,[SI].XLAT_SCAN_HI    ;; Q..is scan in range of this table?
 027D  77 AC			        JA     NEXT_XLAT_TAB           ;; N..next table
 027F  2A 44 03			        SUB    AL,[SI].XLAT_SCAN_LO    ;; convert scan code to xlat index
 0282  F6 C2 A0			        TEST   DL,ASCII_ONLY+ZERO_SCAN ;; Q..ASCII only in xlat ?
 0285  74 0A			        JZ     TWO_BYTE_LOOKUP         ;; N..go do 2-byte lookup
 0287  8D 5C 05			        LEA    BX,[SI].XLAT_1_BUF_ENTRY ;; Y..do 1-byte lookup
 028A  D7			        XLAT   [SI].XLAT_1_BUF_ENTRY   ;; ASCII code in AL
 028B  8A 26 0000 E		        MOV    AH,SCAN_CODE            ;; SCAN in AH
 028F  EB 09			        JMP    SHORT BUFFER_ENTRY_READY ;; go put entry in buffer
 0291				TWO_BYTE_LOOKUP:                       ;;
 0291  B3 02			        MOV    BL,2                    ;; multiply scan index
 0293  F6 E3			        MUL    BL                      ;;  by two
 0295  8B D8			        MOV    BX,AX                   ;; real index in BX
 0297  8B 40 05			        MOV    AX,WORD PTR [SI].XLAT_1_BUF_ENTRY[BX] ;; get 2-byte buffer entry
				                                       ;;  AL=ASCII  AH=SCAN
 029A				BUFFER_ENTRY_READY:                    ;;
 029A  F6 C2 20			        TEST   DL,ZERO_SCAN            ;; Q..set scan part to zero?
 029D  74 02			        JZ     NO_ZERO_SCAN            ;; N..
 029F  32 E4			        XOR    AH,AH                   ;; scan = 0
 02A1				NO_ZERO_SCAN:                          ;;
 02A1  E8 0000 E		        CALL   BUFFER_FILL             ;; go put entry in buffer
 02A4  F9			        STC                            ;; indicate translation found
 02A5  EB 82			        JMP    TP_DONE                 ;;
				                                       ;;
 02A7				TRANSLATE ENDP                         ;;
				                                       ;;
				;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 02A7				OPTION_PROC:                           ;;
 02A7  A0 0016 R		        MOV    AL,PROCESS_LEVEL        ;;
 02AA  3A 06 0015 R		        CMP    AL,NEST_LEVEL           ;; Q..nest level = process level?
 02AE  75 15			        JNE    DONE_OPTION             ;; N..done
 02B0  8A 44 01			        MOV    AL,[SI]+1               ;; mask in AL
 02B3  F6 04 08			        TEST   BYTE PTR[SI],NOT_TEST   ;; Q..is this a NOT?
 02B6  75 07			        JNZ    AND_MASK                ;;
 02B8  08 06 000A R		        OR     OPTION_BYTE,AL          ;; N..OR in the mask bits
 02BC  EB 07 90			        JMP    DONE_OPTION             ;;
 02BF				AND_MASK:                              ;;
 02BF  F6 D0			        NOT    AL                      ;;
 02C1  20 06 000A R		        AND    OPTION_BYTE,AL          ;; Y..AND out the mask bits
 02C5				DONE_OPTION:                           ;;
Microsoft (R) Macro Assembler Version 5.10                  2/14/25 23:45:42
DOS KEYB Command  -  Interrupt 9 Non-US Support             Page     1-27


 02C5  46			        INC    SI                      ;;
 02C6  46			        INC    SI                      ;;
 02C7  E9 00CA R		        JMP    NEXT_COMMAND            ;;
				;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 02CA				RESET_NLS_PROC:                        ;;
 02CA  A0 0015 R		        MOV    AL,NEST_LEVEL           ;;
 02CD  3A 06 0016 R		        CMP    AL,PROCESS_LEVEL        ;; Q..nest level = process level?
 02D1  75 0A			        JNE    RN_DONE                 ;; N..don't process
 02D3  C6 06 0006 R 00		        MOV    NLS_FLAG_1,0            ;;
 02D8  C6 06 0007 R 00		        MOV    NLS_FLAG_2,0            ;;
 02DD				RN_DONE:                               ;;
 02DD  46			        INC    SI                      ;;
 02DE  E9 00CA R		        JMP    NEXT_COMMAND            ;;
				;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 02E1				BEEP_PROC:                             ;;
 02E1  A0 0015 R		        MOV    AL,NEST_LEVEL           ;;
 02E4  3A 06 0016 R		        CMP    AL,PROCESS_LEVEL        ;; Q..nest level = process level?
 02E8  75 05			        JNE    BP_DONE                 ;; N..don't process
 02EA  C6 06 0000 E 01		        MOV    BEEP_PENDING,YES        ;; set beep pending flag. the beep
				                                       ;;  will be done just before iret
 02EF				BP_DONE:                               ;;
 02EF  46			        INC    SI                      ;;
 02F0  E9 00CA R		        JMP    NEXT_COMMAND            ;;
				;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 02F3				GOTO_PROC:                             ;;
 02F3  A0 0015 R		        MOV    AL,NEST_LEVEL           ;;
 02F6  3A 06 0016 R		        CMP    AL,PROCESS_LEVEL        ;; Q..nest level = process level?
 02FA  75 29			        JNE    GOTO_DONE               ;; N..don't process
 02FC  8A 1C			        MOV    BL,[SI]                 ;; command byte in BL
 02FE  80 E3 0F			        AND    BL,NOT COMMAND_BITS     ;; remove command code
 0301  0A DB			        OR     BL,BL                   ;; Q..goto label?
 0303  74 13			        JZ     GOTO_LABEL              ;; Y..go jump
 0305  80 FB 01			        CMP    BL,EXIT_INT_9_FLAG      ;; Q..SPECIAL - Exit Int 9?
 0308  75 03			        JNE    NOT_EXIT_INT_9          ;; N..
 030A  E9 03CD R		        JMP    EXIT                    ;; Y..bye bye
 030D				NOT_EXIT_INT_9:                        ;;
 030D  80 FB 02			        CMP    BL,EXIT_STATE_LOGIC_FLAG ;; Q..SPECIAL - Exit State Logic?
 0310  75 03			        JNE    NOT_EXIT_S_L            ;; N..
 0312  E9 0145 R		        JMP    GOTO_BIOS               ;; Y..goto bios
 0315				NOT_EXIT_S_L:                          ;;
 0315  E9 03CB R		        JMP    FATAL_ERROR             ;; garbage in that command
 0318				GOTO_LABEL:                            ;;
 0318  03 74 01			        ADD    SI,[SI]+1               ;; bump by relative offset
 031B  C6 06 0016 R 00		        MOV    PROCESS_LEVEL,0         ;; reset process and nest level
 0320  C6 06 0015 R 00		        MOV    NEST_LEVEL,0            ;;
 0325				GOTO_DONE:                             ;;
 0325  83 C6 03			        ADD    SI,3                    ;; bump to next command
 0328  E9 00CA R		        JMP    NEXT_COMMAND            ;;
				;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
				                                       ;;
 032B				ANDF_PROC:                             ;;
 032B  A0 0015 R		        MOV    AL,NEST_LEVEL           ;;
 032E  3A 06 0016 R		        CMP    AL,PROCESS_LEVEL        ;; Q..nest level = process level?
 0332  75 25			        JNE    ANDF_DONE               ;; N..don't process ANDF
Microsoft (R) Macro Assembler Version 5.10                  2/14/25 23:45:42
DOS KEYB Command  -  Interrupt 9 Non-US Support             Page     1-28


 0334  8A 1C			        MOV    BL,[SI]                 ;; command byte
 0336  80 E3 07			        AND    BL,FLAG_ID_BITS         ;; isolate flag id
 0339  32 FF			        XOR    BH,BH                   ;;
 033B  8A 87 0001 R		        MOV    AL,FLAGS_TO_TEST[BX]    ;; flag in AL
 033F  F6 04 08			        TEST   BYTE PTR[SI],NOT_TEST   ;; Q..is this a NOT test?
 0342  75 07			        JNZ    ANDF_NOT                ;;
 0344  84 44 01			        TEST   AL,[SI]+1               ;; Y..check for bit set
 0347  75 10			        JNZ    ANDF_DONE               ;; if set then remain in IFF
 0349  74 05			        JZ     ANDF_NO_MATCH           ;;
 034B				ANDF_NOT:                              ;;
 034B  84 44 01			        TEST   AL,[SI]+1               ;; Y..check for bit clear
 034E  74 09			        JZ     ANDF_DONE               ;; if clear then remain in IFF
 0350				ANDF_NO_MATCH:                         ;;
 0350  C6 06 0017 R 01		        MOV    TAKE_ELSE,YES           ;; flag test failed - take ELSE
 0355  FE 0E 0016 R		        DEC    PROCESS_LEVEL           ;; IFF would have inc'd - so dec
 0359				ANDF_DONE:                             ;;
 0359  46			        INC    SI                      ;; bump past ANDF
 035A  46			        INC    SI                      ;;
 035B  E9 00CA R		        JMP    NEXT_COMMAND            ;;
				                                       ;;
				;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
				;; SET_FLAG Command.
				;; Flag Table must be in the Common Section
				;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
				                                       ;;
 035E				SET_FLAG_PROC:                         ;;
 035E  A0 0015 R		        MOV    AL,NEST_LEVEL           ;;
 0361  3A 06 0016 R		        CMP    AL,PROCESS_LEVEL        ;; Q..nest level = process level?
 0365  75 5F			        JNE    SF_DONE                 ;; N..don't process
				                                       ;;
 0367  8B 3E 0024 E		        MOV    DI,SD.COMMON_XLAT_PTR   ;; check common Xlat Section
 036B  8A 44 01			        MOV    AL,[SI+1]               ;; state id in AL
 036E  8D 7D 04			        LEA    DI,[DI].XS_FIRST_STATE  ;; point to first state in section
 0371				SF_NEXT_STATE:                         ;;
 0371  83 3D 00			        CMP    [DI].XS_STATE_LEN,0     ;; Q..out of states?
 0374  74 50			        JE     SF_DONE                 ;; Y..exit
 0376  3A 45 02			        CMP    AL,[DI].XS_STATE_ID     ;; Q..is this the requested state?
 0379  74 04			        JE     SF_STATE_MATCH             ;;
 037B  03 3D			        ADD    DI,[DI].XS_STATE_LEN    ;; N..check next state
 037D  EB F2			        JMP    SHORT SF_NEXT_STATE     ;;
				                                       ;;
 037F				SF_STATE_MATCH:                        ;;
 037F  80 26 0005 R F7		        AND    EXT_KB_FLAG,NOT SCAN_MATCH  ;; reset flag before search
 0384  56			        PUSH   SI                      ;; save pointer to next command
 0385  8D 75 07			        LEA    SI,[DI].XS_FIRST_TAB    ;; point to table
 0388  A0 0000 E		        MOV    AL,SCAN_CODE            ;; restore incoming scan code
 038B  8B 0C			        MOV    CX,[SI]                 ;; number of entries
 038D  83 F9 00			        CMP    CX,0                    ;; Q..any entries?
 0390  74 33			        JE     SF_RESTORE              ;; N..done
 0392  46			        INC    SI                      ;; Y..Bump to first entry
 0393  46			        INC    SI                      ;;
 0394				NEXT_SF_ENTRY:                         ;;
 0394  3A 04			        CMP    AL,[SI]                 ;; Q..scan match?
 0396  74 07			        JE     FOUND_SF_ENTRY          ;; Y..go set flag
Microsoft (R) Macro Assembler Version 5.10                  2/14/25 23:45:42
DOS KEYB Command  -  Interrupt 9 Non-US Support             Page     1-29


 0398  83 C6 03			        ADD    SI,3                    ;; point to next entry
 039B  E2 F7			        LOOP   NEXT_SF_ENTRY           ;;
 039D  EB 26			        JMP    SHORT SF_RESTORE        ;; no match found
 039F				FOUND_SF_ENTRY:                        ;;
 039F  C6 06 0006 R 00		        MOV    NLS_FLAG_1,0            ;; clear all NLS bits
 03A4  C6 06 0007 R 00		        MOV    NLS_FLAG_2,0            ;;
 03A9  8A 5C 01			        MOV    BL,[SI]+1               ;; flag id in BX
 03AC  32 FF			        XOR    BH,BH                   ;;
 03AE  8A 44 02			        MOV    AL,[SI]+2               ;; mask in AL
 03B1  08 87 0001 R		        OR     FLAGS_TO_TEST[BX],AL    ;; set the bit
 03B5  80 0E 0005 R 08		        OR     EXT_KB_FLAG,SCAN_MATCH  ;; set flag indicating scan matched
 03BA  F6 06 000A R 80		        TEST   OPTION_BYTE,EXIT_IF_FOUND ;; Q..exit
 03BF  74 04			        JZ     SF_RESTORE              ;;
 03C1  5E			        POP    SI                      ;;
 03C2  EB 09 90			        JMP    EXIT                    ;;
 03C5				SF_RESTORE:                            ;;
 03C5  5E			        POP    SI                      ;;
 03C6				SF_DONE:                               ;;
 03C6  46			        INC    SI                      ;; bump past command
 03C7  46			        INC    SI                      ;;
 03C8  E9 00CA R		        JMP    NEXT_COMMAND            ;;
				                                       ;;
				                                       ;;
				;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
				;; Fatal Error routine.  Come here when
				;; we have a critical error such as an
				;; invalid State Logic Command.
				;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
				                                       ;;
 03CB				FATAL_ERROR:                           ;;
 03CB  EB 00			        JMP   SHORT EXIT               ;; end the int 9 processing
				                                       ;;
				;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
				;; Exit point.
				;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
				                                       ;;
 03CD				EXIT:                                  ;;
 03CD  C6 06 0018 R 00		        MOV   BUSY_FLAG,NO             ;;
 03D2  F9			        STC                            ;; indicate we should end INT 9
 03D3  5B			        POP   BX                       ;;  processing
 03D4  58			        POP   AX                       ;;
 03D5  07			        POP   ES                       ;;
 03D6  1F			        POP   DS                       ;;
 03D7  C3			        RET                            ;;
				                                       ;;
 03D8				KEYB_STATE_PROCESSOR   ENDP            ;;
				                                       ;;
				                                       ;;
				
 03D8				CODE   ENDS
					END
Microsoft (R) Macro Assembler Version 5.10                  2/14/25 23:45:42
DOS KEYB Command  -  Interrupt 9 Non-US Support             Symbols-1


Structures and Records:

                N a m e                 Width   # fields
                                        Shift   Width   Mask    Initial

SET_FLAG_STR . . . . . . . . . .  	0004	0004
  SF_NUM . . . . . . . . . . . .  	0000
  SF_SCAN_CODE . . . . . . . . .  	0001
  SF_FLAG_ID . . . . . . . . . .  	0002
  SF_FLAG_MASK . . . . . . . . .  	0003
SHARED_DATA_STR  . . . . . . . .  	0030	0017
  OLD_INT_9  . . . . . . . . . .  	0000
  OLD_INT_2F . . . . . . . . . .  	0004
  OLD_INT_48 . . . . . . . . . .  	0008
  KEYB_TYPE  . . . . . . . . . .  	000C
  SYSTEM_FLAG  . . . . . . . . .  	000E
  TABLE_OK . . . . . . . . . . .  	0010
  JR_KB_FLAG . . . . . . . . . .  	0011
  TIMING_FACTOR  . . . . . . . .  	0012
  ACTIVE_LANGUAGE  . . . . . . .  	0016
  INVOKED_CP_TABLE . . . . . . .  	0018
  INVOKED_KBD_ID . . . . . . . .  	001A
  ACTIVE_XLAT_PTR  . . . . . . .  	001C
  FIRST_XLAT_PTR . . . . . . . .  	001E
  RESIDENT_END . . . . . . . . .  	0020
  LOGIC_PTR  . . . . . . . . . .  	0022
  COMMON_XLAT_PTR  . . . . . . .  	0024
  SPECIAL_FEATURES . . . . . . .  	0026
  TABLE_OVERFLOW . . . . . . . .  	0028
  HOT_KEY_ON_SCAN  . . . . . . .  	0029
  HOT_KEY_OFF_SCAN . . . . . . .  	002A
  TABLE_AREA . . . . . . . . . .  	002F
STATE_LOGIC_STR  . . . . . . . .  	0005	0003
  SL_LOGIC_LEN . . . . . . . . .  	0000
  SL_SPECIAL_FEATURES  . . . . .  	0002
  SL_LOGIC_CMDS  . . . . . . . .  	0004
STATE_STR  . . . . . . . . . . .  	0008	0005
  XS_STATE_LEN . . . . . . . . .  	0000
  XS_STATE_ID  . . . . . . . . .  	0002
  XS_KBD_TYPE  . . . . . . . . .  	0003
  XS_ERROR_CHAR  . . . . . . . .  	0005
  XS_FIRST_TAB . . . . . . . . .  	0007
XLAT_SECT_STR  . . . . . . . . .  	0005	0003
  XS_NEXT_SECT_PTR . . . . . . .  	0000
  XS_CP_ID . . . . . . . . . . .  	0002
  XS_FIRST_STATE . . . . . . . .  	0004
XLAT_STR . . . . . . . . . . . .  	0003	0002
  XLAT_TAB_SIZE  . . . . . . . .  	0000
  XLAT_OPTIONS . . . . . . . . .  	0002
XLAT_TYPE_1_STR  . . . . . . . .  	0006	0004
  XLAT_SCAN_LO . . . . . . . . .  	0003
  XLAT_SCAN_HI . . . . . . . . .  	0004
  XLAT_1_BUF_ENTRY . . . . . . .  	0005
XLAT_TYPE_2_STR  . . . . . . . .  	0006	0004
Microsoft (R) Macro Assembler Version 5.10                  2/14/25 23:45:42
DOS KEYB Command  -  Interrupt 9 Non-US Support             Symbols-2


  XLAT_NUM . . . . . . . . . . .  	0003
  XLAT_SCAN  . . . . . . . . . .  	0004
  XLAT_2_BUF_ENTRY . . . . . . .  	0005

Segments and Groups:

                N a m e         	Length	 Align	Combine Class

ABS0 . . . . . . . . . . . . . .  	7C00	AT	0000	
CODE . . . . . . . . . . . . . .  	03D8	PARA	PUBLIC	'CODE'
DATA . . . . . . . . . . . . . .  	00A1	AT	0040	
STACK  . . . . . . . . . . . . .  	0100	AT	0030	
VIDEO_RAM  . . . . . . . . . . .  	4000	AT	B800	
XXDATA . . . . . . . . . . . . .  	0001	AT	0050	

Symbols:            

                N a m e         	Type	 Value	 Attr

ACTIVE_PAGE  . . . . . . . . . .  	L BYTE	0062	DATA
ADDR_6845  . . . . . . . . . . .  	L WORD	0063	DATA
ALT_INPUT  . . . . . . . . . . .  	L BYTE	0019	DATA
ALT_KEY  . . . . . . . . . . . .  	NUMBER	0038	
ALT_SHIFT  . . . . . . . . . . .  	NUMBER	0008	
ANDF_COMMAND . . . . . . . . . .  	NUMBER	0010	
ANDF_DONE  . . . . . . . . . . .  	L NEAR	0359	CODE
ANDF_NOT . . . . . . . . . . . .  	L NEAR	034B	CODE
ANDF_NO_MATCH  . . . . . . . . .  	L NEAR	0350	CODE
ANDF_PROC  . . . . . . . . . . .  	L NEAR	032B	CODE
AND_MASK . . . . . . . . . . . .  	L NEAR	02BF	CODE
ANY_KB . . . . . . . . . . . . .  	NUMBER	FFFF	
ASCII_ONLY . . . . . . . . . . .  	NUMBER	0080	
ASC_ONLY_TAB_2_ENT_SZ  . . . . .  	NUMBER	0002	
AT_KB  . . . . . . . . . . . . .  	NUMBER	2000	

BAD_ADDR_MARK  . . . . . . . . .  	NUMBER	0002	
BAD_BAT  . . . . . . . . . . . .  	NUMBER	0080	
BAD_CKSUM  . . . . . . . . . . .  	NUMBER	0040	
BAD_CMD  . . . . . . . . . . . .  	NUMBER	0001	
BAD_CONFIG . . . . . . . . . . .  	NUMBER	0020	
BAD_CRC  . . . . . . . . . . . .  	NUMBER	0010	
BAD_DMA  . . . . . . . . . . . .  	NUMBER	0008	
BAD_NEC  . . . . . . . . . . . .  	NUMBER	0020	
BAD_SEEK . . . . . . . . . . . .  	NUMBER	0040	
BASE_RAM . . . . . . . . . . . .  	NUMBER	0010	
BASIC_PTR  . . . . . . . . . . .  	L WORD	0060	ABS0
BATTERY_COND_STATUS  . . . . . .  	NUMBER	008D	
BEEP_COMMAND . . . . . . . . . .  	NUMBER	00A0	
BEEP_PENDING . . . . . . . . . .  	V BYTE	0000		External
BEEP_PROC  . . . . . . . . . . .  	L NEAR	02E1	CODE
BIOS_BREAK . . . . . . . . . . .  	L BYTE	0071	DATA
BOOT_LOCN  . . . . . . . . . . .  	L FAR 	7C00	ABS0
BOOT_VEC . . . . . . . . . . . .  	L DWORD	0064	ABS0
BOOT_VECTOR  . . . . . . . . . .  	L DWORD	0064	ABS0
Microsoft (R) Macro Assembler Version 5.10                  2/14/25 23:45:42
DOS KEYB Command  -  Interrupt 9 Non-US Support             Symbols-3


BP_DONE  . . . . . . . . . . . .  	L NEAR	02EF	CODE
BREAK_CODE . . . . . . . . . . .  	NUMBER	0080	
BUFFER_END . . . . . . . . . . .  	L WORD	0082	DATA
BUFFER_ENTRY_READY . . . . . . .  	L NEAR	029A	CODE
BUFFER_FILL  . . . . . . . . . .  	L NEAR	0000		External
BUFFER_HEAD  . . . . . . . . . .  	L WORD	001A	DATA
BUFFER_START . . . . . . . . . .  	L WORD	0080	DATA
BUFFER_TAIL  . . . . . . . . . .  	L WORD	001C	DATA
BUSY_FLAG  . . . . . . . . . . .  	L BYTE	0018	CODE
BUSY_TFLAG . . . . . . . . . . .  	V BYTE	0000		External

CADR_PRT . . . . . . . . . . . .  	NUMBER	0070	
CAPS_KEY . . . . . . . . . . . .  	NUMBER	003A	
CAPS_SHIFT . . . . . . . . . . .  	NUMBER	0040	
CAPS_STATE . . . . . . . . . . .  	NUMBER	0040	
CDATA_PRT  . . . . . . . . . . .  	NUMBER	0071	
CHECK_CORE_COMMAND . . . . . . .  	NUMBER	00C0	
CHECK_TAKE_ELSEF . . . . . . . .  	L NEAR	0199	CODE
CHGLN  . . . . . . . . . . . . .  	NUMBER	0002	
CIRCUS_SYSTEM  . . . . . . . . .  	NUMBER	0008	
CLK_UP . . . . . . . . . . . . .  	NUMBER	008A	
CMD_BLOCK  . . . . . . . . . . .  	L BYTE	0042	DATA
CMD_DATA . . . . . . . . . . . .  	NUMBER	0008	
CMD_JUMP_TABLE . . . . . . . . .  	L WORD	0019	CODE
CMOSDSB_ADDR . . . . . . . . . .  	NUMBER	000E	
CMOSDSK_BYTE . . . . . . . . . .  	NUMBER	0010	
CMOS_ALARM . . . . . . . . . . .  	NUMBER	008B	
CMOS_BEGIN . . . . . . . . . . .  	NUMBER	0090	
CMOS_CLK_FAIL  . . . . . . . . .  	NUMBER	0004	
CMOS_END . . . . . . . . . . . .  	NUMBER	00AD	
CMOS_GOOD  . . . . . . . . . . .  	NUMBER	00C0	
CMOS_PORT  . . . . . . . . . . .  	NUMBER	0070	
COMMAND_BITS . . . . . . . . . .  	NUMBER	00F0	
COMMAND_SHIFT  . . . . . . . . .  	NUMBER	0004	
CONTROL_BYTE . . . . . . . . . .  	L BYTE	0076	DATA
COPY_FLAGS . . . . . . . . . . .  	L NEAR	00A5	CODE
COPY_SD_AREA . . . . . . . . . .  	L NEAR	0000		External
COUNTRY_FLAG . . . . . . . . . .  	V BYTE	0000		External
CP_PTR_SIZE  . . . . . . . . . .  	V WORD	0000		External
CP_TAB_OFFSET  . . . . . . . . .  	V DWORD	0000		External
CRT_COLS . . . . . . . . . . . .  	L WORD	004A	DATA
CRT_LEN  . . . . . . . . . . . .  	L WORD	004C	DATA
CRT_MODE . . . . . . . . . . . .  	L BYTE	0049	DATA
CRT_MODE_SET . . . . . . . . . .  	L BYTE	0065	DATA
CRT_PALLETTE . . . . . . . . . .  	L BYTE	0066	DATA
CRT_START  . . . . . . . . . . .  	L WORD	004E	DATA
CTL_KEY  . . . . . . . . . . . .  	NUMBER	001D	
CTL_SHIFT  . . . . . . . . . . .  	NUMBER	0004	
CURSOR_MODE  . . . . . . . . . .  	L WORD	0060	DATA
CURSOR_POSN  . . . . . . . . . .  	L WORD	0050	DATA	Length = 0008
C_EQUIP  . . . . . . . . . . . .  	NUMBER	0094	

DATA_AREA  . . . . . . . . . . .  	L BYTE	0400	ABS0
DATA_WORD  . . . . . . . . . . .  	L WORD	0400	ABS0
Microsoft (R) Macro Assembler Version 5.10                  2/14/25 23:45:42
DOS KEYB Command  -  Interrupt 9 Non-US Support             Symbols-4


DD_MASK  . . . . . . . . . . . .  	NUMBER	0010	
DEFAULT_TAB_2_ENT_SZ . . . . . .  	NUMBER	0003	
DEL_KEY  . . . . . . . . . . . .  	NUMBER	0053	
DESIG_CP_BUFFER  . . . . . . . .  	V WORD	0000		External
DESIG_CP_OFFSET  . . . . . . . .  	V WORD	0000		External
DETERMINED . . . . . . . . . . .  	NUMBER	0010	
DIAG_STATUS  . . . . . . . . . .  	NUMBER	008E	
DISABLE_BIT20  . . . . . . . . .  	NUMBER	00DD	
DISKETTE_STATUS  . . . . . . . .  	L BYTE	0041	DATA
DISK_POINTER . . . . . . . . . .  	L DWORD	0078	ABS0
DISK_STATUS1 . . . . . . . . . .  	L BYTE	0074	DATA
DISK_VECTOR  . . . . . . . . . .  	L DWORD	0100	ABS0
DIS_KBD  . . . . . . . . . . . .  	NUMBER	00AD	
DMA  . . . . . . . . . . . . . .  	NUMBER	0000	
DMA08  . . . . . . . . . . . . .  	NUMBER	0008	
DMA1 . . . . . . . . . . . . . .  	NUMBER	00C0	
DMA18  . . . . . . . . . . . . .  	NUMBER	00D0	
DMA_BOUNDARY . . . . . . . . . .  	NUMBER	0009	
DMA_PAGE . . . . . . . . . . . .  	NUMBER	0081	
DONE_OPTION  . . . . . . . . . .  	L NEAR	02C5	CODE
DOUBLE_STEP  . . . . . . . . . .  	NUMBER	0020	
DSK_CHG  . . . . . . . . . . . .  	NUMBER	0080	
DSK_FAIL . . . . . . . . . . . .  	NUMBER	0040	
DSK_STATE  . . . . . . . . . . .  	L BYTE	0090	DATA
DSK_TRK  . . . . . . . . . . . .  	L BYTE	0094	DATA
DSP_JMP  . . . . . . . . . . . .  	NUMBER	0040	
DUAL . . . . . . . . . . . . . .  	NUMBER	0001	

EITHER_ALT . . . . . . . . . . .  	NUMBER	0020	
EITHER_CTL . . . . . . . . . . .  	NUMBER	0040	
EITHER_SHIFT . . . . . . . . . .  	NUMBER	0080	
ELSEF_COMMAND  . . . . . . . . .  	NUMBER	0020	
ELSEF_DONE . . . . . . . . . . .  	L NEAR	01B7	CODE
ELSEF_PROC . . . . . . . . . . .  	L NEAR	0189	CODE
ENABLE_BIT20 . . . . . . . . . .  	NUMBER	00DF	
ENABLE_FL  . . . . . . . . . . .  	V BYTE	0000		External
ENA_KBD  . . . . . . . . . . . .  	NUMBER	00AE	
ENDIFF_COMMAND . . . . . . . . .  	NUMBER	0030	
ENDIFF_DONE  . . . . . . . . . .  	L NEAR	01C8	CODE
ENDIFF_PROC  . . . . . . . . . .  	L NEAR	01BB	CODE
EOI  . . . . . . . . . . . . . .  	NUMBER	0020	
EQUIP_FLAG . . . . . . . . . . .  	L WORD	0010	DATA
ERROR_BEEP . . . . . . . . . . .  	L NEAR	0000		External
EXIT . . . . . . . . . . . . . .  	L NEAR	03CD	CODE
EXIT_IF_FOUND  . . . . . . . . .  	NUMBER	0080	
EXIT_INT_9_FLAG  . . . . . . . .  	NUMBER	0001	
EXIT_STATE_LOGIC_FLAG  . . . . .  	NUMBER	0002	
EXT_16 . . . . . . . . . . . . .  	NUMBER	8000	
EXT_KB_FLAG  . . . . . . . . . .  	L BYTE	0005	CODE
EXT_KB_FLAG_ID . . . . . . . . .  	NUMBER	0004	
EXT_PTR  . . . . . . . . . . . .  	L DWORD	007C	ABS0

F11_M  . . . . . . . . . . . . .  	NUMBER	0057	
F12_M  . . . . . . . . . . . . .  	NUMBER	0058	
Microsoft (R) Macro Assembler Version 5.10                  2/14/25 23:45:42
DOS KEYB Command  -  Interrupt 9 Non-US Support             Symbols-5


F1_SCAN  . . . . . . . . . . . .  	NUMBER	003B	
F2_SCAN  . . . . . . . . . . . .  	NUMBER	003C	
FATAL_ERROR  . . . . . . . . . .  	L NEAR	03CB	CODE
FILE_BUFFER  . . . . . . . . . .  	V WORD	0000		External
FILE_BUFFER_SIZE . . . . . . . .  	NUMBER	0000		Communal
FLAGS_TO_TEST  . . . . . . . . .  	L BYTE	0001	CODE
FLAG_ID_BITS . . . . . . . . . .  	NUMBER	0007	
FOUND_SF_ENTRY . . . . . . . . .  	L NEAR	039F	CODE
FOUND_TAB_2_ENTRY  . . . . . . .  	L NEAR	0266	CODE

GOTO_BIOS  . . . . . . . . . . .  	L NEAR	0145	CODE
GOTO_COMMAND . . . . . . . . . .  	NUMBER	0090	
GOTO_DONE  . . . . . . . . . . .  	L NEAR	0325	CODE
GOTO_LABEL . . . . . . . . . . .  	L NEAR	0318	CODE
GOTO_PROC  . . . . . . . . . . .  	L NEAR	02F3	CODE
GRAPH_ON . . . . . . . . . . . .  	NUMBER	0008	
G_KB . . . . . . . . . . . . . .  	NUMBER	1000	

HD12_SETTLE  . . . . . . . . . .  	NUMBER	000F	
HD320_SETTLE . . . . . . . . . .  	NUMBER	0014	
HDISK_INT  . . . . . . . . . . .  	L DWORD	01D8	ABS0
HD_ERROR . . . . . . . . . . . .  	L BYTE	0042	DATA
HD_FILE_TYPE . . . . . . . . . .  	NUMBER	0092	
HF1_TBL_VEC  . . . . . . . . . .  	L DWORD	0118	ABS0
HF_BOOT  . . . . . . . . . . . .  	NUMBER	0020	
HF_CNTRL . . . . . . . . . . . .  	L BYTE	008F	DATA
HF_ERROR . . . . . . . . . . . .  	L BYTE	008D	DATA
HF_FAIL  . . . . . . . . . . . .  	NUMBER	0008	
HF_INT_FLAG  . . . . . . . . . .  	L BYTE	008E	DATA
HF_NUM . . . . . . . . . . . . .  	L BYTE	0075	DATA
HF_STATUS  . . . . . . . . . . .  	L BYTE	008C	DATA
HF_TBL_VEC . . . . . . . . . . .  	L DWORD	0104	ABS0
HOLD_STATE . . . . . . . . . . .  	NUMBER	0008	
HOT_KEY_ACTIVE . . . . . . . . .  	L BYTE	0000	CODE

ID_1 . . . . . . . . . . . . . .  	NUMBER	00AB	
ID_2 . . . . . . . . . . . . . .  	NUMBER	0041	
ID_2A  . . . . . . . . . . . . .  	NUMBER	0054	
ID_PTR_SIZE  . . . . . . . . . .  	V WORD	0000		External
IFF_COMMAND  . . . . . . . . . .  	NUMBER	0000	
IFF_DONE . . . . . . . . . . . .  	L NEAR	0180	CODE
IFF_MATCH  . . . . . . . . . . .  	L NEAR	0177	CODE
IFF_NO_MATCH . . . . . . . . . .  	L NEAR	0170	CODE
IFF_PROC . . . . . . . . . . . .  	L NEAR	014B	CODE
IFKBD_COMMAND  . . . . . . . . .  	NUMBER	0080	
IFKBD_DONE . . . . . . . . . . .  	L NEAR	00FF	CODE
IFKBD_PROC . . . . . . . . . . .  	L NEAR	00DD	CODE
IFKBD_TEST_FAILED  . . . . . . .  	L NEAR	00EF	CODE
IFKBD_TEST_OK  . . . . . . . . .  	L NEAR	00F6	CODE
INFO_STATUS  . . . . . . . . . .  	NUMBER	00B3	
INH_KEYBOARD . . . . . . . . . .  	NUMBER	0010	
INIT_STATE_PROCESSING  . . . . .  	L NEAR	0059	CODE
INPT_BUF_FULL  . . . . . . . . .  	NUMBER	0002	
INS_KEY  . . . . . . . . . . . .  	NUMBER	0052	
Microsoft (R) Macro Assembler Version 5.10                  2/14/25 23:45:42
DOS KEYB Command  -  Interrupt 9 Non-US Support             Symbols-6


INS_SHIFT  . . . . . . . . . . .  	NUMBER	0080	
INS_STATE  . . . . . . . . . . .  	NUMBER	0080	
INT5_PTR . . . . . . . . . . . .  	L WORD	0014	ABS0
INTA00 . . . . . . . . . . . . .  	NUMBER	0020	
INTA01 . . . . . . . . . . . . .  	NUMBER	0021	
INTB00 . . . . . . . . . . . . .  	NUMBER	00A0	
INTB01 . . . . . . . . . . . . .  	NUMBER	00A1	
INTR_FACE_CK . . . . . . . . . .  	NUMBER	00AB	
INTR_FLAG  . . . . . . . . . . .  	L BYTE	006B	DATA
INT_2F_SUB_FUNC  . . . . . . . .  	NUMBER	00AD	
INT_ADDR . . . . . . . . . . . .  	L WORD	0020	ABS0
INT_FLAG . . . . . . . . . . . .  	NUMBER	0080	
INT_PTR  . . . . . . . . . . . .  	L DWORD	0020	ABS0
INT_TYPE . . . . . . . . . . . .  	NUMBER	0070	
INT_VIDEO  . . . . . . . . . . .  	NUMBER	0010	
INVALID_DRV  . . . . . . . . . .  	NUMBER	0002	
IN_ALT_STATE . . . . . . . . . .  	L NEAR	00A0	CODE
IN_CTL_STATE . . . . . . . . . .  	L NEAR	0084	CODE
IN_SHIFT_STATE . . . . . . . . .  	L NEAR	0068	CODE
IO_CHK . . . . . . . . . . . . .  	NUMBER	0040	
IO_ROM_INIT  . . . . . . . . . .  	L WORD	0067	DATA
IO_ROM_SEG . . . . . . . . . . .  	L WORD	0069	DATA
ITS_A_NOT  . . . . . . . . . . .  	L NEAR	016B	CODE

JR_HOT_KEY_1_2 . . . . . . . . .  	NUMBER	4000	
JR_KB  . . . . . . . . . . . . .  	NUMBER	8000	

K8 . . . . . . . . . . . . . . .  	V BYTE	0000		External
KBDINT . . . . . . . . . . . . .  	NUMBER	0002	
KBD_IN . . . . . . . . . . . . .  	NUMBER	0060	
KBX  . . . . . . . . . . . . . .  	NUMBER	0010	
KB_ACK . . . . . . . . . . . . .  	NUMBER	00FA	
KB_BREAK . . . . . . . . . . . .  	NUMBER	00F0	
KB_BUFFER  . . . . . . . . . . .  	L WORD	001E	DATA	Length = 0010
KB_BUFFER_END  . . . . . . . . .  	L WORD	003E	DATA
KB_CTL . . . . . . . . . . . . .  	NUMBER	0061	
KB_DATA  . . . . . . . . . . . .  	NUMBER	0060	
KB_ECHO  . . . . . . . . . . . .  	NUMBER	00FE	
KB_ENABLE  . . . . . . . . . . .  	NUMBER	00F4	
KB_ERR . . . . . . . . . . . . .  	NUMBER	0080	
KB_FA  . . . . . . . . . . . . .  	NUMBER	0010	
KB_FE  . . . . . . . . . . . . .  	NUMBER	0020	
KB_FLAG  . . . . . . . . . . . .  	L BYTE	0017	DATA
KB_FLAG_1  . . . . . . . . . . .  	L BYTE	0018	DATA
KB_FLAG_1_ID . . . . . . . . . .  	NUMBER	0001	
KB_FLAG_2  . . . . . . . . . . .  	L BYTE	0097	DATA
KB_FLAG_2_ID . . . . . . . . . .  	NUMBER	0002	
KB_FLAG_3  . . . . . . . . . . .  	L BYTE	0096	DATA
KB_FLAG_3_ID . . . . . . . . . .  	NUMBER	0003	
KB_FLAG_ID . . . . . . . . . . .  	NUMBER	0000	
KB_FLAG_PTRS . . . . . . . . . .  	L WORD	000B	CODE
KB_LEDS  . . . . . . . . . . . .  	NUMBER	0007	
KB_MAKE_BREAK  . . . . . . . . .  	NUMBER	00F7	
KB_MENU  . . . . . . . . . . . .  	NUMBER	00F1	
Microsoft (R) Macro Assembler Version 5.10                  2/14/25 23:45:42
DOS KEYB Command  -  Interrupt 9 Non-US Support             Symbols-7


KB_OK  . . . . . . . . . . . . .  	NUMBER	00AA	
KB_OVER_RUN  . . . . . . . . . .  	NUMBER	00FF	
KB_PR_LED  . . . . . . . . . . .  	NUMBER	0040	
KB_RESEND  . . . . . . . . . . .  	NUMBER	00FE	
KB_RESET . . . . . . . . . . . .  	NUMBER	00FF	
KB_SHADOW_FLAGS  . . . . . . . .  	L BYTE	0001	CODE	Length = 0004
KB_TYPA_RD . . . . . . . . . . .  	NUMBER	00F3	
KEYBCMD_LANG_ENTRY_PTR . . . . .  	V DWORD	0000		External
KEYBSYS_FILE_HANDLE  . . . . . .  	V WORD	0000		External
KEYB_COMMAND . . . . . . . . . .  	L NEAR	0000		External
KEYB_INT_2F  . . . . . . . . . .  	L NEAR	0000		External
KEYB_INT_9 . . . . . . . . . . .  	L NEAR	0000		External
KEYB_STATE_PROCESSOR . . . . . .  	N PROC	0039	CODE	Global	Length = 039F
KEY_BD_INHIB . . . . . . . . . .  	NUMBER	0080	
KEY_FAIL . . . . . . . . . . . .  	NUMBER	0080	
KEY_NUMS . . . . . . . . . . . .  	NUMBER	0000	
KYBD_CLK . . . . . . . . . . . .  	NUMBER	0001	
KYBD_CLK_DATA  . . . . . . . . .  	NUMBER	00E0	
KYBD_FAIL  . . . . . . . . . . .  	NUMBER	0020	
KYBD_INH . . . . . . . . . . . .  	NUMBER	0010	
KYCLK_FAIL . . . . . . . . . . .  	NUMBER	0008	
KY_LOCK  . . . . . . . . . . . .  	NUMBER	0000	
KY_SYS_FAIL  . . . . . . . . . .  	NUMBER	0010	

LANG_MODE  . . . . . . . . . . .  	NUMBER	00FF	
LANG_PTR_SIZE  . . . . . . . . .  	V WORD	0000		External
LASTRATE . . . . . . . . . . . .  	L BYTE	008B	DATA
LAST_DMA_PAGE  . . . . . . . . .  	NUMBER	008F	
LC_AB  . . . . . . . . . . . . .  	NUMBER	0040	
LC_E0  . . . . . . . . . . . . .  	NUMBER	0002	
LC_E1  . . . . . . . . . . . . .  	NUMBER	0001	
LED_CMD  . . . . . . . . . . . .  	NUMBER	00ED	
LEFT_KEY . . . . . . . . . . . .  	NUMBER	002A	
LEFT_SHIFT . . . . . . . . . . .  	NUMBER	0002	
LMCS_FAIL  . . . . . . . . . . .  	NUMBER	0004	
LOOP_POST  . . . . . . . . . . .  	NUMBER	0020	
LOWNIB . . . . . . . . . . . . .  	NUMBER	000F	
L_ALT_SHIFT  . . . . . . . . . .  	NUMBER	0002	
L_CTL_SHIFT  . . . . . . . . . .  	NUMBER	0001	

M12D12 . . . . . . . . . . . . .  	NUMBER	0015	
M1_SIZE_HI . . . . . . . . . . .  	NUMBER	0096	
M1_SIZE_LO . . . . . . . . . . .  	NUMBER	0095	
M2_SIZE_HI . . . . . . . . . . .  	NUMBER	0098	
M2_SIZE_LO . . . . . . . . . . .  	NUMBER	0097	
M326D12  . . . . . . . . . . . .  	NUMBER	0074	
M326D326 . . . . . . . . . . . .  	NUMBER	0093	
M640K  . . . . . . . . . . . . .  	NUMBER	0080	
MAX_DRV  . . . . . . . . . . . .  	NUMBER	0002	
MAX_PERIOD . . . . . . . . . . .  	NUMBER	0540	
MC_E0  . . . . . . . . . . . . .  	NUMBER	00E0	
MC_E1  . . . . . . . . . . . . .  	NUMBER	00E1	
MEDIA_CHANGE . . . . . . . . . .  	NUMBER	0006	
MEMORY_SIZE  . . . . . . . . . .  	L WORD	0013	DATA
Microsoft (R) Macro Assembler Version 5.10                  2/14/25 23:45:42
DOS KEYB Command  -  Interrupt 9 Non-US Support             Symbols-8


MEM_FAIL . . . . . . . . . . . .  	NUMBER	0001	
MFG_ERR_FLAG . . . . . . . . . .  	L BYTE	0015	DATA
MFG_JMP  . . . . . . . . . . . .  	NUMBER	0020	
MFG_PORT . . . . . . . . . . . .  	NUMBER	0080	
MFG_TEST_RTN . . . . . . . . . .  	L FAR 	0500	ABS0
MFG_TST  . . . . . . . . . . . .  	L BYTE	0012	DATA
MIN_PERIOD . . . . . . . . . . .  	NUMBER	0410	
MOTOR_COUNT  . . . . . . . . . .  	L BYTE	0040	DATA
MOTOR_MSK  . . . . . . . . . . .  	NUMBER	00F0	
MOTOR_STATUS . . . . . . . . . .  	L BYTE	003F	DATA
MOTOR_WAIT . . . . . . . . . . .  	NUMBER	0025	
MOVE_NEXT_FLAG . . . . . . . . .  	L NEAR	00AE	CODE
MYBUFF . . . . . . . . . . . . .  	V BYTE	0000		External
M_SIZE_HI  . . . . . . . . . . .  	NUMBER	00B1	
M_SIZE_LO  . . . . . . . . . . .  	NUMBER	00B0	

NEC_STATUS . . . . . . . . . . .  	L BYTE	0042	DATA	Length = 0007
NEST_LEVEL . . . . . . . . . . .  	L BYTE	0015	CODE
NEW_BUFF_CTR . . . . . . . . . .  	V BYTE	0000		External
NEW_INST . . . . . . . . . . . .  	NUMBER	0040	
NEXT_COMMAND . . . . . . . . . .  	L NEAR	00CA	CODE
NEXT_SF_ENTRY  . . . . . . . . .  	L NEAR	0394	CODE
NEXT_TAB_2_ENTRY . . . . . . . .  	L NEAR	0256	CODE
NEXT_XLAT_TAB  . . . . . . . . .  	L NEAR	022B	CODE
NLS_FLAG_1 . . . . . . . . . . .  	L BYTE	0006	CODE
NLS_FLAG_1_ID  . . . . . . . . .  	NUMBER	0005	
NLS_FLAG_2 . . . . . . . . . . .  	L BYTE	0007	CODE
NLS_FLAG_2_ID  . . . . . . . . .  	NUMBER	0006	
NMI_PTR  . . . . . . . . . . . .  	L WORD	0008	ABS0
NO . . . . . . . . . . . . . . .  	NUMBER	0000	
NOCHGLN  . . . . . . . . . . . .  	NUMBER	0001	
NOT_EXIT_INT_9 . . . . . . . . .  	L NEAR	030D	CODE
NOT_EXIT_S_L . . . . . . . . . .  	L NEAR	0315	CODE
NOT_TEST . . . . . . . . . . . .  	NUMBER	0008	
NOT_THIS_ELSEF . . . . . . . . .  	L NEAR	01B3	CODE
NO_ZERO_SCAN . . . . . . . . . .  	L NEAR	02A1	CODE
NULL_ASCII_CODE  . . . . . . . .  	NUMBER	-0001	
NUM_BIOS_FLAGS . . . . . . . . .  	NUMBER	0004	
NUM_COMMANDS . . . . . . . . . .  	NUMBER	000C	
NUM_CP . . . . . . . . . . . . .  	V WORD	0000		External
NUM_DESIG_CP . . . . . . . . . .  	V WORD	0000		External
NUM_FLAGS  . . . . . . . . . . .  	NUMBER	0007	
NUM_ID . . . . . . . . . . . . .  	V WORD	0000		External
NUM_KEY  . . . . . . . . . . . .  	NUMBER	0045	
NUM_LANG . . . . . . . . . . . .  	V WORD	0000		External
NUM_NLS_FLAGS  . . . . . . . . .  	NUMBER	0002	
NUM_SHIFT  . . . . . . . . . . .  	NUMBER	0020	
NUM_STATE  . . . . . . . . . . .  	NUMBER	0020	

ONE  . . . . . . . . . . . . . .  	NUMBER	0001	
ONE_SCAN . . . . . . . . . . . .  	NUMBER	0002	
OPTION_BYTE  . . . . . . . . . .  	L BYTE	000A	CODE
OPTION_COMMAND . . . . . . . . .  	NUMBER	0050	
OPTION_PROC  . . . . . . . . . .  	L NEAR	02A7	CODE
Microsoft (R) Macro Assembler Version 5.10                  2/14/25 23:45:42
DOS KEYB Command  -  Interrupt 9 Non-US Support             Symbols-9


ORG_VECTOR . . . . . . . . . . .  	L DWORD	004C	ABS0
OUT_BUF_FULL . . . . . . . . . .  	NUMBER	0001	

P12_KB . . . . . . . . . . . . .  	NUMBER	0400	
PARITY_ERR . . . . . . . . . . .  	NUMBER	00C0	
PARITY_EVEN  . . . . . . . . . .  	NUMBER	0080	
PARM_PTR . . . . . . . . . . . .  	L DWORD	0074	ABS0
PC_386 . . . . . . . . . . . . .  	NUMBER	0200	
PC_AT  . . . . . . . . . . . . .  	NUMBER	4000	
PC_JR  . . . . . . . . . . . . .  	NUMBER	0800	
PC_LAP . . . . . . . . . . . . .  	NUMBER	2000	
PC_NET . . . . . . . . . . . . .  	NUMBER	0100	
PC_PAL . . . . . . . . . . . . .  	NUMBER	0400	
PC_XT  . . . . . . . . . . . . .  	NUMBER	1000	
PE_EXIT  . . . . . . . . . . . .  	L NEAR	0144	CODE
PE_NEXT_STATE  . . . . . . . . .  	L NEAR	012F	CODE
PE_STATE_MATCH . . . . . . . . .  	L NEAR	013D	CODE
POA_DUAL . . . . . . . . . . . .  	NUMBER	0061	
POA_START  . . . . . . . . . . .  	NUMBER	0080	
PORT_A . . . . . . . . . . . . .  	NUMBER	0060	
PORT_B . . . . . . . . . . . . .  	NUMBER	0061	
PORT_OFF . . . . . . . . . . . .  	L BYTE	0077	DATA
POST_SP  . . . . . . . . . . . .  	NUMBER	8000	
POST_SS  . . . . . . . . . . . .  	NUMBER	0000	
PRINTER_BASE . . . . . . . . . .  	L WORD	0008	DATA	Length = 0004
PRINT_TIM_OUT  . . . . . . . . .  	L BYTE	0078	DATA	Length = 0004
PROCESS_LEVEL  . . . . . . . . .  	L BYTE	0016	CODE
PROCESS_STATES . . . . . . . . .  	L NEAR	00BE	CODE
PROCESS_XLAT_TAB . . . . . . . .  	L NEAR	0236	CODE
PRO_FAIL . . . . . . . . . . . .  	NUMBER	0002	
PRTY_CHK . . . . . . . . . . . .  	NUMBER	0080	
PUT_ERROR  . . . . . . . . . . .  	N PROC	012B	CODE	Length = 001A
PUT_ERROR_COMMAND  . . . . . . .  	NUMBER	0070	
PUT_ERROR_DONE . . . . . . . . .  	L NEAR	0127	CODE
PUT_ERROR_PROC . . . . . . . . .  	L NEAR	0108	CODE
P_KB . . . . . . . . . . . . . .  	NUMBER	0800	

QUIET_SEEK . . . . . . . . . . .  	NUMBER	000A	

RAM_PAR_OFF  . . . . . . . . . .  	NUMBER	000C	
RAM_PAR_ON . . . . . . . . . . .  	NUMBER	00F3	
RCV_TMOUT  . . . . . . . . . . .  	NUMBER	0040	
RD_ID  . . . . . . . . . . . . .  	NUMBER	0080	
READ_8042_INPUT  . . . . . . . .  	NUMBER	00C0	
READ_8042_RAM  . . . . . . . . .  	NUMBER	0020	
RECORD_NOT_FND . . . . . . . . .  	NUMBER	0004	
REFRESH_BIT  . . . . . . . . . .  	NUMBER	0010	
REGEN  . . . . . . . . . . . . .  	L BYTE	0000	VIDEO_RAM
REGENW . . . . . . . . . . . . .  	L WORD	0000	VIDEO_RAM
RESET_FLAG . . . . . . . . . . .  	L WORD	0072	DATA
RESET_NLS_COMMAND  . . . . . . .  	NUMBER	00B0	
RESET_NLS_PROC . . . . . . . . .  	L NEAR	02CA	CODE
REV_STATE  . . . . . . . . . . .  	NUMBER	00F8	
RIGHT_KEY  . . . . . . . . . . .  	NUMBER	0036	
Microsoft (R) Macro Assembler Version 5.10                  2/14/25 23:45:42
DOS KEYB Command  -  Interrupt 9 Non-US Support             Symbols-10


RIGHT_SHIFT  . . . . . . . . . .  	NUMBER	0001	
RN_DONE  . . . . . . . . . . . .  	L NEAR	02DD	CODE
RS232_BASE . . . . . . . . . . .  	L WORD	0000	DATA	Length = 0004
RS232_TIM_OUT  . . . . . . . . .  	L BYTE	007C	DATA	Length = 0004
RTC_HIGH . . . . . . . . . . . .  	L WORD	009E	DATA
RTC_INT_VEC  . . . . . . . . . .  	L DWORD	01C0	ABS0
RTC_LOW  . . . . . . . . . . . .  	L WORD	009C	DATA
RTC_WAIT_FLAG  . . . . . . . . .  	L BYTE	00A0	DATA
R_ALT_SHIFT  . . . . . . . . . .  	NUMBER	0008	
R_CTL_SHIFT  . . . . . . . . . .  	NUMBER	0004	

SAVED_NLS_FLAGS  . . . . . . . .  	L BYTE	0008	CODE
SCAN_CODE  . . . . . . . . . . .  	V BYTE	0000		External
SCAN_MATCH . . . . . . . . . . .  	NUMBER	0008	
SCROLL_KEY . . . . . . . . . . .  	NUMBER	0046	
SCROLL_SHIFT . . . . . . . . . .  	NUMBER	0010	
SCROLL_STATE . . . . . . . . . .  	NUMBER	0010	
SD . . . . . . . . . . . . . . .  	ALIAS	 SHARED_DATA		
SD_DEST_PTR  . . . . . . . . . .  	V BYTE	0000		External
SD_SOURCE_PTR  . . . . . . . . .  	V BYTE	0000		External
SEEK_STATUS  . . . . . . . . . .  	L BYTE	003E	DATA
SELF_8042_TEST . . . . . . . . .  	NUMBER	00AA	
SENSE_DRV_ST . . . . . . . . . .  	NUMBER	0004	
SET_FLAG_COMMAND . . . . . . . .  	NUMBER	0060	
SET_FLAG_PROC  . . . . . . . . .  	L NEAR	035E	CODE
SET_NUM_LK . . . . . . . . . . .  	NUMBER	0020	
SF_DONE  . . . . . . . . . . . .  	L NEAR	03C6	CODE
SF_ENT_SZ  . . . . . . . . . . .  	NUMBER	0003	
SF_NEXT_STATE  . . . . . . . . .  	L NEAR	0371	CODE
SF_RESTORE . . . . . . . . . . .  	L NEAR	03C5	CODE
SF_STATE_MATCH . . . . . . . . .  	L NEAR	037F	CODE
SHARED_AREA_PTR  . . . . . . . .  	V DWORD	0000		External
SHARED_DATA  . . . . . . . . . .  	V BYTE	0000		External
SHUT_CMD . . . . . . . . . . . .  	NUMBER	00FE	
SHUT_DOWN  . . . . . . . . . . .  	NUMBER	008F	
SLAVE_INT_PTR  . . . . . . . . .  	L DWORD	01C0	ABS0
STATE_LOGIC_OFFSET . . . . . . .  	V DWORD	0000		External
STATE_MSK  . . . . . . . . . . .  	NUMBER	0007	
STATUS_BYTE  . . . . . . . . . .  	L BYTE	0000	XXDATA
STATUS_PORT  . . . . . . . . . .  	NUMBER	0064	
STG_LOC0 . . . . . . . . . . . .  	L BYTE	0000	ABS0
SUB_CMD_BITS . . . . . . . . . .  	NUMBER	000F	
SYS_CODE_PAGE  . . . . . . . . .  	V WORD	0000		External
SYS_FLAG . . . . . . . . . . . .  	NUMBER	0004	
SYS_KEY  . . . . . . . . . . . .  	NUMBER	0054	
SYS_SHIFT  . . . . . . . . . . .  	NUMBER	0004	

TAKE_ELSE  . . . . . . . . . . .  	L BYTE	0017	CODE
TB_RETURN_CODE . . . . . . . . .  	V WORD	0000		External
TEMP_HEAD  . . . . . . . . . . .  	V WORD	0000		External
TEMP_SHARED_DATA . . . . . . . .  	V BYTE	0000		External
TEMP_STACK_HI  . . . . . . . . .  	NUMBER	0000	
TEMP_STACK_LO  . . . . . . . . .  	NUMBER	FFFF	
TEMP_TAIL  . . . . . . . . . . .  	V WORD	0000		External
Microsoft (R) Macro Assembler Version 5.10                  2/14/25 23:45:42
DOS KEYB Command  -  Interrupt 9 Non-US Support             Symbols-11


TEST_ALT . . . . . . . . . . . .  	L NEAR	0089	CODE
TEST_CTL . . . . . . . . . . . .  	L NEAR	006D	CODE
TIMER  . . . . . . . . . . . . .  	NUMBER	0040	
TIMER0 . . . . . . . . . . . . .  	NUMBER	0040	
TIMER_HIGH . . . . . . . . . . .  	L WORD	006E	DATA
TIMER_LOW  . . . . . . . . . . .  	L WORD	006C	DATA
TIMER_OFL  . . . . . . . . . . .  	L BYTE	0070	DATA
TIME_OUT . . . . . . . . . . . .  	NUMBER	0080	
TIM_CTL  . . . . . . . . . . . .  	NUMBER	0043	
TMINT  . . . . . . . . . . . . .  	NUMBER	0001	
TOS  . . . . . . . . . . . . . .  	L WORD	0100	STACK
TP_DONE  . . . . . . . . . . . .  	L NEAR	0229	CODE
TP_EXIT  . . . . . . . . . . . .  	L NEAR	022A	CODE
TP_NEXT_STATE  . . . . . . . . .  	L NEAR	0209	CODE
TP_STATE_MATCH . . . . . . . . .  	L NEAR	0217	CODE
TRANSLATE  . . . . . . . . . . .  	N PROC	0205	CODE	Length = 00A2
TRANS_TMOUT  . . . . . . . . . .  	NUMBER	0020	
TRAN_MSK . . . . . . . . . . . .  	NUMBER	0003	
TRK_80 . . . . . . . . . . . . .  	NUMBER	0008	
TRK_SLAP . . . . . . . . . . . .  	NUMBER	0030	
TSD  . . . . . . . . . . . . . .  	ALIAS	 TEMP_SHARED_DATA		
TTEST  . . . . . . . . . . . . .  	NUMBER	0000	
TWO_BYTE_LOOKUP  . . . . . . . .  	L NEAR	0291	CODE
TWO_SCAN . . . . . . . . . . . .  	NUMBER	0003	
TYPEWRITER_CAPS_LK . . . . . . .  	NUMBER	8000	
TYPE_1_LOOKUP  . . . . . . . . .  	L NEAR	0275	CODE
TYPE_2_SEARCH  . . . . . . . . .  	L NEAR	0246	CODE
TYPE_2_TAB . . . . . . . . . . .  	NUMBER	0040	

UNKNOWN_COMMAND  . . . . . . . .  	L NEAR	00DA	CODE
USER_FLAG  . . . . . . . . . . .  	L WORD	0098	DATA
USER_FLAG_SEG  . . . . . . . . .  	L WORD	009A	DATA
US_MODE  . . . . . . . . . . . .  	NUMBER	0000	

VIDEO_INT  . . . . . . . . . . .  	L WORD	0040	ABS0

WE_HAVE_A_TABLE  . . . . . . . .  	L NEAR	0044	CODE
WRITE_8042_RAM . . . . . . . . .  	NUMBER	0060	
WRITE_OP . . . . . . . . . . . .  	NUMBER	0080	
WRITE_PROTECT  . . . . . . . . .  	NUMBER	0003	
W_MEM_SIZE . . . . . . . . . . .  	NUMBER	0010	

X287 . . . . . . . . . . . . . .  	NUMBER	00F0	
XLATT_COMMAND  . . . . . . . . .  	NUMBER	0040	
XLATT_DONE . . . . . . . . . . .  	L NEAR	0200	CODE
XLATT_FOUND  . . . . . . . . . .  	L NEAR	01F1	CODE
XLATT_PROC . . . . . . . . . . .  	L NEAR	01D0	CODE
XLAT_TAB_PTR . . . . . . . . . .  	L WORD	0013	CODE
XRATE  . . . . . . . . . . . . .  	NUMBER	0002	
XT_KB  . . . . . . . . . . . . .  	NUMBER	4000	

YES  . . . . . . . . . . . . . .  	NUMBER	0001	

ZERO_SCAN  . . . . . . . . . . .  	NUMBER	0020	
Microsoft (R) Macro Assembler Version 5.10                  2/14/25 23:45:42
DOS KEYB Command  -  Interrupt 9 Non-US Support             Symbols-12



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


   1629 Source  Lines
   1629 Total   Lines
    559 Symbols

  45730 + 190024 Bytes symbol space free

      0 Warning Errors
      0 Severe  Errors
