annotate level1/modules/printer.asm @ 1287:10957d54bf16

Made all modules rev 0
author boisy
date Sat, 30 Aug 2003 20:16:51 +0000
parents 4e235f213651
children 68bc2285ea17
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1 ********************************************************************
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
2 * PRINTER - CoCo serial port printer driver
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
3 *
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
4 * $Id$
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
5 *
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
6 * Ed. Comments Who YY/MM/DD
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
7 * ------------------------------------------------------------------
201
668388823050 Fixed headers to be consistent
boisy
parents: 0
diff changeset
8 * 10 From Tandy OS-9 Level One VR 02.00.00
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
9
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
10 nam PRINTER
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
11 ttl CoCo serial port printer driver
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
12
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
13 * Disassembled 98/08/23 17:32:06 by Disasm v1.6 (C) 1988 by RML
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
14
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
15 ifp1
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
16 use defsfile
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
17 use scfdefs
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
18 endc
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
19
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
20 tylg set Drivr+Objct
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
21 atrv set ReEnt+rev
1287
10957d54bf16 Made all modules rev 0
boisy
parents: 1213
diff changeset
22 rev set $00
201
668388823050 Fixed headers to be consistent
boisy
parents: 0
diff changeset
23 edition set 10
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
24
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
25 mod eom,name,tylg,atrv,start,size
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
26
257
c93ecc262253 More source enhancements
boisy
parents: 256
diff changeset
27 rmb V.SCF
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
28 u001D rmb 1
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
29 u001E rmb 1
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
30 u001F rmb 1
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
31 u0020 rmb 2
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
32 u0022 rmb 1
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
33 u0023 rmb 1
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
34 u0024 rmb 2
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
35 u0026 rmb 2
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
36 u0028 rmb 1
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
37 size equ .
256
9e9648e17298 Additional source improvements
boisy
parents: 201
diff changeset
38
9e9648e17298 Additional source improvements
boisy
parents: 201
diff changeset
39 fcb UPDAT.
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
40
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
41 name fcs /PRINTER/
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
42 fcb edition
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
43
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
44 L0016 fcb $04
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
45 fcb $82
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
46 fcb $01
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
47 fcb $A2 "
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
48 fcb $00
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
49 fcb $CD M
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
50 fcb $00
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
51 fcb $63 c
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
52 fcb $00
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
53 fcb $2D -
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
54 fcb $00
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
55 fcb $13
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
56 fcb $00
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
57 fcb $05
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
58
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
59 start lbra Init
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
60 lbra Read
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
61 lbra Write
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
62 lbra GetStat
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
63 lbra SetStat
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
64 lbra Term
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
65
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
66 * Init
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
67 *
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
68 * Entry:
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
69 * Y = address of device descriptor
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
70 * U = address of device memory area
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
71 *
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
72 * Exit:
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
73 * CC = carry set on error
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
74 * B = error code
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
75 *
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
76 Init pshs cc
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
77 orcc #IntMasks
1213
4e235f213651 Lots of changes: bootscripts and bootlists added, sources massaged...
boisy
parents: 257
diff changeset
78 ldx #PIA1Base
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
79 clr $01,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
80 ldd <IT.COL,y get column size
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
81 std <u0022,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
82 lda #$FE
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
83 sta ,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
84 lda #$36
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
85 sta $01,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
86 lda ,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
87 ldd <IT.PAR,y get parity/baud
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
88 lbsr L0155
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
89 puls cc
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
90 lbsr L0104
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
91 lbcs L0100
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
92
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
93 * Term
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
94 *
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
95 * Entry:
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
96 * U = address of device memory area
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
97 *
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
98 * Exit:
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
99 * CC = carry set on error
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
100 * B = error code
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
101 *
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
102 Term rts
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
103
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
104 L005F pshs a
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
105 lda <$35,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
106 anda #$0F
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
107 cmpa #$07
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
108 bcc L0076
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
109 lsla
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
110 leax <L0016,pcr
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
111 ldd a,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
112 std <u0024,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
113 clrb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
114 puls pc,a
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
115 L0076 ldb #E$BMode
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
116 puls a
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
117 L007A orcc #Carry
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
118 rts
1213
4e235f213651 Lots of changes: bootscripts and bootlists added, sources massaged...
boisy
parents: 257
diff changeset
119 L007D stb >PIA1Base
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
120 L0080 pshs b,a
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
121 ldd <u0024,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
122 L0085 subd #$0001
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
123 bne L0085
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
124 puls pc,b,a
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
125
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
126 * Write
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
127 *
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
128 * Entry:
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
129 * A = character to write
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
130 * Y = address of path descriptor
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
131 * U = address of device memory area
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
132 *
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
133 * Exit:
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
134 * CC = carry set on error
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
135 * B = error code
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
136 *
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
137 Write bsr L005F
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
138 bcs L007A
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
139 pshs b,a
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
140 bsr L00CB
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
141 puls b,a
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
142 bcs L0100
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
143 ldb #$09
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
144 pshs b,cc
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
145 orcc #IntMasks
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
146 tst <u001E,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
147 beq L00A5
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
148 dec $01,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
149 L00A5 andcc #^Carry
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
150 L00A7 ldb #$02
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
151 bcs L00AC
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
152 clrb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
153 L00AC bsr L007D
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
154 lsra
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
155 dec $01,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
156 bne L00A7
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
157 ldb <u001D,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
158 beq L00BC
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
159 andb #$FE
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
160 bsr L007D
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
161 L00BC ldb #$02
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
162 bsr L007D
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
163 tst <u001F,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
164 beq L00C9
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
165 ldb #$02
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
166 bsr L007D
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
167 L00C9 puls pc,b,cc
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
168 L00CB clra
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
169 clrb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
170 std <u0026,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
171 L00D0 ldd #$0303
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
172 L00D3 bsr L0104
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
173 bcs L00DE
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
174 bsr L0080
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
175 decb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
176 bne L00D3
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
177 clrb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
178 rts
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
179 L00DE bsr L0080
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
180 deca
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
181 bne L00D3
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
182 pshs x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
183 ldx #$0001
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
184 os9 F$Sleep
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
185 puls x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
186 ldd <u0026,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
187 addd #$0001
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
188 std <u0026,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
189 ldb <u0028,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
190 beq L00D0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
191 cmpb <u0026,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
192 bhi L00D0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
193 L0100 comb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
194 ldb #E$NotRdy
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
195 rts
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
196 L0104 pshs x,b,a
1213
4e235f213651 Lots of changes: bootscripts and bootlists added, sources massaged...
boisy
parents: 257
diff changeset
197 ldb >PIA1Base+2
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
198 lda >$FF69
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
199 bpl L0126
1213
4e235f213651 Lots of changes: bootscripts and bootlists added, sources massaged...
boisy
parents: 257
diff changeset
200 lda >PIA1Base+3
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
201 bita #$01
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
202 beq L0126
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
203 bita #$80
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
204 beq L0126
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
205 orcc #Entire
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
206 leax <L0126,pcr
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
207 pshs x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
208 pshs u,y,x,dp,b,a,cc
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
209 jmp [D.SvcIRQ]
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
210 L0126 lsrb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
211 puls pc,x,b,a
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
212
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
213 * GetStat
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
214 *
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
215 * Entry:
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
216 * A = function code
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
217 * Y = address of path descriptor
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
218 * U = address of device memory area
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
219 *
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
220 * Exit:
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
221 * CC = carry set on error
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
222 * B = error code
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
223 *
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
224 GetStat cmpa #SS.EOF
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
225 bne L012F
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
226 L012D clrb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
227 rts
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
228 L012F ldx PD.RGS,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
229 cmpa #SS.ScSiz
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
230 beq L0140
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
231 cmpa #SS.ComSt
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
232 bne L0190
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
233 ldd <u0020,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
234 std R$Y,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
235 bra L012D
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
236 L0140 clra
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
237 ldb <u0022,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
238 std R$X,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
239 ldb <u0023,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
240 std R$Y,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
241 bra L012D
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
242
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
243 * GetStat
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
244 *
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
245 * Entry:
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
246 * A = function code
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
247 * Y = address of path descriptor
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
248 * U = address of device memory area
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
249 *
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
250 * Exit:
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
251 * CC = carry set on error
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
252 * B = error code
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
253 *
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
254 SetStat cmpa #SS.ComSt
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
255 bne L0190
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
256 ldx PD.RGS,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
257 ldd R$Y,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
258 L0155 std <u0020,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
259 clra
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
260 clrb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
261 std <u001D,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
262 sta <u001F,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
263 ldd <u0020,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
264 tstb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
265 bpl L0169
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
266 inc <u001F,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
267 L0169 bitb #$40
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
268 bne Read
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
269 bitb #$20
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
270 beq L0174
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
271 inc <u001E,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
272 L0174 bita #$20
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
273 beq L0186
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
274 bita #$80
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
275 beq Read
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
276 inc <u001D,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
277 bita #$40
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
278 bne L0186
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
279 inc <u001D,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
280 L0186 anda #$0F
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
281 sta <u0028,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
282 rts
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
283
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
284 * Read
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
285 *
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
286 * Entry:
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
287 * Y = address of path descriptor
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
288 * U = address of device memory area
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
289 *
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
290 * Exit:
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
291 * A = character read
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
292 * CC = carry set on error
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
293 * B = error code
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
294 *
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
295 Read comb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
296 ldb <E$BMode
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
297 rts
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
298
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
299 L0190 comb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
300 ldb #E$UnkSvc
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
301 rts
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
302
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
303 emod
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
304 eom equ *
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
305 end
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
306