annotate level1/modules/rbf.asm @ 206:a4bb7f96b6b7

Slight change
author boisy
date Mon, 15 Jul 2002 04:50:36 +0000
parents 668388823050
children bdd2f61d5dbc
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 * RBF - Disk file manager
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 * 24 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 RBF
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
11 ttl Disk file manager
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
12
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
13 * Disassembled 98/08/23 18:26:52 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 rbfdefs
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 FlMgr+Objct
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
21 atrv set ReEnt+rev
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
22 rev set $01
201
668388823050 Fixed headers to be consistent
boisy
parents: 0
diff changeset
23 edition set 24
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
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
27 u0000 rmb 0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
28 size equ .
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
29
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
30 name fcs /RBF/
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
31 fcb edition
206
a4bb7f96b6b7 Slight change
boisy
parents: 201
diff changeset
32
a4bb7f96b6b7 Slight change
boisy
parents: 201
diff changeset
33 L0011 fcb DRVMEM
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
34
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
35 * All routines are entered with
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
36 * (Y) = Path descriptor pointer
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
37 * (U) = Caller's register stack pointer
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
38 start lbra Create
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
39 lbra Open
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
40 lbra MakDir
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
41 lbra ChgDir
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
42 lbra Delete
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
43 lbra Seek
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
44 lbra Read
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
45 lbra Write
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
46 lbra ReadLn
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
47 lbra WriteLn
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
48 lbra GetStat
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
49 lbra SetStat
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
50 lbra Close
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
51
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
52 Create pshs y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
53 leas -$05,s make room on the stack
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
54 lda R$B,u get perms
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
55 anda #^DIR. mask off dir bit
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
56 sta R$B,u save perms back
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
57 lbsr L061D
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
58 bcs L004A
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
59 ldb #$DA
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
60 L004A cmpb #$D8
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
61 bne L0072
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
62 cmpa #PDELIM
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
63 beq L0072
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
64 pshs x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
65 ldx PD.RGS,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
66 stu R$X,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
67 ldb <PD.SBP,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
68 ldx <PD.SBP+1,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
69 lda <PD.SSZ,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
70 ldu <PD.SSZ+1,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
71 pshs u,x,b,a
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
72 clra
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
73 ldb #$01
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
74 lbsr L0966
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
75 bcc L0077
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
76 leas $06,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
77 L0070 leas $02,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
78 L0072 leas $05,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
79 lbra L027F
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
80 L0077 std $0B,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
81 ldb <PD.SBP,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
82 ldx <PD.SBP+1,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
83 stb $08,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
84 stx $09,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
85 puls u,x,b,a
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
86 stb <PD.SBP,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
87 stx <PD.SBP+1,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
88 sta <PD.SSZ,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
89 stu <PD.SSZ+1,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
90 ldd <PD.DCP,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
91 std $0B,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
92 ldd <PD.DCP+2,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
93 std $0D,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
94 lbsr L079C
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
95 bcs L00A9
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
96 L00A0 tst ,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
97 beq L00BB
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
98 lbsr L0787
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
99 bcc L00A0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
100 L00A9 cmpb #$D3
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
101 bne L0070
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
102 ldd #$0020
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
103 lbsr L04C0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
104 bcs L0070
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
105 lbsr L0243
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
106 lbsr L079C
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
107 L00BB leau ,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
108 lbsr L015C
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
109 puls x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
110 os9 F$PrsNam
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
111 bcs L0072
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
112 cmpb #$1D
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
113 bls L00CD
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
114 ldb #$1D
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
115 L00CD clra
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
116 tfr d,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
117 lbsr L04F2
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
118 tfr y,d
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
119 ldy $05,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
120 decb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
121 lda b,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
122 ora #$80
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
123 sta b,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
124 ldb ,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
125 ldx $01,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
126 stb <$1D,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
127 stx <$1E,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
128 lbsr L0D40
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
129 bcs L0144
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
130 ldu $08,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
131 bsr L0163
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
132 lda #$04
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
133 sta $0A,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
134 ldx $06,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
135 lda $02,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
136 sta ,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
137 ldx <$004B
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
138 ldd $09,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
139 std $01,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
140 lbsr L0290
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
141 ldd $03,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
142 std $0D,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
143 ldb $05,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
144 stb $0F,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
145 ldb #$01
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
146 stb $08,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
147 ldd $03,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
148 subd #$0001
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
149 beq L012A
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
150 leax <$10,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
151 std $03,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
152 ldd $01,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
153 addd #$0001
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
154 std $01,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
155 ldb ,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
156 adcb #$00
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
157 stb ,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
158 L012A ldb ,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
159 ldx $01,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
160 lbsr L0D42
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
161 bcs L0144
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
162 lbsr L0837
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
163 stb <$34,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
164 stx <$35,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
165 lbsr L082B
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
166 leas $05,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
167 lbra L01C4
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
168 L0144 puls u,x,a
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
169 sta <$16,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
170 stx <$17,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
171 clr <$19,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
172 stu <$1A,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
173 pshs b
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
174 lbsr L0B6E
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
175 puls b
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
176 L0159 lbra L027F
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
177 L015C pshs u,x,b,a
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
178 leau <$20,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
179 bra L0169
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
180 L0163 pshs u,x,b,a
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
181 leau >$0100,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
182 L0169 clra
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
183 clrb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
184 tfr d,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
185 L016D pshu x,b,a
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
186 cmpu $04,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
187 bhi L016D
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
188 puls pc,u,x,b,a
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
189
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
190 Open pshs y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
191 lbsr L061D
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
192 bcs L0159
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
193 ldu PD.RGS,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
194 stx R$X,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
195 ldd <PD.FD+1,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
196 bne L01B3
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
197 lda <PD.FD,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
198 bne L01B3
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
199 ldb PD.MOD,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
200 andb #DIR.
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
201 lbne L027D
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
202 std <PD.SBP,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
203 sta <PD.SBP+2,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
204 std <PD.SBL,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
205 sta <PD.SBL+2,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
206 ldx <PD.DTB,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
207 lda V$STAT,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
208 std <PD.SIZ+2,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
209 sta <PD.SSZ+2,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
210 ldd V$DRIV,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
211 std PD.SIZ,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
212 std <PD.SSZ,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
213 puls pc,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
214
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
215 L01B3 lda PD.MOD,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
216 lbsr L07F1
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
217 bcs L0159
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
218 bita #$02
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
219 beq L01C4
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
220 lbsr L0290
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
221 lbsr L0D38
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
222 L01C4 puls y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
223 L01C6 clra
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
224 clrb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
225 std $0B,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
226 std $0D,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
227 std <$13,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
228 sta <$15,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
229 sta <$19,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
230 lda ,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
231 sta <$33,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
232 ldd <$10,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
233 std <$16,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
234 lda <$12,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
235 sta <$18,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
236 ldd <$13,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
237 std <$1A,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
238 ldd $09,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
239 ldx $0B,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
240 std $0F,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
241 stx <$11,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
242 clr $0A,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
243 rts
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
244
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
245 MakDir lbsr Create
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
246 bcs L0241
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
247 ldd #$0040
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
248 std <$11,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
249 bsr L0253
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
250 bcs L0241
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
251 lbsr L0854
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
252 bcs L0241
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
253 lbsr L0CD4
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
254 ldu $08,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
255 lda ,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
256 ora #$80
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
257 sta ,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
258 bsr L0246
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
259 bcs L0241
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
260 lbsr L0163
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
261 ldd #$2EAE
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
262 std ,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
263 stb <$20,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
264 lda <$37,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
265 sta <$1D,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
266 ldd <$38,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
267 std <$1E,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
268 lda <$34,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
269 sta <$3D,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
270 ldd <$35,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
271 std <$3E,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
272 lbsr L0D40
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
273 L0241 bra L0282
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
274 L0243 lbsr L0CD4
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
275 L0246 ldx $08,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
276 ldd $0F,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
277 std $09,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
278 ldd <$11,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
279 std $0B,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
280 clr $0A,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
281 L0253 lbra L0D38
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
282
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
283 Close clra
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
284 tst $02,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
285 bne L027C
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
286 lbsr L0D72
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
287 bcs L0282
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
288 ldb $01,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
289 bitb #$02
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
290 beq L0282
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
291 ldd <$34,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
292 bne L0270
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
293 lda <$36,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
294 beq L0282
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
295 L0270 bsr L0243
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
296 lbsr L0529
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
297 bcc L0282
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
298 lbsr L0AAF
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
299 bra L0282
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
300 L027C rts
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
301 L027D ldb #$D6
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
302 L027F coma
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
303 L0280 puls y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
304 L0282 pshs b,cc
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
305 ldu $08,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
306 beq L028E
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
307 ldd #$0100
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
308 os9 F$SRtMem
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
309 L028E puls pc,b,cc
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
310 L0290 lbsr L0CD4
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
311 ldu $08,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
312 lda $08,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
313 pshs a
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
314 leax $03,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
315 os9 F$Time
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
316 puls a
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
317 sta $08,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
318 rts
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
319
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
320 ChgDir pshs y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
321 lda $01,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
322 ora #$80
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
323 sta $01,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
324 lbsr Open
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
325 bcs L0280
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
326 ldx <$004B
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
327 ldu <$35,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
328 ldb $01,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
329 bitb #$03
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
330 beq L02C4
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
331 ldb <$34,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
332 stb <$1D,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
333 stu <$1E,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
334 L02C4 ldb $01,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
335 bitb #$04
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
336 beq L02D3
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
337 ldb <$34,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
338 stb <$23,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
339 stu <$24,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
340 L02D3 clrb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
341 bra L0280
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
342
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
343 Delete pshs y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
344 lbsr L061D
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
345 bcs L0280
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
346 ldd <$35,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
347 bne L02E9
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
348 tst <$34,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
349 lbeq L027D
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
350 L02E9 lda #$42
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
351 lbsr L07F1
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
352 bcs L035F
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
353 ldu $06,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
354 stx $04,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
355 lbsr L0CD4
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
356 bcs L035F
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
357 ldx $08,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
358 dec $08,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
359 beq L0304
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
360 lbsr L0D38
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
361 bra L032A
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
362 L0304 clra
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
363 clrb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
364 std $0F,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
365 std <$11,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
366 lbsr L0AAF
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
367 bcs L035F
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
368 ldb <$34,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
369 ldx <$35,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
370 stb <$16,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
371 stx <$17,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
372 ldx $08,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
373 ldd <$13,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
374 addd #$0001
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
375 std <$1A,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
376 lbsr L0B6E
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
377 L032A bcs L035F
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
378 lbsr L0D72
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
379 lbsr L0837
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
380 lda <$37,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
381 sta <$34,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
382 ldd <$38,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
383 std <$35,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
384 lbsr L0CD4
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
385 bcs L035F
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
386 lbsr L082B
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
387 ldu $08,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
388 lbsr L01C6
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
389 ldd <$3A,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
390 std $0B,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
391 ldd <$3C,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
392 std $0D,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
393 lbsr L079C
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
394 bcs L035F
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
395 clr ,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
396 lbsr L0D40
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
397 L035F lbra L0280
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
398
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
399 Seek ldb $0A,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
400 bitb #$02
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
401 beq L037B
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
402 lda $05,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
403 ldb $08,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
404 subd $0C,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
405 bne L0376
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
406 lda $04,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
407 sbca $0B,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
408 beq L037F
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
409 L0376 lbsr L0D72
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
410 bcs L0383
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
411 L037B ldd $04,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
412 std $0B,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
413 L037F ldd $08,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
414 std $0D,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
415 L0383 rts
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
416
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
417 ReadLn bsr L03C4
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
418 beq L03AA
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
419 bsr L03AB
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
420 pshs u,y,x,b,a
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
421 exg x,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
422 ldy #$0000
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
423 lda #$0D
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
424 L0394 leay $01,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
425 cmpa ,x+
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
426 beq L039D
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
427 decb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
428 bne L0394
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
429 L039D ldx $06,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
430 bsr L03F4
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
431 sty $0A,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
432 puls u,y,x,b,a
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
433 ldd $02,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
434 leax d,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
435 L03AA rts
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
436 L03AB lbsr L0414
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
437 lda ,-x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
438 cmpa #$0D
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
439 beq L03BA
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
440 ldd $02,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
441 lbne L041A
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
442 L03BA ldu $06,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
443 ldd $06,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
444 subd $02,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
445 std $06,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
446 bra L040E
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
447 L03C4 ldd $06,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
448 bsr L03CD
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
449 bcs L03F1
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
450 std $06,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
451 rts
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
452 L03CD pshs b,a
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
453 ldd <$11,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
454 subd $0D,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
455 tfr d,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
456 ldd $0F,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
457 sbcb $0C,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
458 sbca $0B,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
459 bcs L03EE
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
460 bne L03EB
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
461 tstb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
462 bne L03EB
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
463 cmpx ,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
464 bcc L03EB
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
465 stx ,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
466 beq L03EE
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
467 L03EB clrb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
468 puls pc,b,a
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
469 L03EE comb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
470 ldb #E$EOF
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
471 L03F1 leas $02,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
472 rts
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
473 L03F4 lbra L04F2
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
474
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
475 Read bsr L03C4
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
476 beq L0409
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
477 bsr L040A
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
478 L03FD pshs u,y,x,b,a
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
479 exg x,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
480 tfr d,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
481 bsr L03F4
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
482 puls u,y,x,b,a
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
483 leax d,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
484 L0409 rts
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
485 L040A bsr L0414
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
486 bne L041A
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
487 L040E clrb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
488 L040F leas -$02,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
489 L0411 leas $0A,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
490 rts
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
491 L0414 ldd $04,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
492 ldx $06,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
493 pshs x,b,a
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
494 L041A lda $0A,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
495 bita #$02
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
496 bne L043A
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
497 tst $0E,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
498 bne L0435
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
499 tst $02,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
500 beq L0435
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
501 leax >L04A4,pcr
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
502 cmpx $06,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
503 bne L0435
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
504 lbsr L0C49
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
505 bra L0438
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
506 L0435 lbsr L0D91
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
507 L0438 bcs L040F
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
508 L043A ldu $08,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
509 clra
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
510 ldb $0E,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
511 leau d,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
512 negb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
513 sbca #$FF
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
514 ldx ,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
515 cmpd $02,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
516 bls L044D
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
517 ldd $02,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
518 L044D pshs b,a
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
519 jsr [<$08,s]
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
520 stx $02,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
521 lda $0A,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
522 anda #$BF
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
523 sta $0A,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
524 ldb $01,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
525 addb $0E,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
526 stb $0E,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
527 bne L0471
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
528 lbsr L0D72
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
529 inc $0D,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
530 bne L046F
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
531 inc $0C,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
532 bne L046F
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
533 inc $0B,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
534 L046F bcs L0411
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
535 L0471 ldd $04,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
536 subd ,s++
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
537 std $02,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
538 jmp [<$04,s]
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
539
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
540 WriteLn pshs y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
541 clrb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
542 ldy $06,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
543 beq L0498
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
544 ldx $04,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
545 L0484 leay -$01,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
546 beq L0498
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
547 lda ,x+
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
548 cmpa #$0D
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
549 bne L0484
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
550 tfr y,d
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
551 nega
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
552 negb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
553 sbca #$00
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
554 addd $06,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
555 std $06,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
556 L0498 puls y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
557
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
558 Write ldd $06,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
559 beq L04BE
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
560 bsr L04C0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
561 bcs L04BF
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
562 bsr L04B5
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
563 L04A4 pshs y,b,a
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
564 tfr d,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
565 bsr L04F2
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
566 puls y,b,a
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
567 leax d,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
568 lda $0A,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
569 ora #$03
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
570 sta $0A,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
571 rts
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
572 L04B5 lbsr L0414
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
573 lbne L041A
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
574 leas $08,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
575 L04BE clrb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
576 L04BF rts
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
577 L04C0 addd $0D,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
578 tfr d,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
579 ldd $0B,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
580 adcb #$00
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
581 adca #$00
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
582 L04CA cmpd $0F,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
583 bcs L04BE
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
584 bhi L04D6
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
585 cmpx <$11,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
586 bls L04BE
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
587 L04D6 pshs u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
588 ldu <$11,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
589 stx <$11,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
590 ldx $0F,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
591 std $0F,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
592 pshs u,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
593 lbsr L0854
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
594 puls u,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
595 bcc L04F0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
596 stx $0F,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
597 stu <$11,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
598 L04F0 puls pc,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
599 L04F2 pshs u,y,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
600 ldd $02,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
601 beq L051B
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
602 leay d,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
603 lsrb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
604 bcc L0501
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
605 lda ,x+
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
606 sta ,u+
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
607 L0501 lsrb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
608 bcc L0508
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
609 ldd ,x++
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
610 std ,u++
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
611 L0508 pshs y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
612 exg x,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
613 bra L0515
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
614 L050E pulu y,b,a
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
615 std ,x++
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
616 sty ,x++
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
617 L0515 cmpx ,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
618 bcs L050E
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
619 leas $02,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
620 L051B puls pc,u,y,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
621
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
622 GetSTat ldb $02,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
623 cmpb #$00
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
624 beq L0543
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
625 cmpb #$06
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
626 bne L052F
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
627 clr $02,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
628 L0529 clra
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
629 ldb #$01
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
630 lbra L03CD
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
631 L052F cmpb #$01
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
632 bne L0536
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
633 clr $02,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
634 rts
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
635 L0536 cmpb #$02
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
636 bne L0544
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
637 ldd $0F,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
638 std $04,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
639 ldd <$11,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
640 std $08,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
641 L0543 rts
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
642 L0544 cmpb #$05
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
643 bne L0551
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
644 ldd $0B,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
645 std $04,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
646 ldd $0D,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
647 std $08,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
648 rts
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
649 L0551 cmpb #$0F
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
650 bne L056B
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
651 lbsr L0CD4
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
652 bcs L0543
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
653 ldu $06,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
654 ldd $06,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
655 tsta
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
656 beq L0564
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
657 ldd #$0100
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
658 L0564 ldx $04,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
659 ldu $08,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
660 lbra L03FD
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
661 L056B lda #$09
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
662 lbra L0CED
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
663
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
664 SetStat ldb R$B,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
665 cmpb #SS.OPT
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
666 bne L0584
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
667 ldx R$X,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
668 leax $02,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
669 leau <PD.STP,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
670 ldy #$000D
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
671 lbra L04F2
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
672 L0584 cmpb #SS.Size
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
673 bne L05C6
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
674 ldd <PD.FD+1,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
675 bne L0594
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
676 tst <PD.FD,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
677 lbeq L0619
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
678 L0594 lda PD.MOD,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
679 bita #WRITE.
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
680 beq L05C2
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
681 ldd R$X,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
682 ldx R$U,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
683 cmpd $0F,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
684 bcs L05AD
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
685 bne L05AA
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
686 cmpx <PD.SIZ+2,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
687 bcs L05AD
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
688 L05AA lbra L04CA
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
689 L05AD std PD.SIZ,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
690 stx <PD.SIZ+2,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
691 ldd PD.CP,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
692 ldx PD.CP+2,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
693 pshs x,b,a
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
694 lbsr L0AAF
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
695 puls u,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
696 stx PD.CP,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
697 stu PD.CP+2,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
698 rts
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
699 L05C2 comb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
700 ldb #E$BMode
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
701 rts
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
702 L05C6 cmpb #$0F
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
703 bne L0604
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
704 lda $01,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
705 bita #$02
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
706 beq L05C2
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
707 lbsr L0CD4
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
708 bcs L061C
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
709 pshs y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
710 ldx $04,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
711 ldu $08,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
712 ldy <$004B
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
713 ldd $09,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
714 bne L05E7
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
715 ldd #$0102
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
716 bsr L05F6
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
717 L05E7 ldd #$0305
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
718 bsr L05F6
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
719 ldd #$0D03
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
720 bsr L05F6
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
721 puls y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
722 lbra L0D38
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
723 L05F6 pshs u,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
724 leax a,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
725 leau a,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
726 clra
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
727 tfr d,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
728 lbsr L04F2
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
729 puls pc,u,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
730 L0604 cmpb #$1E
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
731 bne L0614
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
732 ldx <$1E,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
733 lda $05,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
734 sta <$1E,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
735 clr <$1D,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
736 rts
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
737 L0614 lda #$0C
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
738 lbra L0CED
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
739 L0619 comb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
740 ldb #E$UnkSvc
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
741 L061C rts
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
742
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
743 L061D ldd #256
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
744 stb PD.BUF+2,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
745 os9 F$SRqMem
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
746 bcs L061C
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
747 stu PD.BUF,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
748 ldx PD.RGS,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
749 ldx R$X,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
750 pshs u,y,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
751 leas -$04,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
752 clra
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
753 clrb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
754 sta <PD.FD,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
755 std <PD.FD+1,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
756 std <PD.DSK,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
757 lda ,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
758 sta ,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
759 cmpa #PDELIM
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
760 bne L0654
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
761 lbsr L07BC
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
762 sta ,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
763 lbcs L0752
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
764 leax ,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
765 ldy $06,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
766 bra L0677
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
767 L0654 anda #$7F strip hi bit
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
768 cmpa #PENTIR raw?
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
769 beq L0677 branch if so
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
770 lda #PDELIM
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
771 sta ,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
772 leax -$01,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
773 lda $01,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
774 ldu <$004B
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
775 leau <$1A,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
776 bita #$24
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
777 beq L066D
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
778 leau $06,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
779 L066D ldb $03,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
780 stb <PD.FD,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
781 ldd $04,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
782 std <PD.FD+1,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
783 L0677 ldu $03,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
784 stu <PD.DVT,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
785 lda <PD.DRV,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
786 ldb >L0011,pcr
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
787 mul
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
788 addd $02,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
789 addd #$000F
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
790 std <PD.DTB,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
791 lda ,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
792 anda #$7F
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
793 cmpa #PENTIR
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
794 bne L0698
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
795 leax $01,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
796 bra L06BA
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
797 L0698 lbsr L0CC1
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
798 lbcs L075A
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
799 ldu PD.BUF,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
800 ldd $0E,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
801 std <PD.DSK,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
802 ldd <PD.FD+1,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
803 bne L06BA
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
804 lda <PD.FD,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
805 bne L06BA
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
806 lda $08,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
807 sta <PD.FD,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
808 ldd $09,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
809 std <PD.FD+1,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
810 L06BA stx $04,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
811 stx $08,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
812 L06BE lbsr L0D72
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
813 lbcs L075A
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
814 lda ,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
815 anda #$7F
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
816 cmpa #PENTIR
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
817 beq L06D4
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
818 lbsr L0CD4
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
819 lbcs L075A
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
820 L06D4 lbsr L082B
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
821 lda ,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
822 cmpa #PDELIM
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
823 bne L0734
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
824 clr $02,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
825 clr $03,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
826 lda $01,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
827 ora #$80
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
828 lbsr L07F1
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
829 bcs L0752
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
830 lbsr L01C6
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
831 ldx $08,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
832 leax $01,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
833 lbsr L07BC
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
834 std ,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
835 stx $04,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
836 sty $08,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
837 ldy $06,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
838 bcs L0752
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
839 lbsr L079C
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
840 bra L070A
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
841 L0705 bsr L075D
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
842 L0707 lbsr L0787
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
843 L070A bcs L0752
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
844 tst ,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
845 beq L0705
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
846 clra
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
847 ldb $01,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
848 leay ,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
849 ldx $04,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
850 os9 F$CmpNam
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
851 ldx $06,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
852 exg x,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
853 bcs L0707
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
854 bsr L076B
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
855 lda <$1D,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
856 sta <PD.FD,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
857 ldd <$1E,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
858 std <PD.FD+1,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
859 lbsr L0837
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
860 lbra L06BE
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
861 L0734 ldx $08,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
862 tsta
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
863 bmi L0741
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
864 os9 F$PrsNam
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
865 leax ,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
866 ldy $06,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
867 L0741 stx $04,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
868 clra
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
869 L0744 lda ,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
870 leas $04,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
871 pshs b,a,cc
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
872 lda $0A,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
873 anda #$BF
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
874 sta $0A,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
875 puls pc,u,y,x,b,a,cc
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
876 L0752 cmpb #$D3
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
877 bne L075A
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
878 bsr L075D
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
879 ldb #$D8
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
880 L075A coma
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
881 bra L0744
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
882 L075D pshs b,a
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
883 lda $04,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
884 cmpa #$2F
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
885 beq L0785
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
886 ldd $06,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
887 bne L0785
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
888 puls b,a
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
889 L076B pshs b,a
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
890 stx $06,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
891 lda <PD.FD,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
892 sta <PD.DFD,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
893 ldd <PD.FD+1,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
894 std <PD.DFD+1,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
895 ldd $0B,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
896 std <PD.DCP,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
897 ldd $0D,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
898 std <PD.DCP+2,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
899 L0785 puls pc,b,a
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
900
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
901 L0787 ldb $0E,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
902 addb #$20
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
903 stb $0E,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
904 bcc L079C
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
905 lbsr L0D72
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
906 inc $0D,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
907 bne L079C
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
908 inc $0C,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
909 bne L079C
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
910 inc $0B,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
911 L079C ldd #$0020
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
912 lbsr L03CD
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
913 bcs L07BB
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
914 lda $0A,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
915 bita #$02
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
916 bne L07B4
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
917 lbsr L0C49
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
918 bcs L07BB
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
919 lbsr L0D91
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
920 bcs L07BB
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
921 L07B4 ldb $0E,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
922 lda $08,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
923 tfr d,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
924 clrb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
925 L07BB rts
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
926
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
927 L07BC os9 F$PrsNam
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
928 pshs x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
929 bcc L07E9
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
930 clrb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
931 L07C4 pshs a
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
932 anda #$7F
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
933 cmpa #PDIR
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
934 puls a
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
935 bne L07DF
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
936 incb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
937 leax $01,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
938 tsta
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
939 bmi L07DF
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
940 lda ,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
941 cmpb #$03
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
942 bcs L07C4
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
943 lda #PDELIM
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
944 decb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
945 leax -$03,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
946 L07DF tstb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
947 bne L07E7
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
948 L07E2 comb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
949 ldb #E$BPNam
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
950 puls pc,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
951 L07E7 leay ,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
952 L07E9 cmpb #$20
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
953 bhi L07E2
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
954 andcc #^Carry
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
955 puls pc,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
956
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
957 * A = PD.MOD (mode byte)
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
958 L07F1 tfr a,b
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
959 anda #$07
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
960 andb #$C0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
961 pshs x,b,a
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
962 lbsr L0CD4
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
963 bcs L0820
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
964 ldu $08,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
965 ldx <$004B
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
966 ldd $09,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
967 beq L0809
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
968 cmpd $01,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
969 L0809 puls a
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
970 beq L0810
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
971 lsla
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
972 lsla
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
973 lsla
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
974 L0810 ora ,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
975 anda #$BF
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
976 pshs a
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
977 ora #$80
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
978 anda ,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
979 cmpa ,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
980 beq L0829
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
981 ldb #$D6
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
982 L0820 leas $02,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
983 coma
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
984 puls pc,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
985 ldb #$FD
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
986 bra L0820
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
987 L0829 puls pc,x,b,a
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
988 L082B clra
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
989 clrb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
990 std $0B,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
991 std $0D,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
992 sta <$19,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
993 std <$1A,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
994 L0837 rts
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
995 L0838 pshs y,x,b,a
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
996 ldx <D.Proc
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
997 lda <P$IOQN,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
998 beq L0851
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
999 clr <P$IOQN,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1000 ldb #S$Wake
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1001 os9 F$Send
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1002 ldx <D.PrcDBT
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1003 os9 F$Find64
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1004 clr <P$IOQP,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1005 L0851 clrb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1006 puls pc,y,x,b,a
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1007 L0854 pshs u,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1008 L0856 bsr L08B2
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1009 bne L0866
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1010 cmpx <$1A,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1011 bcs L08AD
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1012 bne L0866
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1013 lda <$12,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1014 beq L08AD
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1015 L0866 lbsr L0CD4
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1016 bcs L08AA
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1017 ldx $0B,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1018 ldu $0D,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1019 pshs u,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1020 ldd $0F,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1021 std $0B,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1022 ldd <$11,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1023 std $0D,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1024 lbsr L0C63
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1025 puls u,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1026 stx $0B,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1027 stu $0D,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1028 bcc L08AD
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1029 cmpb #$D5
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1030 bne L08AA
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1031 bsr L08B2
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1032 bne L0896
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1033 tst <$12,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1034 beq L0899
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1035 leax $01,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1036 bne L0899
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1037 L0896 ldx #$FFFF
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1038 L0899 tfr x,d
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1039 tsta
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1040 bne L08A6
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1041 cmpb <$2E,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1042 bcc L08A6
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1043 ldb <$2E,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1044 L08A6 bsr L08C0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1045 bcc L0856
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1046 L08AA coma
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1047 puls pc,u,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1048 L08AD lbsr L0C49
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1049 puls pc,u,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1050 L08B2 ldd <$10,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1051 subd <$14,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1052 tfr d,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1053 ldb $0F,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1054 sbcb <$13,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1055 rts
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1056 L08C0 pshs u,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1057 lbsr L0966
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1058 bcs L08FF
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1059 lbsr L0CD4
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1060 bcs L08FF
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1061 ldu $08,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1062 clra
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1063 clrb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1064 std $09,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1065 std $0B,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1066 leax <$10,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1067 ldd $03,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1068 beq L0947
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1069 ldd $08,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1070 inca
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1071 pshs b,a
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1072 bra L08EF
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1073 L08E2 clrb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1074 ldd -$02,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1075 beq L08FB
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1076 addd $0A,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1077 std $0A,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1078 bcc L08EF
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1079 inc $09,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1080 L08EF leax $05,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1081 cmpx ,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1082 bcs L08E2
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1083 lbsr L0B6E
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1084 comb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1085 ldb #E$SLF
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1086 L08FB leas $02,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1087 leax -$05,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1088 L08FF bcs L0964
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1089 ldd -$04,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1090 addd -$02,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1091 pshs b,a
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1092 ldb -$05,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1093 adcb #$00
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1094 cmpb <$16,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1095 puls b,a
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1096 bne L0947
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1097 cmpd <$17,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1098 bne L0947
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1099 ldu <$1E,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1100 ldd $06,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1101 ldu $08,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1102 subd #$0001
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1103 coma
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1104 comb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1105 pshs b,a
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1106 ldd -$05,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1107 eora <$16,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1108 eorb <$17,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1109 lsra
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1110 rorb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1111 lsra
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1112 rorb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1113 lsra
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1114 rorb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1115 anda ,s+
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1116 andb ,s+
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1117 std -$02,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1118 bne L0947
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1119 ldd -$02,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1120 addd <$1A,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1121 bcs L0947
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1122 std -$02,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1123 bra L0956
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1124 L0947 ldd <$16,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1125 std ,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1126 lda <$18,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1127 sta $02,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1128 ldd <$1A,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1129 std $03,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1130 L0956 ldd $0A,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1131 addd <$1A,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1132 std $0A,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1133 bcc L0961
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1134 inc $09,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1135 L0961 lbsr L0D38
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1136 L0964 puls pc,u,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1137 L0966 pshs u,y,x,b,a
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1138 ldb #$0C
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1139 L096A clr ,-s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1140 decb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1141 bne L096A
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1142 ldx <$1E,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1143 ldd $04,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1144 std $04,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1145 ldd $06,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1146 std $02,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1147 std $0A,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1148 ldx $03,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1149 ldx $04,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1150 leax <$12,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1151 subd #$0001
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1152 addb $0E,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1153 adca #$00
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1154 bra L098E
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1155 L098C lsra
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1156 rorb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1157 L098E lsr $0A,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1158 ror $0B,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1159 bcc L098C
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1160 std ,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1161 ldd $02,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1162 std $0A,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1163 subd #$0001
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1164 addd $0C,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1165 bcc L09A8
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1166 ldd #$FFFF
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1167 bra L09A8
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1168 L09A6 lsra
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1169 rorb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1170 L09A8 lsr $0A,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1171 ror $0B,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1172 bcc L09A6
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1173 cmpa #$08
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1174 bcs L09B5
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1175 ldd #$0800
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1176 L09B5 std $0C,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1177 lbsr L0BD8
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1178 lbcs L0AA3
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1179 ldx <$1E,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1180 ldd <$1A,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1181 cmpd $0E,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1182 bne L09D7
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1183 lda <$1C,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1184 cmpa $04,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1185 bne L09D7
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1186 ldb <$1D,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1187 cmpb $04,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1188 bcs L09E5
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1189 L09D7 ldd $0E,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1190 std <$1A,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1191 lda $04,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1192 sta <$1C,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1193 clrb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1194 stb <$1D,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1195 L09E5 incb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1196 stb $06,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1197 ldx <$1E,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1198 cmpb <$1E,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1199 beq L0A21
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1200 lbsr L0C33
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1201 lbcs L0AA3
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1202 ldb $06,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1203 cmpb $04,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1204 bls L0A02
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1205 clra
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1206 ldb $05,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1207 bra L0A05
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1208 L0A02 ldd #$0100
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1209 L0A05 ldx $08,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1210 leau d,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1211 ldy $0C,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1212 clra
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1213 clrb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1214 os9 F$SchBit
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1215 bcc L0A4E
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1216 cmpy $08,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1217 bls L0A21
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1218 sty $08,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1219 std $0A,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1220 lda $06,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1221 sta $07,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1222 L0A21 ldy <$10,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1223 ldb $06,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1224 cmpb $04,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1225 bcs L0A32
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1226 bhi L0A31
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1227 tst $05,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1228 bne L0A32
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1229 L0A31 clrb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1230 L0A32 ldx <$1E,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1231 cmpb <$1D,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1232 bne L09E5
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1233 ldb $07,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1234 beq L0AA1
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1235 cmpb $06,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1236 beq L0A47
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1237 stb $06,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1238 lbsr L0C33
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1239 L0A47 ldx $08,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1240 ldd $0A,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1241 ldy $08,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1242 L0A4E std $0A,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1243 sty $08,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1244 os9 F$AllBit
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1245 ldy <$10,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1246 ldb $06,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1247 lbsr L0C0B
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1248 bcs L0AA3
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1249 ldx <$1E,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1250 lda $06,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1251 deca
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1252 sta <$1D,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1253 clrb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1254 lsla
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1255 rolb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1256 lsla
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1257 rolb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1258 lsla
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1259 rolb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1260 stb <$16,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1261 ora $0A,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1262 ldb $0B,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1263 ldx $08,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1264 ldy <$10,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1265 std <$17,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1266 stx <$1A,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1267 ldd $02,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1268 bra L0A97
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1269 L0A88 lsl <$18,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1270 rol <$17,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1271 rol <$16,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1272 lsl <$1B,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1273 rol <$1A,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1274 L0A97 lsra
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1275 rorb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1276 bcc L0A88
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1277 clrb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1278 ldd <$1A,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1279 bra L0AAB
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1280 L0AA1 ldb #$F8
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1281 L0AA3 ldy <$10,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1282 lbsr L0C12
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1283 coma
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1284 L0AAB leas $0E,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1285 puls pc,u,y,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1286 L0AAF clra
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1287 lda $01,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1288 bita #$80
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1289 bne L0B11
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1290 ldd $0F,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1291 std $0B,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1292 ldd <$11,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1293 std $0D,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1294 lbsr L0C63
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1295 bcc L0AC8
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1296 cmpb #$D5
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1297 bra L0B09
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1298 L0AC8 ldd <$14,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1299 subd $0C,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1300 addd <$1A,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1301 tst $0E,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1302 beq L0AD7
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1303 subd #$0001
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1304 L0AD7 pshs b,a
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1305 ldu <$1E,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1306 ldd $06,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1307 subd #$0001
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1308 coma
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1309 comb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1310 anda ,s+
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1311 andb ,s+
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1312 ldu <$1A,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1313 std <$1A,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1314 beq L0B0B
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1315 tfr u,d
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1316 subd <$1A,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1317 pshs x,b,a
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1318 addd <$17,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1319 std <$17,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1320 bcc L0B01
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1321 inc <$16,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1322 L0B01 bsr L0B6E
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1323 bcc L0B12
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1324 leas $04,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1325 cmpb #$DB
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1326 L0B09 bne L0B10
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1327 L0B0B lbsr L0CD4
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1328 bcc L0B1B
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1329 L0B10 coma
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1330 L0B11 rts
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1331 L0B12 lbsr L0CD4
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1332 bcs L0B6B
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1333 puls x,b,a
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1334 std $03,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1335 L0B1B ldu $08,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1336 ldd <$11,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1337 std $0B,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1338 ldd $0F,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1339 std $09,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1340 tfr x,d
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1341 clrb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1342 inca
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1343 leax $05,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1344 pshs x,b,a
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1345 bra L0B56
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1346 L0B30 ldd -$02,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1347 beq L0B63
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1348 std <$1A,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1349 ldd -$05,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1350 std <$16,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1351 lda -$03,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1352 sta <$18,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1353 bsr L0B6E
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1354 bcs L0B6B
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1355 stx $02,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1356 lbsr L0CD4
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1357 bcs L0B6B
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1358 ldx $02,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1359 clra
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1360 clrb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1361 std -$05,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1362 sta -$03,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1363 std -$02,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1364 L0B56 lbsr L0D38
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1365 bcs L0B6B
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1366 ldx $02,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1367 leax $05,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1368 cmpx ,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1369 bcs L0B30
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1370 L0B63 clra
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1371 clrb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1372 sta <$19,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1373 std <$1A,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1374 L0B6B leas $04,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1375 rts
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1376 L0B6E pshs u,y,x,a
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1377 ldx <$1E,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1378 ldd $06,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1379 subd #$0001
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1380 addd <$17,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1381 std <$17,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1382 ldd $06,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1383 bcc L0B96
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1384 inc <$16,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1385 bra L0B96
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1386 L0B87 lsr <$16,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1387 ror <$17,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1388 ror <$18,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1389 lsr <$1A,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1390 ror <$1B,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1391 L0B96 lsra
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1392 rorb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1393 bcc L0B87
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1394 clrb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1395 ldd <$1A,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1396 beq L0BD6
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1397 ldd <$16,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1398 lsra
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1399 rorb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1400 lsra
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1401 rorb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1402 lsra
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1403 rorb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1404 tfr b,a
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1405 ldb #$DB
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1406 cmpa $04,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1407 bhi L0BD5
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1408 inca
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1409 sta ,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1410 L0BB4 bsr L0BD8
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1411 bcs L0BB4
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1412 ldb ,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1413 bsr L0C33
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1414 bcs L0BD5
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1415 ldx $08,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1416 ldd <$17,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1417 anda #$07
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1418 ldy <$1A,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1419 os9 F$DelBit
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1420 ldy $03,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1421 ldb ,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1422 bsr L0C0B
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1423 bcc L0BD6
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1424 L0BD5 coma
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1425 L0BD6 puls pc,u,y,x,a
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1426 L0BD8 lbsr L0D72
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1427 bra L0BE5
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1428 L0BDD lbsr L0838
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1429 os9 F$IOQu
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1430 bsr L0BF5
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1431 L0BE5 bcs L0BF4
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1432 ldx <$1E,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1433 lda <$17,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1434 bne L0BDD
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1435 lda $05,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1436 sta <$17,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1437 L0BF4 rts
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1438 L0BF5 ldu <$004B
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1439 ldb <$36,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1440 cmpb #$01
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1441 bls L0C02
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1442 cmpb #$03
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1443 bls L0C09
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1444 L0C02 clra
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1445 lda $0D,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1446 bita #$02
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1447 beq L0C0A
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1448 L0C09 coma
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1449 L0C0A rts
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1450 L0C0B clra
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1451 tfr d,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1452 clrb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1453 lbsr L0D42
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1454 L0C12 pshs cc
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1455 ldx <$1E,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1456 lda $05,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1457 cmpa <$17,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1458 bne L0C31
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1459 clr <$17,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1460 ldx <$004B
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1461 lda <$11,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1462 beq L0C31
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1463 lbsr L0838
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1464 ldx #$0001
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1465 os9 F$Sleep
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1466 L0C31 puls pc,cc
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1467 L0C33 clra
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1468 tfr d,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1469 clrb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1470 lbra L0CEB
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1471 pshs u,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1472 lbsr L0D40
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1473 bcs L0C47
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1474 lda $0A,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1475 anda #$FE
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1476 sta $0A,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1477 L0C47 puls pc,u,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1478 L0C49 ldd $0C,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1479 subd <$14,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1480 tfr d,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1481 ldb $0B,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1482 sbcb <$13,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1483 cmpb <$19,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1484 bcs L0C61
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1485 bhi L0C63
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1486 cmpx <$1A,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1487 bcc L0C63
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1488 L0C61 clrb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1489 L0C62 rts
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1490 L0C63 pshs u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1491 bsr L0CD4
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1492 bcs L0CBF
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1493 clra
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1494 clrb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1495 std <$13,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1496 stb <$15,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1497 ldu $08,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1498 leax <$10,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1499 lda $08,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1500 ldb #$FC
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1501 pshs b,a
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1502 L0C7C ldd $03,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1503 beq L0CA1
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1504 addd <$14,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1505 tfr d,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1506 ldb <$13,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1507 adcb #$00
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1508 cmpb $0B,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1509 bhi L0CAE
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1510 bne L0C95
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1511 cmpu $0C,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1512 bhi L0CAE
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1513 L0C95 stb <$13,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1514 stu <$14,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1515 leax $05,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1516 cmpx ,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1517 bcs L0C7C
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1518 L0CA1 clra
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1519 clrb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1520 sta <$19,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1521 std <$1A,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1522 comb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1523 ldb #E$NES
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1524 bra L0CBD
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1525 L0CAE ldd ,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1526 std <$16,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1527 lda $02,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1528 sta <$18,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1529 ldd $03,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1530 std <$1A,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1531 L0CBD leas $02,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1532 L0CBF puls pc,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1533 L0CC1 pshs x,b
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1534 lbsr L0D72
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1535 bcs L0CD0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1536 clrb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1537 ldx #$0000
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1538 bsr L0CEB
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1539 bcc L0CD2
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1540 L0CD0 stb ,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1541 L0CD2 puls pc,x,b
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1542 L0CD4 ldb $0A,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1543 bitb #$04
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1544 bne L0C61
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1545 lbsr L0D72
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1546 bcs L0C62
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1547 ldb $0A,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1548 orb #$04
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1549 stb $0A,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1550 ldb <$34,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1551 ldx <$35,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1552 L0CEB lda #$03
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1553 L0CED pshs u,y,x,b,a
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1554 lda $0A,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1555 ora #$20
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1556 sta $0A,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1557 ldu $03,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1558 ldu $02,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1559 bra L0D01
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1560 L0CFB lbsr L0838
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1561 os9 F$IOQu
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1562 L0D01 lda $04,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1563 bne L0CFB
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1564 lda $05,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1565 sta $04,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1566 ldd ,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1567 ldx $02,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1568 pshs u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1569 bsr L0D26
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1570 puls u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1571 ldy $04,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1572 pshs cc
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1573 bcc L0D1C
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1574 stb $02,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1575 L0D1C lda $0A,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1576 anda #$DF
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1577 sta $0A,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1578 clr $04,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1579 puls pc,u,y,x,b,a,cc
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1580 L0D26 pshs pc,x,b,a
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1581 ldx $03,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1582 ldd ,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1583 ldx ,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1584 addd $09,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1585 addb ,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1586 adca #$00
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1587 std $04,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1588 puls pc,x,b,a
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1589 L0D38 ldb <$34,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1590 ldx <$35,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1591 bra L0D42
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1592 L0D40 bsr L0D5B
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1593 L0D42 lda #$06
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1594 pshs x,b,a
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1595 ldd <$1C,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1596 beq L0D51
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1597 ldx <$1E,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1598 cmpd $0E,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1599 L0D51 puls x,b,a
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1600 lbeq L0CED
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1601 comb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1602 ldb #E$DIDC
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1603 rts
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1604 L0D5B ldd $0C,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1605 subd <$14,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1606 tfr d,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1607 ldb $0B,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1608 sbcb <$13,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1609 exg d,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1610 addd <$17,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1611 exg d,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1612 adcb <$16,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1613 rts
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1614 L0D72 clrb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1615 pshs u,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1616 ldb $0A,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1617 andb #$46
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1618 beq L0D8F
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1619 tfr b,a
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1620 eorb $0A,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1621 stb $0A,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1622 andb #$01
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1623 beq L0D8F
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1624 eorb $0A,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1625 stb $0A,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1626 bita #$02
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1627 beq L0D8F
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1628 bsr L0D40
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1629 L0D8F puls pc,u,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1630 L0D91 pshs u,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1631 lbsr L0C49
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1632 bcs L0DAA
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1633 bsr L0D72
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1634 bcs L0DAA
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1635 lbsr L0D5B
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1636 lbsr L0CEB
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1637 bcs L0DAA
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1638 lda $0A,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1639 ora #$42
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1640 sta $0A,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1641 L0DAA puls pc,u,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1642
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1643 emod
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1644 eom equ *
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1645 end
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1646