; ------ TEST FOR OVERRUN SCAN CODE FROM KEYBOARD
SYSTEM HOOK
I NT I 5H - FUNCT I ON 4FH
(ON HARDWARE I NTERRUPT LEVEL 9H)
RESET THE SH I FT REG I STER ON THE PLANAR I F ENABLED, OR DO NOTH I NG I F
I TIS 0 I SABLED
5-49
AT END OF BUFFER?
NO, CONT I NUE
YES, RESET TO BUFFER BEG I NN I NG
ESTABLI SH ADDRESS OF TABLES
LOAD FLAGS FOR TEST I NG
IS THI S THE PAUSE KEY?
SET FLAG, PAUSE KEY MARKER CODE
THROW AWAY TH I S CODE
SET FLAG BIT,
SET KBX, AND
THROW AWAY TH I S CODE
IS TH I S THE GENERAL MARKER CODE?
; WAS LAST CODE THE E I MARKER CODE?
; ,JUMP IF NOT
LENGTH OF SEARCH
I S TH I S AN AL T, CTL, OR SH I FT?
CHECK IT
THROW AWAY
IF SO
I SIT THE PAUSE KEY?
NO, THROW AWAY
&
RESET FLAG
YES,
I SIT THE BREAK OF THE KEY?
YES, THROW THIS AWAY, TOO
NO, THI SIS THE REAL PAUSE STATE
TURN OFF THE BREAK BIT
WAS LAST CODE THE EO MARKER CODE?
,JUMP IF NOT
; LENGTH OF SEARCH
;
I S TH I SASH I FT KEY?
; CHECK IT
; NO, CONT I NUE KEY PROCES SING
;
YES, THROW AWAY
&
RESET FLAG
;
I S TH I S AN OVERRUN CHAR
; NO, TEST FOR SH I FT KEY
; BUFFER_FULL_BEEP
; MOVE TO NEXT WORD IN LIST
1-4
01-10-86
GET THE CONTROL PORT
SAVE VALUE
RESET BIT FOR KEYBOARD
GET BACK OR I G I NAL CONTROL
KB HAS BEEN RESET
RESTORE DATA IN
;
SYSTEM INTERCEPT -
KEY CODE FUNCT I ON
;
SET CY=
1 (IN CASE OF IRET)
; CASSETTE CALL
(AL) = KEY SCAN CODE
RETURNS CY =
I
FOR I NVAL I 0 FUNCT I ON
CONT I NUE I F CARRY FLAG SET
«
AL) =CODE)
EX I T I F SYSTEM HANDLED SCAN CODE
;
EX I T HANDLES HARDWARE EO I AND ENABLE
;
SAVE SCAN CODE IN AH ALSO
; FORWARD 0 I RECT I ON
;
SET UP ADDRESS I NG TO DATA SEGMENT
; READ I N THE CHARACTER
;
SAVE IT
;
SAVE THE STI UNT
I L AFTER KEYBOARD RESET
KEYBOARD (01/10/86)
AH,AL
AH,04FH
AL,MC EO
TEST EI
ttKB FLAG 3,LC EO+KBX
SHORT EXIT_K -
BH,LC E I
T_SYS:KEY
CX,2
01 ,OFFSET K6+6
SCASB
KI6A
SHORT K 16B
AL,07FH
BH,LC EO
NOT_LC_EO
AL,MC El
NOT HC
ttKB-FLAG 3, LC E 1+K8X
K26A
-
-
CS
ES
BH,ttKB_FLAG_3
AL,OFFH
K16
K62
AL,KB CTL
AH,AL-
AL,80H
KB CTL,AL
AH-;AL
KB_CTL,AL
AX,BX
NEAR
BX
BX
CX,4
01 ,OFFSET K6+4
SCASB
EXIT_K
AL,NUM KEY
KI6B
-
AH,80H
K 16B
K39P
15H
KB INT PC
K26
-
BX ,ttBUFFER END
K5
-
BX ,ttBUFFER_START
FAR
AX
BX
CX
OX
SI
01
OS
ES
DDS
AL,KB DATA
BX,AX-
I NCREMENT BUFFER PO I NTER ROUT I NE
IN
MOV
OR
OUT
XCHG
OUT
STI
XCHG
MOV
STC
INT
CMP
,JNZ
,JMP
PUSH
POP
MOV
PROC
INC
INC
CMP
,JB
MOV
RET
ENDP
; - - - - - KEYBOARD I NTERRUPT ROUT I NE
AND
TEST
,JZ
CMP
,JNE
TEST
,JNZ
,JMP
MOV
MOV
REPNE
,JNE
,JMP
TEST EO:
-
CMP
,JNE
OR
,JMP
MOV
MOV
REPNE
,JE
,JC
,JMP
KB_I NT
-P~bv
KB INT I PROC
-
-
PUSH
PUSH
PUSH
PUSH
PUSH
PUSH
PUSH
PUSH
CLD
CALL
IN
XCHG
NOT LC EO:
-
-
TEST
,JZ
K16:
TEST EI:
-
CMP
,JNE
OR
EXIT_K: ,JMP
K4
K5:
K4
PAGE
260
261
262
263
264
265
0114
266
0114 43
267
0115 43
268
269
0116 3B IE 0082 R
270
01 I A 72 04
271
011C 8B IE 0080 R
272
o
120C3
273
0121
274
275
276
277
278
0121
279
0121
50
280
0122 53
281
0123 51
282
0124 52
283
0125 56
284
0126 57
285
0127
IE
286
0128 06
287
0129 FC
288
012A E8 0000 E
289
0120 E4 60
290
o
12F 93
291
292
293
294
295
0130 E4 '61
296
0132 8A EO
297
0134 OC 80
298
0136 E6 61
299
0138 86 EO
300
o
13A E661
301
o
13C FB
302
0130 93
303
304
305
306
o
13E B4 4F
307
0140 F9
308
0141
CD 15
309
310
0143 72 03
311
0145 E9 02CA R
312
313
0148
314
0148 8A EO
315
316
317
318
o
14A 3C FF
319
014C 75 03
320
014E E9 0540 R
321
322
0151
OE
323
0152 07
324
0153 8A 3E 0096 R
325
326
0157
327
0157 BC EO
328
0159 75 07
329
015B 80 OE 0096 R 12
330
0160 EB 09
331
33.2
0162
333
0162 BC EI
334
0164 75
O~
335
0166 80
oE
00'96 R
11
336
016B E9 02CF R
337
338
016E
339
01 bE 24 7F
340
0170 F6 C7 02
341
0.173 74 OC'
342
343
0175 B9 O{)02
344
01 78aF
0~55
R
345
017B
F21 AE
346
0.170 75 54
347
017F EB 3D
348
349
0181
350
0181 F6 C7 01
351
0184 74 16
352
353
0186 B9 0004
354
0189 BF
0553
R
355
018C
F21 AI::
356
o
18E 74 DB
357
358
0190 3C 45
359
0192 752A
360
0194 F6 C4 80
361
0197 75 25
362
0199 E9 03FF R
I BM Persona I Computer MACRO Assemb I er
Vers
i
on 2.00
KEYBRO - - -
0
I
110/86
KEYBOARO ADAPTER B I OS