;------ DURING PAUSE INTERVAL, TURN CRT BACK ON
K44:
CMP
AL,55
PR I NT SCREEN KEY?
.JNE
K45
NOT-PR I NT-SCREEN
TEST
BH,KBX
IS TH I S ENHANCED KEYBOARD?
.JZ
K44A
NO, TEST FOR SHIFT STATE
TEST
BH,LC_EO
YES, LAST CODE A MARKER?
.JNZ
K44B
YES,
I S PR I NT SCREEN
.JMP
SHORT K45C
;
NO, XLATE TO • *. CHARACTER
K44A:
TEST
BL ,LEFT_SH I FT+R I GHT_SH I FT
;NOT 101 KBD,
SH I FT KEY DOWN?
.JZ
K45C
; NO, XLATE TO • *. CHARACTER
5-53
I S TH I S BLACK AND WH I TE CARD
YES, NOTH I NG TO DO
PORT FOR COLOR CARD
GET THE VALUE OF THE CURRENT MODE
SET THE CRT MODE,
SO THAT CRT I S ON
PAUSE-LOOP
LOOP UNT I L FLAG TURNED OFF
INTERRUPT_RETURN_NO_EO I
NOT-KEY-55
I SIT THE TAB KEY?
YES, XL ATE TO FUNCTION CODE
I SIT THE / KEY?
NO, NO MORE SPEC I AL CASES
YES,
I SIT FROM THE KEYPAD?
NO, .JUST TRANSLATE
YES,
SPEC I AL CODE FOR TH I S ONE
BUFFER FILL
SET UP TO TRANSLATE CTL
I SIT I N CHARACTER TABLE?
YES, GO TRANSLATE CHAR
SET UP TO TRANSLATE CTL
NO, GO TRANSLATE_SCAN
NO-PAUSE
TEST FOR */PRTSC KEY
NOT-KEY-55
I S TH I S THE ENHANCED KEYBOARD?
NO, CTL-PRTSC IS VALID
YES, WAS LAST CODE AN EO?
NO, TRANSLATE TO A FUNCT I ON
START / STOP PR INTI NG SW ITCH
BUFFER_F I LL
TEST FOR KEYPAD /
NOT THERE, NO OTHER EO SPEC I ALS
SPEC I AL CODE
BUFFER FILL
TEST FOR
IN TABLE
AL T-CONT I NUE
IN KEYPAD REGION?
OR NUMLOCK, SCROLLOCK?
IF SO,
IGNORE
CONVERT TO PSEUDO SCAN CODE
ASC II CODE OF ZERO
PUT I TIN THE BUFFER
USE SPEC I AL ASC I I CODE
PUT I TIN THE BUFFER
CONVERT SCAN CODE
(ED I T KEYS)
(SCAN CODE NOT IN AH FOR INSERT)
PUT I TIN THE BUFFER
NO-BREAK
IS TH I S THE ENHANCED KEYBOARD?
YES, THEN TH I SCAN' T BE PAUSE
LOOK FOR PAUSE KEY
NO-PAUSE
; TURN ON THE HOLD FLAG
; END OF I NTERRUPT TO CONTROL PORT
;
ALLOW FURTHER KEYSTROKE I NTS
1-8
01-10-86
KEYBOARD (01/10/86)
OCRT MODE,7
K40 -
DX,03D8H
AL,OCRT MODE SET
DX,AL
-
-
AL,55
K42
BH,KBX
K41A
BH,LC EO
K42B -
AX,114*256
K57
BH,KBX
K41
AL,NUM KEY
K41
-
OKB FLAG I,HOLD STATE
AL,EOI
-
-
020H, AL
OKB FLAG I,HOLD STATE
K40-
-
-
K27
I SSUE I NTERRUPT TO PERFORM PR I NT SCREEN FUNCT I ON
CMP
.JE
MOV
MOV
OUT
TEST
.JNZ
.JMP
K38A:
CMP
AL, SCROLL_KEY
TEST FOR BREAK
.JNE
K39
.JUMP, NO-BREAK
TEST
BH,KBX
IS TH I S THE ENHANCED KEYBOARD?
.JZ
K38B
NO, BREAK
I S VALID
TEST
BH,LC_EO
YES, WAS LAST CODE AN EO?
.JZ
K39
NO-BREAK, TEST FOR PAUSE
K38B:
MOV
BX,OBUFFER_HEAD
RESET BUFFER TO EMPTY
MOV
OBUFFER TAIL,BX
MOV
OB lOS_BREAK, 80H
TURN ON BIOS BREAK BIT
INT
lBH
BREAK I NTERRUPT VECTOR
SUB
AX,AX
PUT OUT DUMMY CHARACTER
.JMP
K57
BUFFER_F I LL
;------ SET UP TO TRANSLATE CONTROL SHIFT
CMP
AL,53
.JNE
K32A
MOV
AX,OA400h
.JMP
K57
K37:
CMP
AL,59
.JB
K37B
CMP
AL,68
.JA
K32A
ADD
AH,45
K37A:
MOV
AL,O
.JMP
K57
K37B:
MOV
AL,OFOh
.JMP
K57
K37C:
ADD
AL,80
MOV
AH,AL
.JMP
K37A
;------ NOT IN ALTERNATE SH I FT
K38:
TEST
BL,CTL_SHIFT
.JNZ
K38A
.JMP
K44
; ------ TEST SPEC I AL CASE KEY 55
NOT-ALT-SH I FT
BL STILL HAS SHIFT FLAGS
ARE WE I N CONTROL SH I FT?
;
YES,
START PROCESS I NG
; NOT-CTL-SH I FT
; ------ CONTROL SH I FT, TEST SPEC I AL CHARACTERS
; ------ TEST FOR BREAK
;------ NOT IN CONTROL SHIFT
CMP
AL,15
.JE
K42B
CMP
AL,53
.JNE
K42A
TEST
BH,LC_EO
.JZ
K42A
MOV
AX,9500h
.JMP
K57
K42A:
MOV
BX, OFFSET K8
CMP
AL,59
.JB
K45F
K42B:
MOV
BX, OFFSET K8
.JMP
K64
; -------- TEST FOR PAUSE
K39:
K41 :
K42:
K40:
CMP
.JNE
TEST
.JZ
TEST
.JZ
K41A:
MOV
.JMP
TEST
.JNZ
CMP
.JNE
K39P:
OR
MOV
OUT
654
03A 7 3C 35
655
03A9 75 CO
656
03AB B8 A400
657
03AE E9 0500 R
658
659
03B I
3C 3B
660
03B3 72 OC
661
03B5 3C 44
662
663
03B7 77 B2
664
03B9 80 C4 20
665
666
03BC BO 00
667
03BE E9 0500 R
668
669
03C 1 BO FO
670
03C3 E9 0500 R
671
672
03C6 04 50
673
03C8 8A EO
674
03CA EB FO
675
676
677
678
03CC
679
680
03CC F6 C3 04
681
03CF 75 03
682
030 I E9 0454 R
683
684
685
686
687
688
0304 3C 46
689
0306 75
1E
690
0308 F6 C7
10
691
03DB 74 05
692
0300 F6 C7 02
693
03EO 74 14
694
695
03E2 8B 1E 001 A R
696
03E6 89
IE 001C R
697
03EA C6 06 0071 R 80
698
03EF CD 1B
699
03F 1 2B CO
700
03F3 E9 0500 R
70 I
702
703
704
03F6
705
03F6 F6 C7
10
706
03F9 75 25
707
03FB 3C 45
708
03FD 75 21
709
03FF 80 OE 0018 R 08
7 I 0
0404 BO 20
7 I I
0406 E6 20
712
713
714
715
0408 80 3E 0049 R 07
716
0400 74 07
717
040F BA 0308
7 I 8
0412 AO 0065 R
719
0415 EE
720
0416
721
0416 F6 06 0018 R 08
722
041B 75 F9
723
0410 E9 0204 R
724
725
726
727
0420
728
0420 3C 37
729
0422 75
10
730
0424 F6 C7
10
731
0427 74 05
732
0429 F6 C7 02
733
042C 74 20
734
042E B8 7200
735
0431
E9 0500 R
736
737
738
739
0434
740
0434 3C OF
741
0436 74 16
742
0438 3C 35
743
043A 75 OB
744
043C F6 C7 02
745
043F 74 06
746
0441
B8 9500
74 7
0444 E9 0500 R
748
749
0447 BB 055F R
750
044A 3C 3B
751
044C 72 57
752
044E BB 055F R
753
0451
E9 04FC R
754
755
756
757
0454 3C 37
758
0456 75
1F
759
0458 F6 C7
10
760
045B 74 07
761
0450 F6 C7 02
762
0460 75 07
763
0462 EB 34
764
0464 F6 C3 03
765
0467 74 2F
766
767
IBM Personal Computer MACRO Assembler
Version 2.00
KEYBRD - - -
01 /10/86
KEYBOARD ADAPTER B I OS