free hit counter

IBM XT 5160 Technical Reference page 193

Hide thumbs Also See for XT 5160:
Table of Contents

Advertisement

I BM Persona I Computer MACRO Assemb I er
Vers
i
on 2.00
KEYBRD - - -
0 I / 10/86
KEYBOARD ADAPTER B I OS
I-I
01-10-86
OUTPUT
AS NOTED ABOVE, ONLY AX AND FLAGS CHANGED
ALL OTHER REG I STERS PRESERVED
( AH) = I OH EXTENDED READ I NTERF ACE FOR THE ENHANCED KEYBOARD
(AH) = 1 1H EXTENDED ASC I I
STATUS FOR THE ENHANCED KEYBOARD.
OTHERW I SE SAME AS FUNCT I ON AH= 1
(AH) = 12H RETURN THE EXTENDED SH I FT STATUS I N AX REG I STER
AL = BITS FROM OKB FLAG, AH = BITS FOR LEFT AND RIGHT
CTL AND ALT KEYS FROM OKB_FLAG_I
AND OKB_FLAG_3
EXIT:
1 1 1 1 1
1 1
I
1 1 ,----- RIGHT SHIFT KEY IS DEPRESSED
1 1
I
1 ,------- LEFT SH I FT KEY I S DEPRESSED
1
I I •---------
CONTROL SH I FT KEY I S DEPRESSED
1 1 ,----------- ALTERNATE SHIFT KEY IS DEPRESSED
1 • ------------- SCROLL LOCK STATE HAS BEEN TOGGLED
1 ,--------------- NUM LOCK STATE HAS BEEN TOGGLED
1 • ----------------- CAPS LOCK STATE HAS BEEN TOGGLED
,------------------- I NSERT STATE I S ACT I VE
1 1 1 1 1
1 1 1 1 1 • ----- LEFT CONTROL KEY I S DEPRESSED
1 1 1 1 .------- LEFT ALTERNATE SHIFT KEY IS DEPRESSED
1 1 1 ,--------- RIGHT CONTROL KEY I S DEPRESSED
1 1 ,----------- RIGHT ALTERNATE SH I FT KEY I S DEPRESSED
1 ,------------- SCROLL LOCK KEY I S DEPRESSED
1 • --------------- NUM LOCK KEY I S DEPRESSED
1 ,----------------- CAPS LOCK KEY I S DEPRESSED
,------------------- SYSTEM KEY I S DEPRESSED
GET A CHARACTER FROM THE BUFFER
(EXTENDED)
ROUT I NE TO XLATE FOR EXTENDED CALLS
GIVE I T TO THE CALLER
GET A CHARACTER FROM THE BUFFER
ROUTINE TO XLATE FOR STANDARD CALLS
CARRY SET MEANS THROW CODE AWAY
RECOVER REG I STER
RECOVER SEGMENT
I NV AL I 0 COMMAND
I NTERRUPTS BACK ON
SAVE CURRENT OS
SAVE BX TEMPORARILY
ESTABLISH POINTER TO DATA REGION
AH=O
ASCII READ
AH=I -
ASC I I
STATUS
AH=2 -
SHIFT STATUS
AH=5 -
KEYBOARD WR I TE
AH=10
EXTENDED ASC I I READ
AH= II
-
-
EXTENDED ASCII
STATUS
AH=12
-
-
EXTENDED_ SH I FT_ STATUS
AL REGI STER
AH REGI STER
CX
BX
OS
K1S
K 10 E XLAT
KIO:EXIT
K 1S
KIO S XLAT
Kl -
-
KIO_EXIT
OS
BX
CX
DDS
AH,AH
KI
AH
K2
AH
K3
AH,3
K500
AH,OBH
K1E
AH
K2E
AH
K3E
1716151 4 131211101
17161514131211101
CALL
CALL
JMP
CALL
CALL
JC
JMP
DDS:NEAR
RESET:NEAR
BEEP:NEAR
KEYBOARD 10 1
KB_INT_l-
-
K I:
KIE:
; ------ ASC I I CHARACTER
CODE
SEGMENT BYTE
PUBL I C
ASSUME
CS:CODE,DS:DATA
KEYBOARD 10 I
PROC
FAR
STI-
PUSH
PUSH
PUSH
CALL
OR
JZ
DEC
JZ
DEC
JZ
SUB
JZ
SUB
JZ
DEC
JZ
DEC
JZ
K 10 EXIT:
-
POP
POP
POP
IRET
EXTRN
EXTRN
EXTRN
PUBLIC
PUBLIC
.LlST
PAGE 118,121
TITLE KEYBRD - - -
0 1 / 10/86
KEYBOARD ADAPTER B I OS
; - - - -
I NT 16 - --- --- - - - ---- -- --- - - - - - - - --------- - - - -- - --- ---- -- --- - - - -- --
KEYBOARD I
/0
:
THESE ROUT I NES PROV I DE KEYBOARD SUPPORT
:
INPUT
:
(AH) =0
READ THE NEXT ASCII CHARACTER STRUCK FROM THE KEYBOARD
RETURN THE RESULT IN ( AL),
SCAN CODE IN ( AH)
(AH)=I
SET THE Z FLAG TO INDICATE IF AN ASCII CHARACTER IS
AVAILABLE TO BE READ.
( ZF ) = I
- -
NO CODE AVA I LABLE
(ZF) =0 -- CODE I S AVA I LABLE
IF ZF = 0, THE NEXT CHARACTER I N THE BUFFER TO BE READ
I SIN AX, AND THE ENTRY REMA I NS I N THE BUFFER
(AH) =2
RETURN THE CURRENT SHIFT STATUS IN AL REGISTER
THE BIT SETTINGS FOR THIS CODE ARE INDICATED IN THE
THE EQUATES FOR OKB FLAG
(AH) =5
PLACE ASCII CHARACTER/SCAN CODE COMBINATION IN KEYBOARD
BUFFER AS I F STRUCK FROM KEYBOARD
ENTRY:
(CL)
= ASC I I CHARACTER
(CH)
= SCAN CODE
EXIT:
(AL)
= OOH = SUCCESSFUL OPERATION
(AL)
= 0 I H = UNSUCCESSFUL -
BUFFER FULL
1
2
3
4
5
6
7
8
9
10
II
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
0000
77
78
0000
79
0000 FB
80
0001
IE
81
0002 53
82
0003 51
83
0004 E8 0000 E
84
0007 OA E4
85
0009 74 26
86
OOOB FE CC
87
0000 74 37
88
OOOF FE CC
89
00 I 1 74 64
90
0013 80 EC 03
91
0016 74 64
92
0018 80 EC OB
93
001 B 74 OC
94
0010 FE CC
'15
00 IF 74 1A
96
0021 FE CC
97
0023 74 39
98
0025
99
0025 59
100
0026 5B
101
0027
IF
102
0028 CF
103
104
105
106
0029 E8 009E R
107
002C E8 0001 R
108
002F EB F4
109
110
0031 E8 009E R
1
1 1
0034 E8 OODC R
1 12
0037 72 F8
1 13
0039 EB EA
114
5-46
KEYBOARD (01/10/86)

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents