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

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