annotate level2/modules/boot_1773.asm @ 372:b3bfa479f8d0

scfdefs is now included from level2v3/defsfile and all references to it in sources have been removed
author boisy
date Fri, 23 Aug 2002 19:14:07 +0000
parents 6641a883d6b0
children 25c2f2c8f15f
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 * Boot - WD1773 Boot module
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
3 *
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
4 * $Id$
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
5 *
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
6 * Ed. Comments Who YY/MM/DD
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
7 * ------------------------------------------------------------------
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
8 * 4 Original Tandy distribution version
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
9 * 6 Obtained from L2 Upgrade archive, has 6ms step BGP 98/10/12
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
10 * rate and disk timeout changes
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
11
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
12 nam Boot
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
13 ttl WD1773 Boot module
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
14
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
15 ifp1
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
16 use defsfile
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
17 endc
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
18
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
19 * Step Rate:
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
20 * $00 = 6ms
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
21 * $01 =
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
22 * $02 =
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
23 * $03 = 30ms
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
24 STEP equ $00
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
25
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
26 tylg set Systm+Objct
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
27 atrv set ReEnt+rev
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
28 rev set $01
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
29 edition set 6
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
30
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
31 mod eom,name,tylg,atrv,start,size
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
32
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
33 u0000 rmb 2
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
34 u0002 rmb 2
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
35 u0004 rmb 1
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
36 u0005 rmb 1
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
37 u0006 rmb 1
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
38 u0007 rmb 1
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
39 u0008 rmb 1
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
40 u0009 rmb 1
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
41 size equ .
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
42
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
43 name fcs /Boot/
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
44 fcb edition
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
45
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
46 start clra
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
47 ldb #$0A
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
48 L0015 pshs a
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
49 decb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
50 bne L0015
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
51 tfr s,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
52 ldx #$FF48
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
53 lda #$D0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
54 sta ,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
55 lbsr L01AA
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
56 lda ,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
57 lda #$FF
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
58 sta u0004,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
59 leax >NMIRtn,pcr
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
60 stx <D.NMI
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
61 lda #$09
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
62 sta >$FF40
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
63 ldd #$C350
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
64 L003A nop
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
65 nop
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
66 subd #$0001
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
67 bne L003A
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
68 pshs u,y,x,b,a
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
69 ldd #$0001
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
70 os9 F$SRqMem
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
71 bcs L00AA
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
72 tfr u,d
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
73 ldu $06,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
74 std u0002,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
75 clrb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
76 ldx #$0000
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
77 bsr L00C7
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
78 bcs L00AA
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
79 ldd $01,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
80 std u0007,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
81 lda <$10,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
82 sta u0005,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
83 anda #$01
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
84 sta u0008,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
85 lda $03,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
86 sta u0006,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
87 ldd <$18,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
88 std ,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
89 ldx <$16,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
90 pshs x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
91 ldd #256
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
92 ldu u0002,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
93 os9 F$SRtMem
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
94 ldd $02,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
95 os9 F$BtMem
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
96 puls x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
97 bcs L00AA
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
98 stu $02,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
99 ldu $06,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
100 ldd $02,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
101 std u0002,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
102 ldd ,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
103 beq L00A3
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
104 L0091 pshs x,b,a
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
105 clrb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
106 bsr L00C7
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
107 bcs L00A8
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
108 puls x,b,a
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
109 inc u0002,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
110 leax 1,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
111 subd #256
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
112 bhi L0091
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
113 L00A3 clrb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
114 puls b,a
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
115 bra L00AC
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
116 L00A8 leas $04,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
117 L00AA leas $02,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
118 L00AC sta >$FFD9
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
119 puls u,y,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
120 leas $0A,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
121 clr >$FF40
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
122 rts
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
123 L00B7 lda #$29
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
124 sta ,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
125 clr u0004,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
126 lda #$05
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
127 lbsr L0170
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
128 ldb #STEP
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
129 lbra L0195
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
130 L00C7 lda #$91
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
131 cmpx #$0000
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
132 bne L00DF
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
133 bsr L00DF
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
134 bcs L00D6
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
135 ldy u0002,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
136 clrb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
137 L00D6 rts
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
138 L00D7 bcc L00DF
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
139 pshs x,b,a
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
140 bsr L00B7
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
141 puls x,b,a
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
142 L00DF pshs x,b,a
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
143 bsr L00EA
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
144 puls x,b,a
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
145 bcc L00D6
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
146 lsra
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
147 bne L00D7
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
148 L00EA bsr L013C
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
149 bcs L00D6
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
150 ldx u0002,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
151 orcc #IntMasks
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
152 pshs y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
153 ldy #$FFFF
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
154 ldb #$80
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
155 stb >$FF48
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
156 ldb ,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
157 orb #$30
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
158 tst u0009,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
159 beq L0107
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
160 orb #$40
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
161 L0107 stb >$FF40
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
162 lbsr L01AA
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
163 orb #$80
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
164 lda #$02
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
165 L0111 bita >$FF48
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
166 bne L0123
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
167 leay -$01,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
168 bne L0111
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
169 lda ,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
170 sta >$FF40
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
171 puls y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
172 bra L0138
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
173 L0123 lda >$FF4B
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
174 sta ,x+
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
175 stb >$FF40
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
176 bra L0123
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
177
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
178 NMIRtn leas $0C,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
179 puls y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
180 ldb >$FF48
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
181 bitb #$04
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
182 beq L018F
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
183 L0138 comb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
184 ldb #E$Read
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
185 rts
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
186 L013C lda #$09
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
187 sta ,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
188 clr u0009,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
189 tfr x,d
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
190 cmpd #$0000
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
191 beq L016C
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
192 clr ,-s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
193 tst u0008,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
194 beq L0162
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
195 bra L0158
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
196 L0152 com u0009,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
197 bne L0158
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
198 inc ,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
199 L0158 subb u0006,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
200 sbca #$00
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
201 bcc L0152
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
202 bra L0168
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
203 L0160 inc ,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
204 L0162 subb u0006,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
205 sbca #$00
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
206 bcc L0160
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
207 L0168 addb #$12
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
208 puls a
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
209 L016C incb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
210 stb >$FF4A
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
211 L0170 ldb u0004,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
212 stb >$FF49
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
213 cmpa u0004,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
214 beq L018D
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
215 sta u0004,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
216 sta >$FF4B
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
217 ldb #$10+STEP
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
218 bsr L0195
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
219 pshs x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
220 ldx #$222E
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
221 L0187 leax -$01,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
222 bne L0187
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
223 puls x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
224 L018D clrb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
225 rts
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
226 L018F bitb #$98
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
227 bne L0138
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
228 clrb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
229 rts
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
230 L0195 bsr L01A8
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
231 L0197 ldb >$FF48
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
232 bitb #$01
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
233 bne L0197
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
234 rts
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
235 L019F lda ,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
236 sta >$FF40
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
237 stb >$FF48
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
238 rts
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
239 L01A8 bsr L019F
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
240 L01AA lbsr L01AD
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
241 L01AD lbsr L01B0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
242 L01B0 rts
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
243
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
244 * Filler to get $1D0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
245 Filler fcb $39,$39,$39,$39,$39,$39,$39,$39,$39,$39,$39,$39,$39,$39,$39,$39
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
246 fcb $39,$39,$39,$39,$39,$39,$39,$39,$39,$39,$39,$39
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
247
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
248 emod
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
249 eom equ *
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
250 end