comparison level1/cmds/os9gen.asm @ 168:3a847d2b4492

Cobbler, OS9Gen and format are all hardware dependent.
author roug
date Thu, 11 Jul 2002 18:57:35 +0000
parents 31e9f483c687
children 2748e53f293c
comparison
equal deleted inserted replaced
167:51cb8573849f 168:3a847d2b4492
30 atrv set ReEnt+rev 30 atrv set ReEnt+rev
31 rev set $01 31 rev set $01
32 mod eom,name,tylg,atrv,start,size 32 mod eom,name,tylg,atrv,start,size
33 u0000 rmb 2 33 u0000 rmb 2
34 u0002 rmb 1 34 u0002 rmb 1
35 u0003 rmb 1 35 DevFd rmb 1
36 u0004 rmb 1 36 u0004 rmb 1
37 u0005 rmb 1 37 u0005 rmb 1
38 u0006 rmb 2 38 u0006 rmb 2
39 u0008 rmb 1 39 u0008 rmb 1
40 u0009 rmb 2 40 u0009 rmb 2
98 L0175 sta ,y+ 98 L0175 sta ,y+
99 lda ,x+ 99 lda ,x+
100 decb 100 decb
101 bpl L0175 101 bpl L0175
102 sty <u002F 102 sty <u002F
103 lda #$40 103 lda #'@
104 ldb #$20 104 ldb #$20
105 std ,y++ 105 std ,y++
106 leax <u0031,u 106 leax <u0031,u
107 lda #$03 107 lda #$03
108 os9 I$Open 108 os9 I$Open
109 sta <u0003 109 sta <DevFd
110 lbcs L035B 110 lbcs L035B
111 ldx <u002F 111 ldx <u002F
112 leay >L0143,pcr 112 leay >L0143,pcr
113 lda #$2F 113 lda #$2F
114 L019B sta ,x+ 114 L019B sta ,x+
129 sta <u0002 129 sta <u0002
130 lbcs L036C 130 lbcs L036C
131 ldx #$0000 131 ldx #$0000
132 stx <u0006 132 stx <u0006
133 ldu #$4000 133 ldu #$4000
134 ldb #$02 134 ldb #SS.SIZ
135 os9 I$SetStt 135 os9 I$SetStt
136 lbcs L036C 136 lbcs L036C
137 ldu <u0000 137 ldu <u0000
138 L01D6 clra 138 L01D6 clra
139 leax <u0051,u 139 leax <u0051,u
178 os9 I$GetStt 178 os9 I$GetStt
179 lbcs L036C 179 lbcs L036C
180 lda <u0002 180 lda <u0002
181 ldx #$0000 181 ldx #$0000
182 ldu <u0006 182 ldu <u0006
183 ldb #$02 183 ldb #SS.SIZ
184 os9 I$SetStt 184 os9 I$SetStt
185 lbcs L036C 185 lbcs L036C
186 ldu <u0000 186 ldu <u0000
187 os9 I$Close 187 os9 I$Close
188 lbcs L035B 188 lbcs L035B
189 ldx <u0023,u 189 ldx <u0023,u
190 lda <u0025,u 190 lda <u0025,u
191 clrb 191 clrb
192 tfr d,u 192 tfr d,u
193 lda <u0003 193 lda <DevFd
194 os9 I$Seek 194 os9 I$Seek
195 ldu <u0000 195 ldu <u0000
196 lbcs L036C 196 lbcs L036C
197 leax <u0051,u 197 leax <u0051,u
198 ldy #$0100 198 ldy #$0100
199 os9 I$Read 199 os9 I$Read
200 lbcs L036C 200 lbcs L036C
201 ldd <u0069,u 201 ldd <u0069,u
202 lbne L036F 202 lbne L036F
203 lda <u0003 203 lda <DevFd
204 ldx #$0000 204 ldx #$0000
205 ldu #$0015 205 ldu #$0015
206 os9 I$Seek 206 os9 I$Seek
207 ldu <u0000 207 ldu <u0000
208 lbcs L036C 208 lbcs L036C
244 std <u0009 244 std <u0009
245 ldd <u0006 245 ldd <u0006
246 std <u000B 246 std <u000B
247 ldx #$0000 247 ldx #$0000
248 ldu #$0015 248 ldu #$0015
249 lda <u0003 249 lda <DevFd
250 os9 I$Seek 250 os9 I$Seek
251 ldu <u0000 251 ldu <u0000
252 lbcs L036C 252 lbcs L036C
253 leax u0008,u 253 leax u0008,u
254 ldy #$0005 254 ldy #$0005
255 os9 I$Write 255 os9 I$Write
256 lbcs L036C 256 lbcs L036C
257 lbsr L0376 257 lbsr SkLSN1
258 leax <u0051,u 258 leax <u0051,u
259 ldy #$0100 259 ldy #$0100
260 os9 I$Read 260 os9 I$Read
261 bcs L035F 261 bcs L035F
262 lda ,x 262 lda ,x
268 lbne L0385 268 lbne L0385
269 lda $02,x 269 lda $02,x
270 anda #$90 270 anda #$90
271 eora #$90 271 eora #$90
272 lbne L0385 272 lbne L0385
273 ldx #$F000 273 ldx #$F000 Address of kernel in RAM
274 ldy #$0F00 274 ldy #$0F00 Amount to write
275 lda <u0003 275 lda <DevFd
276 os9 I$Write 276 os9 I$Write
277 bcs L0354 277 bcs L0354
278 os9 I$Close 278 os9 I$Close
279 bcs L036C 279 bcs L036C
280 clrb 280 clrb
290 puls b 290 puls b
291 L036C os9 F$Exit 291 L036C os9 F$Exit
292 L036F leax >L00FC,pcr 292 L036F leax >L00FC,pcr
293 clrb 293 clrb
294 bra L035F 294 bra L035F
295 L0376 pshs u 295
296 lda <u0003 296 SkLSN1 pshs u
297 lda <DevFd
297 ldx #$0000 298 ldx #$0000
298 ldu #$0100 299 ldu #$0100
299 os9 I$Seek 300 os9 I$Seek Seek to allocation map at LSN 1
300 puls pc,u 301 puls pc,u
302
301 L0385 leax >L00B0,pcr 303 L0385 leax >L00B0,pcr
302 clrb 304 clrb
303 bra L035F 305 bra L035F
304 emod 306 emod
305 eom equ * 307 eom equ *