annotate level1/modules/sio.asm @ 1498:ff6eaf6b935e

Removed
author boisy
date Thu, 25 Dec 2003 13:51:27 +0000
parents bc58ae73351e
children cb587a441cae
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1475
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
1 ********************************************************************
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
2 * SIO - CoCo Serial driver
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
3 *
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
4 * $Id$
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
5 *
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
6 * Edt/Rev YYYY/MM/DD Modified by
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
7 * Comment
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
8 * ------------------------------------------------------------------
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
9 * 9 ????/??/?? ???
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
10 * Original Tandy L2 distribution version.
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
11 *
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
12 * 10 ????/??/?? ???
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
13 * Added baud delay table for NitrOS-9.
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
14 *
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
15 * 11 2003/12/15 Boisy G. Pitre
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
16 * Merged Level 1 and Level 2 sources for now.
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
17
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
18 nam SIO
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
19 ttl CoCo Serial driver
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
20
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
21 * Disassembled 98/08/23 20:58:36 by Disasm v1.6 (C) 1988 by RML
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
22
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
23 ifp1
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
24 use defsfile
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
25 endc
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
26
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
27 tylg set Drivr+Objct
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
28 atrv set ReEnt+rev
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
29 rev set $00
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
30 edition set 9
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
31
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
32 mod eom,name,tylg,atrv,start,size
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
33
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
34 fcb UPDAT.
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
35
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
36 name fcs /SIO/
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
37 fcb edition
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
38
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
39 IFGT Level-1
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
40
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
41 u0000 rmb 29
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
42 u001D rmb 1
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
43 u001E rmb 1
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
44 u001F rmb 1
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
45 u0020 rmb 2
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
46 u0022 rmb 2
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
47 u0024 rmb 1
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
48 u0025 rmb 1
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
49 size equ .
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
50
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
51 * Baud Rate Delay Table
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
52 DelayTbl
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
53 IFEQ H6309
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
54 * 6809 delay values (1.89MHz)
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
55 fdb $090C 110 baud
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
56 fdb $034C 300 baud
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
57 fdb $01A2 600 baud
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
58 fdb $00CE 1200 baud
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
59 fdb $0062 2400 baud
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
60 fdb $002E 4800 baud
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
61 fdb $0012 9600 baud
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
62 fdb $0003 32000 baud
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
63 ELSE
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
64 * 6309 native mode delay values (1.89MHz)
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
65 fdb $090C 110 baud (Unchanged, unknown)
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
66 fdb $03D0 300 baud
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
67 fdb $01A2 600 baud (Unchanged, unknown)
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
68 fdb $00F0 1200 baud
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
69 fdb $0073 2400 baud
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
70 fdb $0036 4800 baud
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
71 fdb $0017 9600 baud
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
72 fdb $0003 32000 baud (Unchanged, unknown)
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
73 ENDC
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
74
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
75 start lbra Init
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
76 lbra Read
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
77 lbra Write
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
78 lbra GetStat
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
79 lbra SetStat
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
80 lbra Term
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
81
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
82 * Init
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
83 *
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
84 * Entry:
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
85 * Y = address of device descriptor
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
86 * U = address of device memory area
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
87 *
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
88 * Exit:
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
89 * CC = carry set on error
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
90 * B = error code
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
91 *
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
92 Init pshs cc
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
93 orcc #IntMasks
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
94 ldx #PIA1Base
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
95 clr $01,x
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
96 ldd <IT.COL,y get col/row bytes
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
97 std <u0024,u
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
98 lda #$FE
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
99 sta ,x
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
100 lda #$36
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
101 sta $01,x
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
102 lda ,x
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
103 ldd <IT.PAR,y get parity/baud
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
104 lbsr L0148
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
105 puls cc
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
106 clrb
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
107
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
108 * Term
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
109 *
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
110 * Entry:
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
111 * U = address of device memory area
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
112 *
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
113 * Exit:
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
114 * CC = carry set on error
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
115 * B = error code
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
116 *
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
117 Term rts
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
118
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
119 * Read
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
120 *
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
121 * Entry:
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
122 * Y = address of path descriptor
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
123 * U = address of device memory area
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
124 *
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
125 * Exit:
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
126 * A = character read
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
127 * CC = carry set on error
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
128 * B = error code
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
129 *
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
130 Read bsr L00AC
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
131 bcs L00C8
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
132 ldb #$08
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
133 pshs b,cc
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
134 tst <u001E,u
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
135 beq L0066
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
136 dec $01,s
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
137 L0066 bra L0077
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
138 L0068 lda <PD.BAU,y
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
139 anda #$0F
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
140 cmpa #$07
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
141 beq L0077
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
142 ldx #$0001
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
143 os9 F$Sleep
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
144 L0077 pshs y
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
145 ldy #$FFFF
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
146 L007D lda >PIA1Base+2
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
147 leay -$01,y
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
148 beq L008B
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
149 lsra
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
150 bcs L007D
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
151 puls y
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
152 bra L0090
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
153 L008B puls y
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
154 lsra
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
155 bcs L0068
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
156 L0090 orcc #IntMasks
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
157 clra
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
158 bsr L00D5
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
159 L0095 bsr L00CE
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
160 ldb >PIA1Base+2
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
161 lsrb
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
162 rora
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
163 dec $01,s
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
164 bne L0095
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
165 bsr L00D5
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
166 tst <u001E,u
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
167 beq L00A8
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
168 lsra
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
169 L00A8 puls b,cc
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
170 clrb
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
171 rts
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
172 L00AC pshs a
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
173 lda <PD.BAU,y
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
174 anda #$0F
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
175 cmpa #$08
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
176 bcc L00C4
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
177 lsla
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
178 leax >DelayTbl,pcr
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
179 ldd a,x
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
180 std <u0020,u
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
181 clrb
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
182 puls pc,a
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
183 L00C4 ldb #E$BMode
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
184 puls a
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
185 L00C8 orcc #Carry
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
186 rts
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
187 L00CB stb >PIA1Base
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
188 L00CE pshs b,a
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
189 ldd <u0020,u
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
190 bra L00DC
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
191 L00D5 pshs b,a
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
192 ldd <u0020,u
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
193 lsra
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
194 rorb
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
195 L00DC subd #$0001
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
196 bne L00DC
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
197 puls pc,b,a
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
198
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
199 * Write
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
200 *
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
201 * Entry:
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
202 * A = character to write
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
203 * Y = address of path descriptor
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
204 * U = address of device memory area
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
205 *
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
206 * Exit:
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
207 * CC = carry set on error
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
208 * B = error code
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
209 *
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
210 Write bsr L00AC
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
211 bcs L00C8
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
212 ldb #$09
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
213 pshs b,cc
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
214 orcc #IntMasks
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
215 tst <u001E,u
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
216 beq L00F4
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
217 dec $01,s
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
218 L00F4 andcc #^Carry
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
219 L00F6 ldb #$02
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
220 bcs L00FB
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
221 clrb
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
222 L00FB bsr L00CB
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
223 lsra
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
224 dec $01,s
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
225 bne L00F6
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
226 ldb <u001D,u
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
227 beq L010B
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
228 andb #$FE
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
229 bsr L00CB
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
230 L010B ldb #$02
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
231 bsr L00CB
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
232 tst <u001F,u
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
233 beq L0118
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
234 ldb #$02
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
235 bsr L00CB
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
236 L0118 puls pc,b,cc
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
237
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
238 * GetStat
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
239 *
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
240 * Entry:
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
241 * A = function code
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
242 * Y = address of path descriptor
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
243 * U = address of device memory area
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
244 *
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
245 * Exit:
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
246 * CC = carry set on error
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
247 * B = error code
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
248 *
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
249 GetStat cmpa #SS.EOF
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
250 bne L0120
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
251 L011E clrb
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
252 rts
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
253 L0120 ldx PD.RGS,y
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
254 cmpa #SS.ScSiz
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
255 beq L0131
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
256 cmpa #SS.ComSt
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
257 bne L017E
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
258 ldd <u0022,u
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
259 std R$Y,x
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
260 bra L011E
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
261 L0131 ldx PD.RGS,y
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
262 clra
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
263 ldb <u0024,u
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
264 std R$X,x
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
265 ldb <u0025,u
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
266 std R$Y,x
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
267 bra L011E
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
268
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
269 * SetStat
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
270 *
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
271 * Entry:
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
272 * A = function code
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
273 * Y = address of path descriptor
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
274 * U = address of device memory area
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
275 *
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
276 * Exit:
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
277 * CC = carry set on error
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
278 * B = error code
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
279 *
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
280 SetStat cmpa #SS.ComSt
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
281 bne L017E
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
282 ldx PD.RGS,y
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
283 ldd R$Y,x
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
284 L0148 std <u0022,u
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
285 clra
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
286 clrb
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
287 std <u001D,u
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
288 sta <u001F,u
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
289 ldd <u0022,u
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
290 tstb
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
291 bpl L015C
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
292 inc <u001F,u
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
293 L015C bitb #$40
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
294 bne L017A
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
295 bitb #$20
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
296 beq L0167
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
297 inc <u001E,u
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
298 L0167 bita #$20
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
299 beq L0179
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
300 bita #$80
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
301 beq L017A
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
302 inc <u001D,u
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
303 bita #$40
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
304 bne L0179
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
305 inc <u001D,u
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
306 L0179 rts
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
307 L017A comb
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
308 ldb #E$BMode
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
309 rts
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
310 L017E comb
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
311 ldb #E$UnkSvc
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
312 rts
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
313
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
314 emod
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
315 eom equ *
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
316 end
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
317
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
318 ELSE
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
319
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
320 rmb V.SCF
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
321 u001D rmb 1
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
322 u001E rmb 1
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
323 u001F rmb 1
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
324 BaudCnt rmb 2 baud rate counter
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
325 u0022 rmb 2
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
326 u0024 rmb 1
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
327 u0025 rmb 1
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
328 size equ .
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
329
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
330 BaudTbl fdb $0482 110 baud
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
331 fdb $01A2 300 baud
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
332 fdb $00CD 600 baud
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
333 fdb $0063 1200 baud
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
334 fdb $002D 2400 baud
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
335 fdb $0013 4800 baud
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
336 fdb $0005 9600 baud
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
337
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
338 start lbra Init
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
339 lbra Read
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
340 lbra Write
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
341 lbra GetStat
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
342 lbra SetStat
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
343 lbra Term
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
344
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
345 * Init
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
346 *
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
347 * Entry:
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
348 * Y = address of device descriptor
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
349 * U = address of device memory area
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
350 *
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
351 * Exit:
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
352 * CC = carry set on error
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
353 * B = error code
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
354 *
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
355 Init pshs cc
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
356 orcc #IntMasks
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
357 ldx #PIA1Base
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
358 clr $01,x
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
359 ldd <IT.COL,y get col/row bytes
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
360 std <u0024,u
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
361 lda #$FE
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
362 sta ,x
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
363 lda #$36
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
364 sta $01,x
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
365 lda ,x
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
366 ldd <IT.PAR,y get parity/baud
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
367 lbsr L014D
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
368 puls cc
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
369 clrb
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
370
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
371 * Term
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
372 *
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
373 * Entry:
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
374 * U = address of device memory area
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
375 *
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
376 * Exit:
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
377 * CC = carry set on error
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
378 * B = error code
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
379 *
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
380 Term rts
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
381
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
382 * Read
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
383 *
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
384 * Entry:
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
385 * Y = address of path descriptor
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
386 * U = address of device memory area
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
387 *
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
388 * Exit:
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
389 * A = character read
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
390 * CC = carry set on error
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
391 * B = error code
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
392 *
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
393 Read bsr L00B1
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
394 bcs L00CD
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
395 ldb #$08
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
396 pshs b,cc
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
397 tst <u001E,u
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
398 beq L0066
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
399 dec $01,s
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
400 L0066 bra L006E
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
401 L0068 ldx #$0001
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
402 os9 F$Sleep
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
403 L006E lda >PIA1Base+2
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
404 lsra
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
405 pshs x,a
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
406 lda >$FF69
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
407 bpl L0091
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
408 lda >PIA1Base+3
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
409 bita #$01
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
410 beq L0091
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
411 bita #$80
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
412 beq L0091
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
413 orcc #Entire
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
414 leax <L0091,pcr
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
415 pshs x
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
416 pshs u,y,x,dp,b,a,cc
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
417 jmp [D.SvcIRQ]
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
418 L0091 puls x,a
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
419 bcs L0068
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
420 orcc #IntMasks
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
421 clra
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
422 bsr L00DA
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
423 L009A bsr L00D3
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
424 ldb >PIA1Base+2
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
425 lsrb
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
426 rora
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
427 dec $01,s
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
428 bne L009A
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
429 bsr L00DA
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
430 tst <u001E,u
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
431 beq L00AD
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
432 lsra
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
433 L00AD puls b,cc
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
434 clrb
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
435 rts
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
436 L00B1 pshs a
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
437 lda <PD.BAU,y
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
438 anda #$0F mask out baud rate
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
439 cmpa #B19200
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
440 bcc L00C9
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
441 lsla
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
442 leax >BaudTbl,pcr
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
443 ldd a,x
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
444 std <BaudCnt,u
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
445 clrb
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
446 puls pc,a
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
447 L00C9 ldb #E$BMode
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
448 puls a
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
449 L00CD orcc #Carry
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
450 rts
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
451 L00D0 stb >PIA1Base
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
452 L00D3 pshs b,a
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
453 ldd <BaudCnt,u
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
454 bra L00E1
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
455 L00DA pshs b,a
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
456 ldd <BaudCnt,u
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
457 lsra
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
458 rorb
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
459 L00E1 subd #$0001
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
460 bne L00E1
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
461 puls pc,b,a
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
462
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
463 * Write
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
464 *
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
465 * Entry:
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
466 * A = character to write
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
467 * Y = address of path descriptor
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
468 * U = address of device memory area
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
469 *
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
470 * Exit:
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
471 * CC = carry set on error
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
472 * B = error code
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
473 *
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
474 Write bsr L00B1
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
475 bcs L00CD
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
476 ldb #$09
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
477 pshs b,cc
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
478 orcc #IntMasks
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
479 tst <u001E,u
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
480 beq L00F9
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
481 dec $01,s
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
482 L00F9 andcc #^Carry
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
483 L00FB ldb #$02
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
484 bcs L0100
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
485 clrb
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
486 L0100 bsr L00D0
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
487 lsra
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
488 dec $01,s
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
489 bne L00FB
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
490 ldb <u001D,u
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
491 beq L0110
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
492 andb #$FE
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
493 bsr L00D0
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
494 L0110 ldb #$02
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
495 bsr L00D0
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
496 tst <u001F,u
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
497 beq L011D
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
498 ldb #$02
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
499 bsr L00D0
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
500 L011D puls pc,b,cc
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
501
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
502 * GetStat
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
503 *
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
504 * Entry:
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
505 * A = function code
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
506 * Y = address of path descriptor
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
507 * U = address of device memory area
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
508 *
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
509 * Exit:
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
510 * CC = carry set on error
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
511 * B = error code
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
512 *
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
513 GetStat cmpa #SS.EOF
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
514 bne L0125
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
515 L0123 clrb
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
516 rts
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
517 L0125 ldx PD.RGS,y
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
518 cmpa #SS.ScSiz
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
519 beq L0136
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
520 cmpa #SS.ComSt
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
521 bne L0183
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
522 ldd <u0022,u
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
523 std R$Y,x
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
524 bra L0123
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
525 L0136 ldx PD.RGS,y
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
526 clra
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
527 ldb <u0024,u
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
528 std R$X,x
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
529 ldb <u0025,u
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
530 std R$Y,x
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
531 bra L0123
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
532
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
533 * SetStat
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
534 *
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
535 * Entry:
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
536 * A = function code
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
537 * Y = address of path descriptor
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
538 * U = address of device memory area
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
539 *
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
540 * Exit:
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
541 * CC = carry set on error
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
542 * B = error code
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
543 *
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
544 SetStat cmpa #SS.ComSt
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
545 bne L0183
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
546 ldx PD.RGS,y
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
547 ldd R$Y,x
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
548 L014D std <u0022,u
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
549 clra
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
550 clrb
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
551 std <u001D,u
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
552 sta <u001F,u
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
553 ldd <u0022,u
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
554 tstb
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
555 bpl L0161
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
556 inc <u001F,u
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
557 L0161 bitb #$40
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
558 bne L017F
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
559 bitb #$20
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
560 beq L016C
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
561 inc <u001E,u
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
562 L016C bita #$20
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
563 beq L017E
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
564 bita #$80
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
565 beq L017F
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
566 inc <u001D,u
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
567 bita #$40
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
568 bne L017E
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
569 inc <u001D,u
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
570 L017E rts
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
571 L017F comb
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
572 ldb <E$BMode
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
573 rts
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
574 L0183 comb
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
575 ldb #E$UnkSvc
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
576 rts
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
577
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
578 emod
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
579 eom equ *
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
580 end
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
581
bc58ae73351e sio replaces rs232
boisy
parents:
diff changeset
582 ENDC