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