Microsoft (R) Macro Assembler Version 5.10                  2/14/25 23:45:42
DOS - KEYB Command  -  Interrupt 48H Handler                Page     1-1


				
				
				        PAGE    ,132
				        TITLE   DOS - KEYB Command  -  Interrupt 48H Handler
				
				;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
				;; DOS - NLS Support - KEYB Command
				;; (C) Copyright 1988 Microsoft
				;;
				;; File Name:  KEYBI48.ASM
				;; ----------
				;;
				;; Description:
				;; ------------
				;;       Contains Interrupt 48H handler.
				;;
				;; Documentation Reference:
				;; ------------------------
				;;       PC DOS 3.3 Detailed Design Document - May ?? 1986
				;;
				;; Procedures Contained in This File:
				;; ----------------------------------
				;;
				;; Include Files Required:
				;; -----------------------
				;;       INCLUDE KEYBEQU.INC
				;;       INCLUDE KEYBSHAR.INC
				;;       INCLUDE KEYBMAC.INC
				;;       INCLUDE KEYBCMD.INC
				;;       INCLUDE KEYBCPSD.INC
				;;       INCLUDE POSTEQU.inc
				;;       INCLUDE DSEG.inc
				;;
				;; External Procedure References:
				;; ------------------------------
				;;       FROM FILE  ????????.ASM:
				;;            procedure - description????????????????????????????????
				;;
				;; Linkage Information:  Refer to file KEYB.ASM
				;; --------------------
				;;
				;; Change History:
				;; ---------------
				;;
				;;
				;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
				                                       ;;
				        INCLUDE KEYBEQU.INC            ;;
			     C	.LIST
				        INCLUDE KEYBSHAR.INC           ;;
			     C	.LIST
				        INCLUDE KEYBMAC.INC            ;;
			     C	.LIST
				        INCLUDE KEYBCMD.INC            ;;
Microsoft (R) Macro Assembler Version 5.10                  2/14/25 23:45:42
DOS - KEYB Command  -  Interrupt 48H Handler                Page     1-2


			     C	.LIST
			     C	
			     C	
				        INCLUDE KEYBCPSD.INC           ;;
			     C	.LIST
			     C	
				        INCLUDE POSTEQU.inc            ;;
			     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)
			     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)
Microsoft (R) Macro Assembler Version 5.10                  2/14/25 23:45:42
DOS - KEYB Command  -  Interrupt 48H Handler                Page     1-3


 = 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)
 = 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 48H Handler                Page     1-4


			     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 48H Handler                Page     1-5


 = 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 48H Handler                Page     1-6


 = 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 48H Handler                Page     1-7


			     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 48H Handler                Page     1-8


			     C	PAGE
				        INCLUDE DSEG.inc               ;;
			     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
 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 48H Handler                Page     1-9


			     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 48H Handler                Page     1-10


			     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 48H Handler                Page     1-11


	   ??                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 48H Handler                Page     1-12


			     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 48H Handler                Page     1-13


			     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 48H Handler                Page     1-14


			     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 48H Handler                Page     1-15


			     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 48H Handler                Page     1-16


			     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 48H Handler                Page     1-17


			     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
				                                       ;;
				        PUBLIC KEYB_INT_48             ;;
				                                       ;;
				        EXTRN  ERROR_BEEP:NEAR         ;;
				                                       ;;
 0000				CODE    SEGMENT PUBLIC 'CODE'          ;;
				                                       ;;
				        ASSUME  CS:CODE,DS:CODE,ES:DATA;;
Microsoft (R) Macro Assembler Version 5.10                  2/14/25 23:45:42
DOS - KEYB Command  -  Interrupt 48H Handler                Page     1-18


				                                       ;;
				;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
				;;
				;; Module: KEYB_INT_48
				;;
				;; Description:
				;;
				;; Input Registers:
				;;     AL := Scan Code
				;;
				;; Output Registers:
				;;     N/A
				;;
				;; Logic:
				;;    IF scan code is not a break code THEN
				;;       IF CNTL was not entered THEN
				;;          IF ALT+SHIFT was pressed THEN
				;;             Set JB_KB_FLAG in SHARED_DATA_AREA
				;;             Clear ALT and SHIFT states in KB_FLAG
				;;    IRET or JMP to a chained INT48 routine
				;;
				;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
				                                       ;;
				;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
				;;   Program Code
				;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
				                                       ;;
 0000				KEYB_INT_48   PROC                     ;;
				                                       ;;
 0000  FB			        STI                            ;; allow NON-KB interrupts
 0001  53			        PUSH   BX                      ;;
 0002  55			        PUSH   BP                      ;;
 0003  51			        PUSH   CX                      ;;
 0004  52			        PUSH   DX                      ;;
 0005  57			        PUSH   DI                      ;;
 0006  56			        PUSH   SI                      ;;
 0007  1E			        PUSH   DS                      ;;
 0008  06			        PUSH   ES                      ;;
 0009  50			        PUSH   AX                      ;;
				                                       ;;
 000A  C6 06 0011 E 00 90	        MOV     SD.JR_KB_FLAG,0        ;; Clear the flag
				                                       ;;
 0010  3C 80			        CMP     AL,80H                 ;; Test for break code
 0012  77 33			        JA      INT48_EXIT             ;; IF not a break code THEN
				                                       ;;
 0014  1E			        PUSH    DS                     ;; Save segment registers
 0015  06			        PUSH    ES                     ;;
				                                       ;;
 0016  0E			        PUSH    CS                     ;; Set up addressing
 0017  1F			        POP     DS                     ;;  for DATA SEGMENT (=CODE SEGMENT)
 0018  BB ---- R		        MOV     BX,DATA                ;; Set up addressing
 001B  8E C3			        MOV     ES,BX                  ;;  for EXTRA SEGMENT (=BIOS RAM AREA)
				                                       ;;
 001D  26: 8A 26 0017 R		        MOV     AH,KB_FLAG             ;; Get the flag status
Microsoft (R) Macro Assembler Version 5.10                  2/14/25 23:45:42
DOS - KEYB Command  -  Interrupt 48H Handler                Page     1-19


 0022  80 E4 0F			        AND     AH,0FH                 ;; Clear all shift states
				                                       ;;
 0025  F6 C4 04			        TEST    AH,CTL_SHIFT           ;; Test if CNTL was entered?
 0028  75 1B			        JNE     INT48_PASS             ;;;;;;;;;;;;;;;; IF yes THEN
				                                                     ;;     pass to ROM INT48
 002A  80 E4 0B			        AND     AH,ALT_SHIFT+RIGHT_SHIFT+LEFT_SHIFT  ;; Test if both ALT and
 002D  80 FC 08			        CMP     AH,ALT_SHIFT                         ;;     SHIFT were pressed
 0030  76 13			        JBE     INT48_PASS                           ;; IF no THEN
				                                                     ;;     pass to ROM INT48
 0032  26: 8A 3E 0017 R		        MOV     BH,KB_FLAG                           ;;;;;;;;;;;; IF yes then
 0037  88 3E 0011 E		        MOV     SD.JR_KB_FLAG,BH                               ;;  Setup JR flag
 003B  80 26 0011 E 0B		        AND     SD.JR_KB_FLAG,ALT_SHIFT+RIGHT_SHIFT+LEFT_SHIFT ;; Pass flags
				                                                               ;;   (ALT and
				                                       ;;;;;;;;;;;;;;;;;;;;;;;;;; EITHER/BOTH SHIFT)
 0040  26: 30 26 0017 R		        XOR     KB_FLAG,AH             ;; Clear the ALT state and SHIFT state
				                                       ;; Reset the KB_FLAG to permit
				                                       ;;    third shifts to go through
 0045				INT48_PASS:                            ;;
 0045  07			        POP     ES                     ;;
 0046  1F			        POP     DS                     ;;
				                                       ;;;;;;;
 0047				INT48_EXIT:                                 ;;
 0047  2E: 83 3E 0008 E 00	        CMP   WORD PTR CS:SD.OLD_INT_48,0   ;; Q..are we the last in the chain?
 004D  75 12			        JNE   INT_48_JMP                    ;; N..call next in chain
 004F  2E: 83 3E 000A E 00	        CMP   WORD PTR CS:SD.OLD_INT_48+2,0 ;; Q..are we the last in the chain?
 0055  75 0A			        JNE   INT_48_JMP                    ;; N..call next in chain
				                                       ;;;;;;;
 0057  58			        POP    AX                      ;; restore regs
 0058  07			        POP    ES                      ;;
 0059  1F			        POP    DS                      ;;
 005A  5E			        POP    SI                      ;;
 005B  5F			        POP    DI                      ;;
 005C  5A			        POP    DX                      ;;
 005D  59			        POP    CX                      ;;
 005E  5D			        POP    BP                      ;;
 005F  5B			        POP    BX                      ;;
				                                       ;;
 0060  CF			        IRET                           ;; Y..return to caller
				                                       ;;
 0061				INT_48_JMP:                            ;;
				                                       ;;
 0061  58			        POP    AX                      ;; restore regs
 0062  07			        POP    ES                      ;;
 0063  1F			        POP    DS                      ;;
 0064  5E			        POP    SI                      ;;
 0065  5F			        POP    DI                      ;;
 0066  5A			        POP    DX                      ;;
 0067  59			        POP    CX                      ;;
 0068  5D			        POP    BP                      ;;
 0069  5B			        POP    BX                      ;;
				                                       ;;
 006A  2E: FF 2E 0008 E		        JMP   CS:SD.OLD_INT_48         ;;
				                                       ;;
 006F				KEYB_INT_48   ENDP                     ;;
Microsoft (R) Macro Assembler Version 5.10                  2/14/25 23:45:42
DOS - KEYB Command  -  Interrupt 48H Handler                Page     1-20


				;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
				
 006F				CODE   ENDS
				       END

Microsoft (R) Macro Assembler Version 5.10                  2/14/25 23:45:42
DOS - KEYB Command  -  Interrupt 48H Handler                Symbols-1


Macros:

		N a m e			Lines

ANDF . . . . . . . . . . . . . .  	  24
BEEP . . . . . . . . . . . . . .  	   1
CHECK_FOR_CORE_KEY . . . . . . .  	   1
ELSEF  . . . . . . . . . . . . .  	   1
ENDIFF . . . . . . . . . . . . .  	   1
EXIT_INT_9 . . . . . . . . . . .  	   2
EXIT_STATE_LOGIC . . . . . . . .  	   2
FIND_FLAG  . . . . . . . . . . .  	  77
FLAG . . . . . . . . . . . . . .  	   9
GOTO . . . . . . . . . . . . . .  	   2
IFF  . . . . . . . . . . . . . .  	  24
IFKBD  . . . . . . . . . . . . .  	   2
OPTION . . . . . . . . . . . . .  	  17
PUT_ERROR_CHAR . . . . . . . . .  	   2
RESET_NLS  . . . . . . . . . . .  	   1
SET_FLAG . . . . . . . . . . . .  	   2
XLATT  . . . . . . . . . . . . .  	   2

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
Microsoft (R) Macro Assembler Version 5.10                  2/14/25 23:45:42
DOS - KEYB Command  -  Interrupt 48H Handler                Symbols-2


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
  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 . . . . . . . . . . . . . .  	006F	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
ACUTE  . . . . . . . . . . . . .  	NUMBER	0080	
ACUTE_ACUTE  . . . . . . . . . .  	NUMBER	0019	
ACUTE_LOWER  . . . . . . . . . .  	NUMBER	0008	
ACUTE_SPACE  . . . . . . . . . .  	NUMBER	000A	
ACUTE_UPPER  . . . . . . . . . .  	NUMBER	0009	
ADDR_6845  . . . . . . . . . . .  	L WORD	0063	DATA
ALPHA_LOWER  . . . . . . . . . .  	NUMBER	0003	
ALPHA_UPPER  . . . . . . . . . .  	NUMBER	0004	
ALT_CASE . . . . . . . . . . . .  	NUMBER	0022	
ALT_INPUT  . . . . . . . . . . .  	L BYTE	0019	DATA
ALT_KEY  . . . . . . . . . . . .  	NUMBER	0038	
ALT_SHIFT  . . . . . . . . . . .  	NUMBER	0008	
Microsoft (R) Macro Assembler Version 5.10                  2/14/25 23:45:42
DOS - KEYB Command  -  Interrupt 48H Handler                Symbols-3


ANDF_COMMAND . . . . . . . . . .  	NUMBER	0010	
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	
BIOS_BREAK . . . . . . . . . . .  	L BYTE	0071	DATA
BOOT_LOCN  . . . . . . . . . . .  	L FAR 	7C00	ABS0
BOOT_VEC . . . . . . . . . . . .  	L DWORD	0064	ABS0
BOOT_VECTOR  . . . . . . . . . .  	L DWORD	0064	ABS0
BUFFER_END . . . . . . . . . . .  	L WORD	0082	DATA
BUFFER_HEAD  . . . . . . . . . .  	L WORD	001A	DATA
BUFFER_START . . . . . . . . . .  	L WORD	0080	DATA
BUFFER_TAIL  . . . . . . . . . .  	L WORD	001C	DATA

CADR_PRT . . . . . . . . . . . .  	NUMBER	0070	
CAPS_KEY . . . . . . . . . . . .  	NUMBER	003A	
CAPS_SHIFT . . . . . . . . . . .  	NUMBER	0040	
CAPS_STATE . . . . . . . . . . .  	NUMBER	0040	
CDATA_PRT  . . . . . . . . . . .  	NUMBER	0071	
CEDILLA  . . . . . . . . . . . .  	NUMBER	0008	
CEDILLA_CEDILLA  . . . . . . . .  	NUMBER	0017	
CEDILLA_LOWER  . . . . . . . . .  	NUMBER	0014	
CEDILLA_SPACE  . . . . . . . . .  	NUMBER	0016	
CEDILLA_UPPER  . . . . . . . . .  	NUMBER	0015	
CHECK_CORE_COMMAND . . . . . . .  	NUMBER	00C0	
CHGLN  . . . . . . . . . . . . .  	NUMBER	0002	
CIRCUMFLEX . . . . . . . . . . .  	NUMBER	0010	
CIRCUMFLEX_CIRCUMFLEX  . . . . .  	NUMBER	001C	
CIRCUMFLEX_LOWER . . . . . . . .  	NUMBER	0011	
CIRCUMFLEX_SPACE . . . . . . . .  	NUMBER	0013	
CIRCUMFLEX_UPPER . . . . . . . .  	NUMBER	0012	
CIRCUS_SYSTEM  . . . . . . . . .  	NUMBER	0008	
CLK_UP . . . . . . . . . . . . .  	NUMBER	008A	
CMD_BLOCK  . . . . . . . . . . .  	L BYTE	0042	DATA
CMD_DATA . . . . . . . . . . . .  	NUMBER	0008	
CMOSDSB_ADDR . . . . . . . . . .  	NUMBER	000E	
CMOSDSK_BYTE . . . . . . . . . .  	NUMBER	0010	
CMOS_ALARM . . . . . . . . . . .  	NUMBER	008B	
CMOS_BEGIN . . . . . . . . . . .  	NUMBER	0090	
CMOS_CLK_FAIL  . . . . . . . . .  	NUMBER	0004	
Microsoft (R) Macro Assembler Version 5.10                  2/14/25 23:45:42
DOS - KEYB Command  -  Interrupt 48H Handler                Symbols-4


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_SD_AREA . . . . . . . . . .  	L NEAR	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	
CTRL_CASE  . . . . . . . . . . .  	NUMBER	0023	
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
DD_MASK  . . . . . . . . . . . .  	NUMBER	0010	
DEAD_FOURTH  . . . . . . . . . .  	NUMBER	001E	
DEAD_LOWER . . . . . . . . . . .  	NUMBER	0001	
DEAD_THIRD . . . . . . . . . . .  	NUMBER	0018	
DEAD_UPPER . . . . . . . . . . .  	NUMBER	0002	
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	
DIARESIS . . . . . . . . . . . .  	NUMBER	0020	
DIARESIS_DIARESIS  . . . . . . .  	NUMBER	001B	
DIARESIS_LOWER . . . . . . . . .  	NUMBER	000E	
DIARESIS_SPACE . . . . . . . . .  	NUMBER	0010	
DIARESIS_UPPER . . . . . . . . .  	NUMBER	000F	
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	
DIVIDE_SIGN  . . . . . . . . . .  	NUMBER	0025	
DMA  . . . . . . . . . . . . . .  	NUMBER	0000	
DMA08  . . . . . . . . . . . . .  	NUMBER	0008	
DMA1 . . . . . . . . . . . . . .  	NUMBER	00C0	
DMA18  . . . . . . . . . . . . .  	NUMBER	00D0	
DMA_BOUNDARY . . . . . . . . . .  	NUMBER	0009	
DMA_PAGE . . . . . . . . . . . .  	NUMBER	0081	
DOUBLE_STEP  . . . . . . . . . .  	NUMBER	0020	
Microsoft (R) Macro Assembler Version 5.10                  2/14/25 23:45:42
DOS - KEYB Command  -  Interrupt 48H Handler                Symbols-5


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	
ENABLE_BIT20 . . . . . . . . . .  	NUMBER	00DF	
ENA_KBD  . . . . . . . . . . . .  	NUMBER	00AE	
ENDIFF_COMMAND . . . . . . . . .  	NUMBER	0030	
EOI  . . . . . . . . . . . . . .  	NUMBER	0020	
EQUIP_FLAG . . . . . . . . . . .  	L WORD	0010	DATA
ERROR_BEEP . . . . . . . . . . .  	L NEAR	0000		External
EXIT_IF_FOUND  . . . . . . . . .  	NUMBER	0080	
EXIT_INT_9_FLAG  . . . . . . . .  	NUMBER	0001	
EXIT_STATE_LOGIC_FLAG  . . . . .  	NUMBER	0002	
EXT_16 . . . . . . . . . . . . .  	NUMBER	8000	
EXT_KB_FLAG_ID . . . . . . . . .  	NUMBER	0004	
EXT_PTR  . . . . . . . . . . . .  	L DWORD	007C	ABS0

F11_M  . . . . . . . . . . . . .  	NUMBER	0057	
F12_M  . . . . . . . . . . . . .  	NUMBER	0058	
F1_SCAN  . . . . . . . . . . . .  	NUMBER	003B	
F2_SCAN  . . . . . . . . . . . .  	NUMBER	003C	
FILE_BUFFER  . . . . . . . . . .  	V WORD	0000		External
FILE_BUFFER_SIZE . . . . . . . .  	NUMBER	0000		Communal
FLAG_ID_BITS . . . . . . . . . .  	NUMBER	0007	
FOURTH_SHIFT . . . . . . . . . .  	NUMBER	001D	

GOTO_COMMAND . . . . . . . . . .  	NUMBER	0090	
GRAPH_ON . . . . . . . . . . . .  	NUMBER	0008	
GRAVE  . . . . . . . . . . . . .  	NUMBER	0040	
GRAVE_GRAVE  . . . . . . . . . .  	NUMBER	001A	
GRAVE_LOWER  . . . . . . . . . .  	NUMBER	000B	
GRAVE_SPACE  . . . . . . . . . .  	NUMBER	000D	
GRAVE_UPPER  . . . . . . . . . .  	NUMBER	000C	
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
Microsoft (R) Macro Assembler Version 5.10                  2/14/25 23:45:42
DOS - KEYB Command  -  Interrupt 48H Handler                Symbols-6


HF_STATUS  . . . . . . . . . . .  	L BYTE	008C	DATA
HF_TBL_VEC . . . . . . . . . . .  	L DWORD	0104	ABS0
HOLD_STATE . . . . . . . . . . .  	NUMBER	0008	

ID_1 . . . . . . . . . . . . . .  	NUMBER	00AB	
ID_2 . . . . . . . . . . . . . .  	NUMBER	0041	
ID_2A  . . . . . . . . . . . . .  	NUMBER	0054	
ID_PTR_SIZE  . . . . . . . . . .  	V WORD	0000		External
IFF_COMMAND  . . . . . . . . . .  	NUMBER	0000	
IFKBD_COMMAND  . . . . . . . . .  	NUMBER	0080	
INFO_STATUS  . . . . . . . . . .  	NUMBER	00B3	
INH_KEYBOARD . . . . . . . . . .  	NUMBER	0010	
INPT_BUF_FULL  . . . . . . . . .  	NUMBER	0002	
INS_KEY  . . . . . . . . . . . .  	NUMBER	0052	
INS_SHIFT  . . . . . . . . . . .  	NUMBER	0080	
INS_STATE  . . . . . . . . . . .  	NUMBER	0080	
INT48_EXIT . . . . . . . . . . .  	L NEAR	0047	CODE
INT48_PASS . . . . . . . . . . .  	L NEAR	0045	CODE
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_48_JMP . . . . . . . . . . .  	L NEAR	0061	CODE
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	
IO_CHK . . . . . . . . . . . . .  	NUMBER	0040	
IO_ROM_INIT  . . . . . . . . . .  	L WORD	0067	DATA
IO_ROM_SEG . . . . . . . . . . .  	L WORD	0069	DATA

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

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	
Microsoft (R) Macro Assembler Version 5.10                  2/14/25 23:45:42
DOS - KEYB Command  -  Interrupt 48H Handler                Symbols-7


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_LEDS  . . . . . . . . . . . .  	NUMBER	0007	
KB_MAKE_BREAK  . . . . . . . . .  	NUMBER	00F7	
KB_MENU  . . . . . . . . . . . .  	NUMBER	00F1	
KB_OK  . . . . . . . . . . . . .  	NUMBER	00AA	
KB_OVER_RUN  . . . . . . . . . .  	NUMBER	00FF	
KB_PR_LED  . . . . . . . . . . .  	NUMBER	0040	
KB_RESEND  . . . . . . . . . . .  	NUMBER	00FE	
KB_RESET . . . . . . . . . . . .  	NUMBER	00FF	
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_48  . . . . . . . . . .  	N PROC	0000	CODE	Global	Length = 006F
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	
Microsoft (R) Macro Assembler Version 5.10                  2/14/25 23:45:42
DOS - KEYB Command  -  Interrupt 48H Handler                Symbols-8


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
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	
M_SIZE_HI  . . . . . . . . . . .  	NUMBER	00B1	
M_SIZE_LO  . . . . . . . . . . .  	NUMBER	00B0	

NEC_STATUS . . . . . . . . . . .  	L BYTE	0042	DATA	Length = 0007
NEW_INST . . . . . . . . . . . .  	NUMBER	0040	
NLS_FLAG_1_ID  . . . . . . . . .  	NUMBER	0005	
NLS_FLAG_2_ID  . . . . . . . . .  	NUMBER	0006	
NMI_PTR  . . . . . . . . . . . .  	L WORD	0008	ABS0
NO . . . . . . . . . . . . . . .  	NUMBER	0000	
NOCHGLN  . . . . . . . . . . . .  	NUMBER	0001	
NON_ALPHA_LOWER  . . . . . . . .  	NUMBER	0005	
NON_ALPHA_UPPER  . . . . . . . .  	NUMBER	0006	
NOT_TEST . . . . . . . . . . . .  	NUMBER	0008	
NULL_ASCII_CODE  . . . . . . . .  	NUMBER	-0001	
NUMERIC_PAD  . . . . . . . . . .  	NUMBER	0024	
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_COMMAND . . . . . . . . .  	NUMBER	0050	
ORG_VECTOR . . . . . . . . . . .  	L DWORD	004C	ABS0
OUT_BUF_FULL . . . . . . . . . .  	NUMBER	0001	

P12_KB . . . . . . . . . . . . .  	NUMBER	0400	
PARITY_ERR . . . . . . . . . . .  	NUMBER	00C0	
Microsoft (R) Macro Assembler Version 5.10                  2/14/25 23:45:42
DOS - KEYB Command  -  Interrupt 48H Handler                Symbols-9


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	
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
PRO_FAIL . . . . . . . . . . . .  	NUMBER	0002	
PRTY_CHK . . . . . . . . . . . .  	NUMBER	0080	
PUT_ERROR_COMMAND  . . . . . . .  	NUMBER	0070	
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	
REV_STATE  . . . . . . . . . . .  	NUMBER	00F8	
RIGHT_KEY  . . . . . . . . . . .  	NUMBER	0036	
RIGHT_SHIFT  . . . . . . . . . .  	NUMBER	0001	
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	

SCAN_MATCH . . . . . . . . . . .  	NUMBER	0008	
SCROLL_KEY . . . . . . . . . . .  	NUMBER	0046	
SCROLL_SHIFT . . . . . . . . . .  	NUMBER	0010	
SCROLL_STATE . . . . . . . . . .  	NUMBER	0010	
SD . . . . . . . . . . . . . . .  	ALIAS	 SHARED_DATA		
Microsoft (R) Macro Assembler Version 5.10                  2/14/25 23:45:42
DOS - KEYB Command  -  Interrupt 48H Handler                Symbols-10


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_NUM_LK . . . . . . . . . . .  	NUMBER	0020	
SF_ENT_SZ  . . . . . . . . . . .  	NUMBER	0003	
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	

TB_RETURN_CODE . . . . . . . . .  	V WORD	0000		External
TEMP_SHARED_DATA . . . . . . . .  	V BYTE	0000		External
TEMP_STACK_HI  . . . . . . . . .  	NUMBER	0000	
TEMP_STACK_LO  . . . . . . . . .  	NUMBER	FFFF	
THIRD_SHIFT  . . . . . . . . . .  	NUMBER	0007	
TILDE  . . . . . . . . . . . . .  	NUMBER	0004	
TILDE_LOWER  . . . . . . . . . .  	NUMBER	001F	
TILDE_SPACE  . . . . . . . . . .  	NUMBER	0021	
TILDE_UPPER  . . . . . . . . . .  	NUMBER	0020	
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
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_SCAN . . . . . . . . . . . .  	NUMBER	0003	
TYPEWRITER_CAPS_LK . . . . . . .  	NUMBER	8000	
TYPE_2_TAB . . . . . . . . . . .  	NUMBER	0040	

UNKNOWN  . . . . . . . . . . . .  	NUMBER	00FF	
USER_FLAG  . . . . . . . . . . .  	L WORD	0098	DATA
Microsoft (R) Macro Assembler Version 5.10                  2/14/25 23:45:42
DOS - KEYB Command  -  Interrupt 48H Handler                Symbols-11


USER_FLAG_SEG  . . . . . . . . .  	L WORD	009A	DATA
US_MODE  . . . . . . . . . . . .  	NUMBER	0000	

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

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	
XRATE  . . . . . . . . . . . . .  	NUMBER	0002	
XT_KB  . . . . . . . . . . . . .  	NUMBER	4000	

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

ZERO_SCAN  . . . . . . . . . . .  	NUMBER	0020	

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


   1383 Source  Lines
   1383 Total   Lines
    518 Symbols

  46124 + 179873 Bytes symbol space free

      0 Warning Errors
      0 Severe  Errors
