IBM Personal Computer MACRO Assembler
Version 2.00
PRT ------ 01/10/86
PRINTER ADAPTER BIOS
1-2
01-10-86
B45:
WA I T BUSY
B50:
PAGE
FUNCT I ON 90 PR I NTER 10
SYSTEM CALL
SA VE CALLER S ( CX)
REG I STER
I NNER LOOP (64K)
GET STATUS
STATUS TO (AHI
ALSO
I S THE PR INTER CURRENTLY BUSY
GO TO OUTPUT STROBE
LOOP IF NOT
DECREMENT OUTER LOOP COUNT
MAKE ANOTHER PASS I F NOT ZERO
RESTORE
(CX)
WITH CALLERS VALUE
SET ERROR FLAG
TURN OFF THE UNUSED BITS
RETURN WITH ERROR FLAG SET
SEND STROBE PULSE
RESTORE
(CX)
WITH CALLERS VALUE
SET THE STROBE LOW (B I T ON)
OUTPUT STROBE TO CONTROL PORT
PREVENT I NTERRUPT PULSE STRETCH I NG
OUTPUT STROBE BIT
>
1us
<
5us
I
/0
DELA Y TO ALLOW FOR LINE LOAD I NG
AND FOR CORRECT PULSE WIDTH
SET THE - STROBE HIGH
I NTERRUPTS BACK ON
ADJUST BACK TO BASE ADDRESS
FOR STATUS ROUTINE EXIT
NO INTERRUPTS, NON AUTO LF,
I NIT HIGH
SET DEFAULT I N I TI AL OUTPUTS
ADJUST BACK TO BASE ADDRESS
FOR STATUS ROUT I NE EX
I T
EX I T THROUGH STATUS ROUT I NE
RECOVER CHARACTER
INTO (AL) REG I STER
FLI P A COUPLE OF BITS
I N STATUS
RETURN FROM ROUT I NE WITH STATUS
IN AH
; PO I NT TO OUTPUT PORT
SET INIT LINE LOW
ADJUS T FOR I NIT I ALI ZA TI ON DEL AY LOOP
DECREMENT DELAY COUNTER
LOOP FOR RESET TO TAKE
; PO I NT TO CONTROL PORT
PRE-CHARGE +BUSY LINE IF FLOATING
GET PR I NTER STATUS HARDWARE BITS
TURN OFF UNUSED BITS
SAVE
; PRE-CHARGE +BUSY LINE IF FLOATING
GET STATUS PORT VALUE
I S THE PR INTER CURRENTLY BUS Y
SK I P SYSTEM DEV I CE BUSY CALL I F NOT
AX
B90
AL,OCH
DX,AL
OX
OX
B60
ENDP
ENDS
I N I TI ALI ZE THE PR I NTER PORT
MOV
OUT
DEC
DEC
JMP
INC
OX
IN
AL,DX
IN
AL,DX
AND
AL,OF8H
MOV
AH,AL
MOV
AL,BH
XOR
AH,48H
JMP
B20
INC
OX
INC
OX
MOV
AL,8
OUT
DX,AL
MOV
AX, 1000
DEC
JNZ
PR I NTER STATUS
PUSH
CX
SUB
CX,CX
IN
AL,DX
IN
AL,DX
TEST
AL,80H
JNZ
B40
I NT 15 H - -
DEV I CE BUS Y
IN
AL,DX
MOV
AH,AL
TEST
AL,80H
JNZ
B50
LOOP
B45
DEC
BL
JNZ
B45
CHECK FOR PR I NTER BUSY
MOV
AX, 90FEH
INT
15H
POP
CX
OR
AH,I
AND
AH,OF9H
JMP
SHORT B70
MOV
AL,OCH
OUT
DX,AL
STI
DEC
OX
DEC
OX
POP
CX
MOV
AL,ODH
INC
OX
CLI
OUT
DX,AL
JMP
S+2
B80:
B70:
B90:
PR INTER_IO_1
CODE
END
B60:
B40:
96
97
98
99
0034 EC
100
0035 EC
101
0036 A8 80
102
0038 75 05
103
104
105
106
003A B8 90FE
107
0030 CD 15
108
109
I 10
I II
003F
112
003F 51
1 13
0040 2B C9
114
0042
115
0042 EC
1 16
0043 8A EO
1 17
0045 A8 80
I
18
0047 75 OF
119
120
0049 E2 F7
121
122
004B FE CB
123
0040 75 F3
124
125
004F 59
126
0050 80 CC 0
I
127
0053 80 E4 F9
128
0056 EB 15
129
130
0058
131
0058 59
132
0059 BO 00
133
005B 42
134
005C FA
13~
0050 EE
136
005E EB 00
137
138
0060 BO OC
139
0062 EE
140
0063 FB
141
0064 4A
142
0065 4A
143
144
145
146
147
0066
148
0066 42
149
0067 EC
150
0068 EC
151
0069 24 F8
152
006B 8A EO
153
0060
154
0060 8A C7
155
006F 80 F4 48
156
0072 EB BB
157
158
159
160
161
0074
162
0074 42
163
0075 42
164
0076 BO 08
165
0078 EE
166
0079 B8 03E8
167
007C
168
007C 48
169
0070 75 FD
170
171
007F BO OC
172
0081
EE
173
0082 4A
174
0083 4A
175
0084 EB EO
176
177
0086
178
179
0086
180
5-58
PRINTER (01/10/86)