 	 	 	 	 	 	page	64,132
 	 	 	 	
 	 	 	 	
 	 	 	 	
 	 	 	 	
 	 	 	 	
 The IBM Personal Computer MACRO Assembler 01-05-82    	PAGE	1-1



 	 	 	 	
 	 	 	 	
 	 	 	 	
 	 	 	 	
 	 	 	 	
 	 	 	 	Comment @
 	 	 	 	    This is a patch to the ROM BIOS keyboard routine.  When the patch is
 	 	 	 	    loaded, the Alt, Ctrl, Left Shift and Right Shift keys toggle between
 	 	 	 	    their shifted and unshifted states.
 	 	 	 	
 	 	 	 	    There are two main entry points.
 	 	 	 	
 	 	 	 	    1.  'Keyloc' sets up the keyboard interupt vector to point to the patch 
 	 	 	 	 	instead of the normal BIOS routine.  After Keyloc executes, it 
 	 	 	 	 	leaves the new interupt handler resident in memory. 
 	 	 	 	   
 	 	 	 	    2.  'Ikeyloc' is the new keyboard interupt handler.  The first section 
 	 	 	 	 	is a duplication of the ROM BIOS routine until a point where tests 
 	 	 	 	 	for the input of a Alt, Ctrl, Left Shift or Right Shift key can be 
 	 	 	 	 	made.  If it is one of those keys, the appropriate bits in the 
 	 	 	 	 	keyboard flag byte are twiddled. 
 	 	 	 	
 	 	 	 	    John Black
 	 	 	 	    5225 Pooks Hill Rd. #1715 N.
 	 	 	 	    Bethesda MD. 20814
 	 	 	 	@
 	 	 	 	
 = 0060	 	 	 	port_b	 	equ	60h	; 8255 port a addr
 = 0040	 	 	 	timer	 	equ	40h
 = 0060	 	 	 	kb_data	 	equ	60h	; keyboard scan code port
 = 0061	 	 	 	kb_ctl	 	equ	61h	; control bits for keyboard sense data
 	 	 	 	
 0000	 	 	 	abso	 	segment at 0
 0024	 	 	 	 	 	org	24h
 0024	 	 	 	kb_vector	label	dword
 0024	 	 	 	abso	 	ends
 	 	 	 	
 0000	 	 	 	bioscode 	segment at 0F000h
 	 	 	 	;	 	...locations in ROM BIOS used to return from interupt
 E9AF	 	 	 	 	 	org	0E9AFh
 E9AF	 	 	 	K16	 	label	far	 	; resume code if not shift
 	 	 	 	
 EC24	 	 	 	 	 	org	0EC24h
 EC24	 	 	 	K62	 	label	far
 	 	 	 	
 EA23	 	 	 	 	 	org	0EA23h
 EA23	 	 	 	K23	 	label	far	 	; break for shift key
 	 	 	 	
 EA5E	 	 	 	 	 	org	0EA5Eh
 EA5E	 	 	 	K26	 	label	far	 	; return from interupt
 EA5E	 	 	 	bioscode 	ends
 	 	 	 	
 0000	 	 	 	biosdata	segment	at 40h
 	 	 	 	
 0017	 	 	 	 	 	org	17h
 0017	 	 	 	kb_flag	 	label	byte
 	 	 	 	;	...bit definitions for kb_flag
 = 0080	 	 	 	ins_state	equ	80h	 	; insert state is active
 = 0040	 	 	 	caps_state	equ	40h	 	; caps lock state has been toggled
 The IBM Personal Computer MACRO Assembler 01-05-82    	PAGE	1-2



 = 0020	 	 	 	num_state	equ	20h	 	; num lock state has been toggled
 = 0010	 	 	 	scroll_state	equ	10h	 	; scroll lock state has been toggled
 = 0008	 	 	 	alt_shift	equ	08h	 	; alternate shift key depressed
 = 0004	 	 	 	ctl_shift	equ	04h	 	; control shift key depressed
 = 0002	 	 	 	left_shift	equ	02h	 	; left shift key depressed
 = 0001	 	 	 	right_shift	equ	01h	 	; right shift key depressed
 	 	 	 	
 	 	 	 	;	...scan codes
 = 0045	 	 	 	num_key	 	equ	69
 = 0046	 	 	 	scroll_key	equ	70
 = 0038	 	 	 	alt_key	 	equ	56
 = 001D	 	 	 	ctl_key	 	equ	29
 = 003A	 	 	 	caps_key	equ	58
 = 002A	 	 	 	left_key	equ	42
 = 0036	 	 	 	right_key	equ	54
 = 0052	 	 	 	ins_key	 	equ	82
 = 0053	 	 	 	del_key	 	equ	83
 0017	 	 	 	biosdata	ends
 	 	 	 	
 0000	 	 	 	keylocs	segment	para public 'CODE'
 	 	 	 	 	 	assume	cs:keylocs
 	 	 	 	
 0000  4B 45 59 4C 4F 43	keyloc_ident	db	'KEYLOC'
 = 0006	 	 	 	ident_length	equ	6
 0006	 	 	 	ikeyloc	 	proc	far	 	; interupt entry point 
 0006  FB	 	 	 	 	sti	 	 	; begin copy of ROM BIOS
 0007  50	 	 	 	 	push	ax
 0008  53	 	 	 	 	push	bx
 0009  51	 	 	 	 	push	cx
 000A  52	 	 	 	 	push	dx
 000B  56	 	 	 	 	push	si
 000C  57	 	 	 	 	push	di
 000D  1E	 	 	 	 	push	ds
 000E  06	 	 	 	 	push	es
 000F  FC	 	 	 	 	cld	
 0010  B8  ---- R	 	 	 	mov	ax,biosdata
 0013  8E D8	 	 	 	 	mov	ds,ax
 0015  E4 60	 	 	 	 	in	al,kb_data
 0017  50	 	 	 	 	push	ax
 0018  E4 61	 	 	 	 	in	al,kb_ctl
 001A  8A E0	 	 	 	 	mov	ah,al
 001C  0C 80	 	 	 	 	or	al,80h
 001E  E6 61	 	 	 	 	out	kb_ctl,al
 0020  86 E0	 	 	 	 	xchg	ah,al
 0022  E6 61	 	 	 	 	out	kb_ctl,al
 0024  58	 	 	 	 	pop	ax
 0025  8A E0	 	 	 	 	mov	ah,al
 0027  3C FF	 	 	 	 	cmp	al,0FFh
 0029  75 05	 	 	 	 	jnz	keylocpatch
 002B  EA EC24 ---- R	 	 	 	jmp	K62
 	 	 	 	 	 	 	 	 	; End of rom code copy
 0030	 	 	 	keylocpatch:
 0030  50	 	 	 	 	push	ax
 	 	 	 	 	 	assume	ds:biosdata
 	 	 	 	
 0031  24 7F	 	 	 	 	and	al,01111111b	; mask out break indicator
 0033  3C 38	 	 	 	 	cmp	al,alt_key
 0035  74 12	 	 	 	 	je	alt_in
 0037  3C 1D	 	 	 	 	cmp	al,ctl_key
 The IBM Personal Computer MACRO Assembler 01-05-82    	PAGE	1-3



 0039  74 30	 	 	 	 	je	ctrl_in
 003B  3C 2A	 	 	 	 	cmp	al,left_key
 003D  74 34	 	 	 	 	je	leftshift_in
 003F  3C 36	 	 	 	 	cmp	al,right_key
 0041  74 38	 	 	 	 	je	rightshift_in
 	 	 	 	;	 	...return to normal bios keyboard routine
 0043  58	 	 	retbioskey:	pop	ax
 0044  EA E9AF ---- R	 	 	 	jmp	K16
 	 	 	 	
 	 	 	 	
 0049	 	 	 	alt_in:
 0049  B0 08	 	 	 	 	mov	al,alt_shift
 004B  E8 008A R	 	 	 	call	Depress_lock
 	 	 	 	;	 	... if this is a break, enter bios at K23
 004E  58	 	 	 	 	pop	ax
 004F  B4 08	 	 	 	 	mov	ah,alt_shift
 0051  A8 80	 	 	 	 	test	al,80h	 	 	;  if
 0053  74 11	 	 	 	 	jz	fi	 	 	;  .
 0055  F6 06 0017 R 08	 	 	 	test	kb_flag,alt_shift	;  .
 005A  75 0A	 	 	 	 	jnz	fi	 	 	;  .
 	 	 	 	 	 	 	 	 	 	;  / break and not depressed
 	 	 	 	 	    	 	 	 	 	;  .
 005C  80 0E 0017 R 08	 	 	 	or	kb_flag,alt_shift	;  .  Reset depressed flag
 0061  EA EA23 ---- R	 	 	 	jmp	K23	 	 	;  .  Return in case using
 	 	 	 	 	 	 	 	 	 	;  .  alt keypad entry
 0066	 	 	 	fi:	 	 	 	 	 	;  fi
 0066  EA EA5E ---- R	 	 	 	jmp	K26
 	 	 	 	
 006B	 	 	 	ctrl_in:
 006B  B0 04	 	 	 	 	mov	al,ctl_shift
 006D  E8 008A R	 	 	 	call	Depress_lock
 0070  EB 11 90	 	 	 	 	jmp	retdone
 0073	 	 	 	leftshift_in:
 0073  B0 02	 	 	 	 	mov	al,left_shift
 0075  E8 008A R	 	 	 	call	Depress_lock
 0078  EB 09 90	 	 	 	 	jmp	retdone
 007B	 	 	 	rightshift_in:
 007B  B0 01	 	 	 	 	mov	al,right_shift
 007D  E8 008A R	 	 	 	call	Depress_lock
 0080  EB 01 90	 	 	 	 	jmp	retdone
 	 	 	 	
 0083  58	 	 	retdone:	pop	ax
 0084  EA EA5E ---- R	 	 	 	jmp	K26
 0089	 	 	 	ikeyloc	 	endp
 	 	 	 	
 	 	 	 	;---------------------------------------------
 	 	 	 	;
 	 	 	 	;   Depress_lock
 	 	 	 	;
 	 	 	 	;	For keys that normally are depressed and held down
 	 	 	 	;	while another key is depressed. (Cntl for example)
 	 	 	 	;
 	 	 	 	;	ah	input key, with break indicator (80h)
 	 	 	 	;	al	contains depressed indicator bit mask
 	 	 	 	;
 0089  ??	 	 	Down	 	db	?	; indicates the key is held down
 008A	 	 	 	Depress_lock	proc	near
 008A  52	 	 	 	 	push	dx
 008B  F6 C4 80	 	 	 	 	test	ah,80h	 	 	; if1
 The IBM Personal Computer MACRO Assembler 01-05-82    	PAGE	1-4



 008E  75 2E	 	 	 	 	jnz	fi1	 	 	; .
 0090  2E: 84 06 0089 R	 	 	 	test	Down,al	 	 	; .
 0095  75 27	 	 	 	 	jnz	fi1	 	 	; .
 	 	 	 	 	 	 	 	 	 	; / make and not down
 0097  84 06 0017 R	 	 	 	test	kb_flag,al	 	; .   if2
 009B  74 14	 	 	 	 	je	else2	 	 	; .   .
 	 	 	 	 	 	 	 	 	 	; .   / depressed
 009D  E8 00E4 R	 	 	 	call	high_beep	 	; .   .
 00A0  E8 0110 R	 	 	 	call	delay	 	 	; .   .
 00A3  E8 00D6 R	 	 	 	call	low_beep	 	; .   .
 00A6  8A D0	 	 	 	 	mov	dl,al	 	 	; .   . dl:=depressed bit
 00A8  F6 D2	 	 	 	 	not	dl	 	 	; .   .
 00AA  20 16 0017 R	 	 	 	and	kb_flag,dl	 	; .   . key := not depressed
 00AE  EB 0E 90	 	 	 	 	jmp	fi1	 	 	; .   .
 00B1	 	 	 	else2:	 	 	 	 	 	; .   / not depressed
 00B1  E8 00D6 R	 	 	 	call	low_beep	 	; .   .
 00B4  E8 0110 R	 	 	 	call	delay	 	 	; .   .
 00B7  E8 00E4 R	 	 	 	call	high_beep	 	; .   .
 00BA  08 06 0017 R	 	 	 	or	kb_flag,al	 	; .   . key := depressed
 00BE	 	 	 	fi1:	 	 	 	 	 	; fi1 fi2
 	 	 	 	
 00BE  F6 C4 80	 	 	 	 	test	ah,80h	 	 	; if5
 00C1  75 08	 	 	 	 	jnz	else5	 	 	; .
 	 	 	 	 	 	 	 	 	 	; / make
 00C3  2E: 08 06 0089 R	 	 	 	or	Down,al	 	 	; .  down := true
 00C8  EB 0A 90	 	 	 	 	jmp	fi5	 	 	; .
 00CB	 	 	 	else5:	 	 	 	 	 	; / break
 00CB  8A D0	 	 	 	 	mov	dl,al	 	 	; .
 00CD  F6 D2	 	 	 	 	not	dl	 	 	; .
 00CF  2E: 20 16 0089 R	 	 	 	and	Down,dl	 	 	; .  down := false
 00D4	 	 	 	fi5:	 	 	 	 	 	; fi5
 00D4  5A	 	 	 	 	pop	dx
 00D5  C3	 	 	 	 	ret
 00D6	 	 	 	Depress_lock	endp
 	 	 	 	
 	 	 	 	
 	 	 	 	;---------------------------------
 = 0014	 	 	 	h_cycles	equ	20
 = 012C	 	 	 	h_half	 	equ	300
 = 0006	 	 	 	l_cycles	equ	h_cycles / 3
 = 0384	 	 	 	l_half	 	equ	h_half * 3
 	 	 	 	
 00D6	 	 	 	low_beep	proc
 00D6  52	 	 	 	 	push	dx
 00D7  53	 	 	 	 	push	bx
 00D8  BB 0006	 	 	 	 	mov	bx,l_cycles
 00DB  BA 0384	 	 	 	 	mov	dx,l_half
 00DE  E8 00F2 R	 	 	 	call	beep
 00E1  5B	 	 	 	 	pop	bx
 00E2  5A	 	 	 	 	pop	dx
 00E3  C3	 	 	 	 	ret
 00E4	 	 	 	low_beep	endp
 	 	 	 	
 00E4	 	 	 	high_beep	proc
 00E4  52	 	 	 	 	push	dx
 00E5  53	 	 	 	 	push	bx
 00E6  BB 0014	 	 	 	 	mov	bx,h_cycles
 00E9  BA 012C	 	 	 	 	mov	dx,h_half
 00EC  E8 00F2 R	 	 	 	call	beep
 The IBM Personal Computer MACRO Assembler 01-05-82    	PAGE	1-5



 00EF  5B	 	 	 	 	pop	bx
 00F0  5A	 	 	 	 	pop	dx
 00F1  C3	 	 	 	 	ret
 00F2	 	 	 	high_beep	endp
 	 	 	 	
 	 	 	 	;---------------------------------
 	 	 	 	; Adapted from BIOS Beep routine
 	 	 	 	;
 	 	 	 	;  bx = # of cycles
 	 	 	 	;  dx = length of half cycle
 	 	 	 	
 00F2	 	 	 	beep	 	proc	near
 00F2  50	 	 	 	 	push	ax
 00F3  51	 	 	 	 	push	cx
 00F4  E4 61	 	 	 	 	in	al,kb_ctl
 00F6  50	 	 	 	 	push	ax
 00F7	 	 	 	k65:
 00F7  24 FC	 	 	 	 	and	al,0FCh
 00F9  E6 61	 	 	 	 	out	kb_ctl,al
 00FB  8B CA	 	 	 	 	mov	cx,dx
 00FD  E2 FE	 	 	k66:	 	loop	k66
 00FF  0C 02	 	 	 	 	or	al,2
 0101  E6 61	 	 	 	 	out	kb_ctl,al
 0103  8B CA	 	 	 	 	mov	cx,dx
 0105  E2 FE	 	 	k67:	 	loop	k67
 0107  4B	 	 	 	 	dec	bx
 0108  75 ED	 	 	 	 	jnz	k65
 010A  58	 	 	 	 	pop	ax
 010B  E6 61	 	 	 	 	out	kb_ctl,al
 010D  59	 	 	 	 	pop	cx
 010E  58	 	 	 	 	pop	ax
 010F  C3	 	 	 	 	ret
 0110	 	 	 	beep	 	endp
 	 	 	 	
 	 	 	 	;--------------------------------
 0110	 	 	 	delay	 	proc	near
 0110  51	 	 	 	 	push	cx
 0111  B9 3A98	 	 	 	 	mov	cx,15000
 0114  E2 FE	 	 	 	 	loop	$
 0116  59	 	 	 	 	pop	cx
 0117  C3	 	 	 	 	ret
 0118	 	 	 	delay	 	endp
 	 	 	 	
 = 0118	 	 	 	ikeylast	equ	$	; last location + 1 to remain in memory
 	 	 	 	
 0000	 	 	 	stacks	 	segment	stack 'STACK'
 0000     40 [	 	 	 	 	db	64 dup('stack   ')
               73 74 61 63	
               6B 20 20 20	
                            ]	
 	 	 	 	
 0200	 	 	 	stacks	 	ends
 	 	 	 	
 	 	 	 	;-------------------------------------
 0118  4B 45 59 4C 4F 43	loaded_mess	db	'KEYLOC loaded$'
       20 6C 6F 61 64 65	
       64 24	 	 	
 0126  65 72 72 6F 72 20	err_mess	db	'error - KEYLOC is already loaded$'
       2D 20 4B 45 59 4C	
 The IBM Personal Computer MACRO Assembler 01-05-82    	PAGE	1-6



       4F 43 20 69 73 20	
       61 6C 72 65 61 64	
       79 20 6C 6F 61 64	
       65 64 24	 	 	
 0147	 	 	 	keyloc	 	proc	far
 0147  1E	 	 	 	 	push	ds
 0148  2B C0	 	 	 	 	sub	ax,ax
 014A  50	 	 	 	 	push	ax
 014B  1E	 	 	 	 	push	ds	 	 	; save program seg
 	 	 	 	
 	 	 	 	;	 	...Check to see if a copy of KEYLOC has
 	 	 	 	;	 	   already been loaded by comparing Keyloc_ident
 	 	 	 	;	 	   with the same locations relative the the current
 	 	 	 	;	 	   keyboard interupt routine ( it is pointed to by the
 	 	 	 	;	 	   the keyboard interupt vector)
 014C  FC	 	 	 	 	cld	 	 	 	 	; increment
 	 	 	 	 	 	assume	ds:abso
 014D  B8  ---- R	 	 	 	mov	ax,abso
 0150  8E D8	 	 	 	 	mov	ds,ax
 0152  BE 0000 R	 	 	 	mov	si,offset keyloc_ident
 0155  A1 0026 R	 	 	 	mov	ax,kb_vector+2	 	 	; segment
 0158  8B 3E 0024 R	 	 	 	mov	di,kb_vector	 	 	; offset to ident
 015C  83 EF 06	 	 	 	 	sub	di,ident_length
 015F  8E C0	 	 	 	 	mov	es,ax
 	 	 	 	 	 	assume	ds:keylocs
 0161  B8  ---- R	 	 	 	mov	ax,keylocs
 0164  8E D8	 	 	 	 	mov	ds,ax
 0166  B9 0006	 	 	 	 	mov	cx,ident_length
 0169  F2/ A6	 	 	 	 	repne	cmpsb	 	 	 	; ds:[si],es:[di]
 016B  83 F9 00	 	 	 	 	cmp	cx,0	 	 	 	; if
 016E  74 09	 	 	 	 	je	NotLoaded	 	 	; .
 	 	 	 	 	 	 	 	 	 	 	; / already loaded
 0170  B4 09	 	 	 	 	mov	ah,9h	 	 	 	; .  print string
 0172  BA 0126 R	 	 	 	mov	dx,offset err_mess	 	; .
 0175  CD 21	 	 	 	 	int	21h	 	 	 	; .
 0177  1F	 	 	 	 	pop	ds	 	 	 	; . get rid of pseg
 0178  CB	 	 	 	 	ret	 	 	 	 	; . return to DOS
 0179	 	 	 	NotLoaded:	 	 	 	 	 	; fi
 	 	 	 	
 	 	 	 	;	 	...set up keyboard interupt vector
 0179  B4 09	 	 	 	 	mov	ah,9h
 017B  BA 0118 R	 	 	 	mov	dx,offset loaded_mess
 017E  CD 21	 	 	 	 	int	21h
 	 	 	 	 	 	assume	ds:abso
 0180  B8  ---- R	 	 	 	mov	ax,abso
 0183  8E D8	 	 	 	 	mov	ds,ax
 0185  B8 0006 R	 	 	 	mov	ax,offset ikeyloc	 	; ip
 0188  A3 0024 R	 	 	 	mov	kb_vector,ax
 018B  B8  ---- R	 	 	 	mov	ax,seg ikeyloc	 	 	; cs
 018E  A3 0026 R	 	 	 	mov	kb_vector+2,ax
 	 	 	 	;	 	...return to DOS, but leave ikeyloc resident
 0191  07	 	 	 	 	pop	es	 	 	 	; get program segment
 0192  26: C7 06 0001 0027	 	 	mov	es:byte ptr 1,27h	 	; change int 20 to 27
 0199  BA 0218 R	 	 	 	mov	dx,offset ikeylast+100h	 	; dx:=lastaddr+1+prfx
 019C  CB	 	 	 	 	ret
 019D	 	 	 	keyloc	 	endp
 	 	 	 	
 019D	 	 	 	keylocs	 	ends
 	 	 	 	
 The IBM Personal Computer MACRO Assembler 01-05-82    	PAGE	1-7



 	 	 	 	 	 	end	keyloc

 The IBM Personal Computer MACRO Assembler 01-05-82    	PAGE	Symbols-1



Segments and groups:

	 	N a m e	 	 	Size	align	combine	class

ABSO . . . . . . . . . . . . . .	0024	AT    	0000	
BIOSCODE . . . . . . . . . . . .	EC24	AT    	F000	
BIOSDATA . . . . . . . . . . . .	0017	AT    	0040	
KEYLOCS. . . . . . . . . . . . .	019D	PARA  	PUBLIC	'CODE'
STACKS . . . . . . . . . . . . .	0200	PARA  	STACK 	'STACK'

Symbols:            

	 	N a m e	 	 	Type	Value	Attr         

ALT_IN . . . . . . . . . . . . .	L NEAR 	0049	KEYLOCS
ALT_KEY. . . . . . . . . . . . .	Number	0038	
ALT_SHIFT. . . . . . . . . . . .	Number	0008	
BEEP . . . . . . . . . . . . . .	N PROC	00F2	KEYLOCS	Length =001E
CAPS_KEY . . . . . . . . . . . .	Number	003A	
CAPS_STATE . . . . . . . . . . .	Number	0040	
CTL_KEY. . . . . . . . . . . . .	Number	001D	
CTL_SHIFT. . . . . . . . . . . .	Number	0004	
CTRL_IN. . . . . . . . . . . . .	L NEAR 	006B	KEYLOCS
DELAY. . . . . . . . . . . . . .	N PROC	0110	KEYLOCS	Length =0008
DEL_KEY. . . . . . . . . . . . .	Number	0053	
DEPRESS_LOCK . . . . . . . . . .	N PROC	008A	KEYLOCS	Length =004C
DOWN . . . . . . . . . . . . . .	L BYTE 	0089	KEYLOCS
ELSE2. . . . . . . . . . . . . .	L NEAR 	00B1	KEYLOCS
ELSE5. . . . . . . . . . . . . .	L NEAR 	00CB	KEYLOCS
ERR_MESS . . . . . . . . . . . .	L BYTE 	0126	KEYLOCS
FI . . . . . . . . . . . . . . .	L NEAR 	0066	KEYLOCS
FI1. . . . . . . . . . . . . . .	L NEAR 	00BE	KEYLOCS
FI5. . . . . . . . . . . . . . .	L NEAR 	00D4	KEYLOCS
HIGH_BEEP. . . . . . . . . . . .	N PROC	00E4	KEYLOCS	Length =000E
H_CYCLES . . . . . . . . . . . .	Number	0014	
H_HALF . . . . . . . . . . . . .	Number	012C	
IDENT_LENGTH . . . . . . . . . .	Number	0006	
IKEYLAST . . . . . . . . . . . .	Number	0118	KEYLOCS
IKEYLOC. . . . . . . . . . . . .	F PROC	0006	KEYLOCS	Length =0083
INS_KEY. . . . . . . . . . . . .	Number	0052	
INS_STATE. . . . . . . . . . . .	Number	0080	
K16. . . . . . . . . . . . . . .	L FAR  	E9AF	BIOSCODE
K23. . . . . . . . . . . . . . .	L FAR  	EA23	BIOSCODE
K26. . . . . . . . . . . . . . .	L FAR  	EA5E	BIOSCODE
K62. . . . . . . . . . . . . . .	L FAR  	EC24	BIOSCODE
K65. . . . . . . . . . . . . . .	L NEAR 	00F7	KEYLOCS
K66. . . . . . . . . . . . . . .	L NEAR 	00FD	KEYLOCS
K67. . . . . . . . . . . . . . .	L NEAR 	0105	KEYLOCS
KB_CTL . . . . . . . . . . . . .	Number	0061	
KB_DATA. . . . . . . . . . . . .	Number	0060	
KB_FLAG. . . . . . . . . . . . .	L BYTE 	0017	BIOSDATA
KB_VECTOR. . . . . . . . . . . .	L DWORD	0024	ABSO
KEYLOC . . . . . . . . . . . . .	F PROC	0147	KEYLOCS	Length =0056
KEYLOCPATCH. . . . . . . . . . .	L NEAR 	0030	KEYLOCS
KEYLOC_IDENT . . . . . . . . . .	L BYTE 	0000	KEYLOCS
LEFTSHIFT_IN . . . . . . . . . .	L NEAR 	0073	KEYLOCS
LEFT_KEY . . . . . . . . . . . .	Number	002A	
LEFT_SHIFT . . . . . . . . . . .	Number	0002	
LOADED_MESS. . . . . . . . . . .	L BYTE 	0118	KEYLOCS
 The IBM Personal Computer MACRO Assembler 01-05-82    	PAGE	Symbols-2



LOW_BEEP . . . . . . . . . . . .	N PROC	00D6	KEYLOCS	Length =000E
L_CYCLES . . . . . . . . . . . .	Number	0006	
L_HALF . . . . . . . . . . . . .	Number	0384	
NOTLOADED. . . . . . . . . . . .	L NEAR 	0179	KEYLOCS
NUM_KEY. . . . . . . . . . . . .	Number	0045	
NUM_STATE. . . . . . . . . . . .	Number	0020	
PORT_B . . . . . . . . . . . . .	Number	0060	
RETBIOSKEY . . . . . . . . . . .	L NEAR 	0043	KEYLOCS
RETDONE. . . . . . . . . . . . .	L NEAR 	0083	KEYLOCS
RIGHTSHIFT_IN. . . . . . . . . .	L NEAR 	007B	KEYLOCS
RIGHT_KEY. . . . . . . . . . . .	Number	0036	
RIGHT_SHIFT. . . . . . . . . . .	Number	0001	
SCROLL_KEY . . . . . . . . . . .	Number	0046	
SCROLL_STATE . . . . . . . . . .	Number	0010	
TIMER. . . . . . . . . . . . . .	Number	0040	

Warning Severe
Errors	Errors 
0	0
 . . . . .	Number	0020	
PORT_B .