0
|
1 ********************************************************************
|
|
2 * RAM - RAM Disk driver
|
|
3 *
|
|
4 * $Id$
|
|
5 *
|
|
6 * Ed. Comments Who YY/MM/DD
|
|
7 * ------------------------------------------------------------------
|
|
8 * 4 Given to me by Gene Heskett BGP 98/10/10
|
|
9
|
|
10 opt d68
|
|
11 opt w110
|
|
12 * set printer to 15 cpi!
|
|
13 h6309 set 0
|
|
14
|
|
15 nam RAM
|
|
16 ttl RAM Disk driver
|
|
17
|
|
18 **********************************************
|
|
19 * A version of MyRam that can be asm to run on either
|
|
20 * cpu. To switch to 6309 coding, use "h6309 set 1"
|
|
21 * As no irq's are handled here, compensatory
|
|
22 * changes to register offsets vs stack are not
|
|
23 * required, therefore not used as defines either.
|
|
24 * This does require an "os39defs" that can switch
|
|
25 * register offsets etc according to the value
|
|
26 * assigned to "h6309" and "TRUE", and a late
|
|
27 * copy of Chris Burkes "xsm" assembler
|
|
28
|
|
29 ifp1
|
|
30 use defsfile
|
|
31 use rbfdefs
|
|
32 endc
|
|
33
|
|
34 rev set $02
|
|
35 edition set 4
|
|
36
|
|
37 ****************************************
|
|
38 * this is required because regular
|
|
39 * os-9 doesn't treat a native mode
|
|
40 * marked module correctly, result
|
|
41 * crash at worst, device table full
|
|
42 * and nothing else works at best.
|
|
43
|
|
44 ifeq h6309-TRUE
|
|
45 tylg set Drivr+Obj_309
|
|
46 atrv set ReEnt+Ntv_mode+rev
|
|
47 else
|
|
48 tylg set Drivr+Objct
|
|
49 atrv set ReEnt+rev
|
|
50 endc
|
|
51
|
|
52 RD.MAP set -2 ,x of course!
|
|
53 FDlocat set -3 loc for root FD
|
|
54 DIRloca set -4 loc for root
|
|
55 mod eom,name,tylg,atrv,start,size
|
|
56 org 0
|
|
57 u0000 rmb 2
|
|
58 u0002 rmb 2
|
|
59 u0004 rmb 2
|
|
60 u0006 rmb 5
|
|
61 u000B rmb 2
|
|
62 u000D rmb 2 is RD.MAP & FDLocat
|
|
63 u000F rmb 1
|
|
64 u0010 rmb 32
|
|
65 OurDesc rmb 2
|
|
66 OurLink rmb 1 to control our self link
|
|
67 Initstt rmb 2
|
|
68 u0035 rmb 1
|
|
69 u0036 rmb 2 number of 8k ramblocks needed
|
|
70 u0038 rmb 2 only 2 used
|
|
71 u003A rmb 2
|
|
72 FatScra rmb 2 define FatScratch pad areas
|
|
73 MP.SIZ rmb 2 ditto
|
|
74 u0040 rmb 6
|
|
75 u0046 rmb 10 actually 1, our tasknum
|
|
76 u0050 rmb $C0-.
|
|
77 u00C0 rmb $100-.
|
|
78 size equ .
|
|
79 mode fcb $BF
|
|
80
|
|
81 name fcs /RAM/
|
|
82 fcb edition
|
|
83
|
|
84 start equ * the usual jump table for drivers
|
|
85 lbra Init
|
|
86 lbra Read
|
|
87 lbra Write
|
|
88 lbra SGtat these return errors
|
|
89 lbra SGtat
|
|
90 lbra Term
|
|
91 Init equ *
|
|
92 lbsr Initchk have we been init'd?
|
|
93 bcs DoInit
|
|
94 andcc #$FE clr the carry
|
|
95 rts don't do twice
|
|
96 DoInit inc OurLink,u so it'll get relinked
|
|
97 andcc #$FE kill the carry if set
|
|
98 leax u000F,u U is mem assigned area
|
|
99 sty OurDesc,u save for later recovery
|
|
100 pshs u,x building stack image -4
|
|
101 * the stack image is:
|
|
102 * sp+2=u, usually $4D00
|
|
103 * sp =x, usually $4D0F
|
|
104 ldu #$0028 location of time packet
|
|
105 leax DD.DAT,x set x to target location
|
|
106 ifne h6309-TRUE
|
|
107 ldb #$05 number of byte to move
|
|
108 GTime lda ,u+
|
|
109 sta ,x+
|
|
110 decb
|
|
111 bne GTime
|
|
112 endc
|
|
113 ifeq h6309-TRUE
|
|
114 ldw #$0005 we want to move 5 bytes
|
|
115 tfm u+,x+ do it
|
|
116 endc
|
|
117 ldu 2,s
|
|
118 ldx ,s
|
|
119 ldb #$01
|
|
120 stb u0006,u
|
|
121 ldx <D.Proc <$50 current process ptr
|
|
122 ldd P$User,x $08,x
|
|
123 ldx ,s get x back
|
|
124 * building a dummy sector zero's first $33 bytes
|
|
125 * which is all assembled starting at offset $0F
|
|
126 * of our initial scratchpad assignment
|
|
127 std $0B,x DD.OWNer of dummy sector zero
|
|
128 ldd #$0001
|
|
129 std $06,x DD.BIT sectors per cluster
|
|
130 lda $0D,y DD.ATT disk attributes
|
|
131 sta $0D,x
|
|
132 ldd <$1B,y IT.SCT
|
|
133 std $01,x put totsecs in DD.TOT+1
|
|
134
|
|
135 * this could be simplicated to straight 6809 code
|
|
136 ifeq h6309-TRUE
|
|
137
|
|
138 lsrd /2 but this is one cycle quicker at 3
|
|
139 lsrd /4
|
|
140 lsrd /8 8 sectors per byte
|
|
141
|
|
142 else
|
|
143
|
|
144 lsra where this is 2 per 8 bit register
|
|
145 rorb or 4 cycles for full 16 bit shift
|
|
146 lsra
|
|
147 rorb
|
|
148 lsra
|
|
149 rorb
|
|
150
|
|
151 endc
|
|
152 std RD.MAP,x s/b at $400D-E
|
|
153 subd #$0001 it grabs extra page otherwise
|
|
154 std $04,x DD.MAP (size) addr $13&14
|
|
155 ****************************************************
|
|
156 * set the location of the root FD.SCT intelligently!
|
|
157 * this is where the devpack version failed miserably,
|
|
158 * it was fixed at $0002, whole thing dead at 512k & up
|
|
159 * furinstance, with sct=1300, d=$0260 right here,
|
|
160 * therefore the FAT occupies 3 full sectors starting
|
|
161 * at sector $01
|
|
162 tfr a,b
|
|
163 incb to next page so it skips sector zero
|
|
164 incb and point to sector AFTER the FAT
|
|
165 clra simplicating it
|
|
166 std $09,x DD.DIR+1 fd location!
|
|
167 * save a copy to locate the root FD
|
|
168 stb FDlocat,x save copy for FD loc
|
|
169 * save a copy to locate the root dir
|
|
170 incb to next sector
|
|
171 stb DIRloca,x s/b @ $400B-C
|
|
172 *****************************************
|
|
173 * now lets go get enough memory to build the FAT
|
|
174 lda RD.MAP,x get msb, maybe $00
|
|
175 * if over $800 sectors, regs.a won't be zero!
|
|
176 inca round up increment to cover all
|
|
177 clrb make even page boundary
|
|
178 os9 F$SRqMem
|
|
179 lbcs L0178
|
|
180 ldx 2,s get U back
|
|
181 std MP.SIZ,x and save it
|
|
182 stu FatScra,x save FAT loc
|
|
183 ldx ,s and get x back
|
|
184 pshs u U is new mem area start -6
|
|
185 * the stack image is:
|
|
186 * sp+4=u, usually $4D00
|
|
187 * sp+2=x, usually $4D0F
|
|
188 * sp = usually $4000
|
|
189 ldu $04,s get orig $4D00 u back
|
|
190 * How many 8k blocks of mem do we need?
|
|
191 ldd RD.MAP,x already been /8
|
|
192 addd #$0003 we'll shift out, but need d2 carry
|
|
193 ifeq h6309-TRUE
|
|
194 lsrd /16
|
|
195 lsrd /32 but its 5 cycles faster!
|
|
196 else
|
|
197 lsra
|
|
198 rorb /16
|
|
199 lsra
|
|
200 rorb /32
|
|
201 endc
|
|
202
|
|
203 * D is now how many blocks we need
|
|
204 std <u0036,u 8k blocks ram needed
|
|
205 leax >u00C0,u if <$20 blocks we
|
|
206 cmpd #$0020 allow 512k in this map
|
|
207 bls L008D if go, fits this page
|
|
208 * else table of blocks won't fit from $C0-$FF,
|
|
209 * ask for another (d*2) pages
|
|
210
|
|
211 ifeq h6309-TRUE
|
|
212 asld else ask for more memory
|
|
213 else
|
|
214 lslb
|
|
215 rola
|
|
216 endc
|
|
217 os9 F$SRqMem get new U
|
|
218 lbcs L017C no more avail!
|
|
219 * we'll use this instead of $xxC0
|
|
220 * the stack image is:
|
|
221 * sp+4=u, usually $4D00
|
|
222 * sp+2=x, usually $4D0F
|
|
223 * sp = usually $4000
|
|
224 * save for later release
|
|
225 leax ,u ok ,set x to new mem ptr
|
|
226 ldu $04,s and get old u back
|
|
227 L008D equ *
|
|
228 stx <u0038,u $4EC0 for small disk
|
|
229
|
|
230 ifeq h6309-TRUE
|
|
231 ldw <u0036,u number of blocks req
|
|
232 else
|
|
233 ldy <u0036,u
|
|
234 endc
|
|
235
|
|
236 * Where did we start?
|
|
237 L0094 ldb #$01 ask for one 8K block
|
|
238 os9 F$AllRAM os9 manual doesn't say but
|
|
239 lbcs L017C returns B=# of blk allocated
|
|
240 std ,x++ make list of blocks
|
|
241
|
|
242 ifeq h6309-TRUE
|
|
243 decw that we own for later release
|
|
244 else
|
|
245 leay -1,y
|
|
246 endc
|
|
247
|
|
248 bne L0094
|
|
249
|
|
250 ifne h6309-TRUE
|
|
251 ldy <OurDesc,u we destroyed our descriptor pointer
|
|
252 endc
|
|
253
|
|
254 leax <u0040,u orig U here
|
|
255 ldd [u0038,u] addr of # of blocks we own
|
|
256 std <$40,x save at 4E80-81
|
|
257 os9 F$AllTsk
|
|
258 * this reserves a task #, then sets hardware
|
|
259 * and DAT ram to this processes addr info
|
|
260 lbcs L017C
|
|
261 lda <D.SysTsk from dp reference
|
|
262 ldb $06,x x our task number!
|
|
263 * now we can move the dummy sector zero
|
|
264 * to the first sector
|
|
265 * the stack image now is:
|
|
266 * sp+4=u, usually $4D00
|
|
267 * sp+2=x, usually $4D0F
|
|
268 * sp = usually $4000
|
|
269 ldx $02,s get source ptr
|
|
270 ldy #$001F byte count
|
|
271 pshs u save this puppy, simplicates
|
|
272 * the stack image is:
|
|
273 * sp+6=u, usually $4D00
|
|
274 * sp+4=x, usually $4D0F
|
|
275 * sp+2= usually $4000
|
|
276 * sp = our current U, $4D00?
|
|
277 ldu #$0000 destination ptr
|
|
278 os9 F$Move our dummy sector 0
|
|
279 leax >L018A,pcr devices volume name
|
|
280 leau ,y
|
|
281 ldy #$000E length of name string etc
|
|
282 * write 10 zeros for DD.BT-DD.NAM & the name section
|
|
283 os9 F$Move and move that into sector zero
|
|
284 puls u get our reference back
|
|
285 * now lets make RBF a bit happier by copying
|
|
286 * the opts section of the descriptor into
|
|
287 * sector zero too.
|
|
288 * the stack image is:
|
|
289 * sp+4=u, usually $4D00
|
|
290 * sp+2=x, usually $4D0F
|
|
291 * sp+0= usually $4000
|
|
292 ldx OurDesc,u
|
|
293 leax $12,x point to opts in desc
|
|
294 ldu #$003F point to start of opts in sector 0
|
|
295 ldy #$000F
|
|
296 os9 F$Move
|
|
297 ldu 4,s
|
|
298 * That moved enough info into what RBF thinks is sector
|
|
299 * zero of this device to tell RBF what it is & how big,
|
|
300 * where root dir is located etc.
|
|
301 FatLoop equ *
|
|
302 * Now lets move the FAT into ramdisk space
|
|
303 * the stack image is:
|
|
304 * sp+4=u, usually $4D00
|
|
305 * sp+2=x, usually $4D0F
|
|
306 * sp = usually $4000
|
|
307 ldx $02,s test valid
|
|
308 ldd RD.MAP,x saved bitmap siz
|
|
309 * using size of bitmap for fat, save it in w
|
|
310
|
|
311 ifeq h6309-TRUE
|
|
312 tfr d,w there is a method
|
|
313 else
|
|
314 std <u0002,u
|
|
315 endc
|
|
316
|
|
317 * now add enough for even page boundary
|
|
318 inca
|
|
319 clrb now D is overall size
|
|
320 ldx ,s bitmap addr
|
|
321 * now we know how big it is
|
|
322 leay d,x
|
|
323 pshs y save ending addr (page)
|
|
324 * the stack image is:
|
|
325 * sp+6=u, usually $4D00
|
|
326 * sp+4=x, usually $4D0F
|
|
327 * sp+2= usually $4000
|
|
328 * sp = top of fat, $4100
|
|
329 L00DC equ *
|
|
330
|
|
331 ifeq h6309-TRUE
|
|
332 leay w,x set y=where active fat ends
|
|
333 else
|
|
334 pshs d
|
|
335 ldd <u0002,u
|
|
336 leay d,x
|
|
337 puls d
|
|
338 endc
|
|
339
|
|
340 pshs y stack the end of active
|
|
341 * the stack image is:
|
|
342 * sp+8=u, usually $4D00
|
|
343 * sp+6=x, usually $4D0F
|
|
344 * sp+4= usually $4000
|
|
345 * sp+2= top of fat, $4100
|
|
346 * sp = end of active fat, $403D?
|
|
347 ldx $04,s s/b the fat workspace base addr
|
|
348 ldb #$FF allocate 1st 8 'sectors'
|
|
349 L00E2 stb ,x+
|
|
350 stb ,x+ make basic alloc $10 sectors
|
|
351 L00E5 clr ,x+ and mark the rest clear
|
|
352 cmpx ,s to end of active
|
|
353 bcs L00E5 (was bcs)till the end of the fat
|
|
354 * should show the end of the fat in x
|
|
355 L00EA stb ,x+ then mark full
|
|
356 cmpx $02,s for remainder of last page
|
|
357 bcs L00EA (wonder if this s/b bls too!)
|
|
358 * the stack image is:
|
|
359 * sp+8=u, usually $4D00
|
|
360 * sp+6=x, usually $4D0F
|
|
361 * sp+4= usually $4000
|
|
362 * sp+2= top of fat, $4100
|
|
363 * sp = end of active fat, $403D?
|
|
364 ldu $08,s get our base page back
|
|
365 lda <D.SysTsk u00D0 note dp, is D.SysTsk
|
|
366 ldb <u0046,u assigned P$Task
|
|
367 pshs d save it for following move
|
|
368 * the stack image is:
|
|
369 * sp+A=u, usually $4D00
|
|
370 * sp+8=x, usually $4D0F
|
|
371 * sp+6= usually $4000
|
|
372 * sp+4= top of fat, $4100
|
|
373 * sp+2= end of active fat, $403D?
|
|
374 * sp = our task numbers
|
|
375 ldd $04,s get end of fat
|
|
376 subd $06,s should leave fatsize in d
|
|
377 tfr d,y size to y
|
|
378 puls d restore our tsknums
|
|
379 * the stack image is:
|
|
380 * sp+8=u, usually $4D00
|
|
381 * sp+6=x, usually $4D0F
|
|
382 * sp+4= usually $4000
|
|
383 * sp+2= top of fat, $4100
|
|
384 * sp = end of active fat, $403D?
|
|
385 ldu #$0100 start of FAT
|
|
386 ldx $04,s
|
|
387 os9 F$Move
|
|
388 * we're done with the fat, its moved into the space
|
|
389 * for the device. Now make a dummy FD in the same
|
|
390 * memory area
|
|
391 leas $02,s don't need end of active fat anymore
|
|
392 MkRoot1 clr ,x+
|
|
393 cmpx ,s clearing the mem,done w/fat
|
|
394 bcs MkRoot1
|
|
395 * the stack image is:
|
|
396 * sp+6=u, usually $4D00
|
|
397 * sp+4=x, usually $4D0F
|
|
398 * sp+2= usually $4000
|
|
399 * sp+0= top of fat, $4100
|
|
400 ldx $02,s
|
|
401 ldu $04,s
|
|
402 * Ok, now lets make an FD sector for the root dir
|
|
403 FDmaker equ *
|
|
404 lda u000D,u DD.ATT
|
|
405 sta ,x
|
|
406 ldd u000B,u
|
|
407 std $01,x
|
|
408 ldb #$01 this is the link count
|
|
409 stb $08,x
|
|
410 ldd #$0040
|
|
411 std $0B,x
|
|
412 ldb DIRloca,u
|
|
413 stb <$12,x
|
|
414 ldd #$0010
|
|
415 * Now a bit more intelligence applied
|
|
416 subb DIRloca,u
|
|
417 std <$13,x
|
|
418 lda <D.SysTsk u00D0
|
|
419 * the stack image is:
|
|
420 * sp+6=u, usually $4D00
|
|
421 * sp+4=x, usually $4D0F
|
|
422 * sp+2= usually $4000
|
|
423 * sp+0= top of fat, $4100
|
|
424 ldu $06,s
|
|
425 ldb <u0046,u
|
|
426 pshs x
|
|
427 * the stack image is:
|
|
428 * sp+8=u, usually $4D00
|
|
429 * sp+6=x, usually $4D0F
|
|
430 * sp+4= usually $4000
|
|
431 * sp+2= top of fat, $4100
|
|
432 * sp = saved bottom of work area
|
|
433 ldx $06,s
|
|
434 * now set u to actual offset of FDlocation
|
|
435
|
|
436 ifeq h6309-TRUE
|
|
437 lde FDlocat,x this is why we saved it
|
|
438 clrf
|
|
439 tfr w,u neat huh?
|
|
440 else
|
|
441 pshs d
|
|
442 lda FDLocat,x
|
|
443 clrb
|
|
444 tfr d,u
|
|
445 puls d
|
|
446 endc
|
|
447
|
|
448 puls x
|
|
449 * the stack image is:
|
|
450 * sp+6=u, usually $4D00
|
|
451 * sp+4=x, usually $4D0F
|
|
452 * sp+2= usually $4000
|
|
453 * sp+0= top of fat, $4100
|
|
454 ldy #$0100
|
|
455 os9 F$Move
|
|
456 leay <$16,x why only $16, the dir is $40!
|
|
457 pshs y
|
|
458 * the stack image is:
|
|
459 * sp+8=u, usually $4D00
|
|
460 * sp+6=x, usually $4D0F
|
|
461 * sp+4= usually $4000
|
|
462 * sp+2= top of fat, $4100
|
|
463 * sp = saved top of work area
|
|
464 L0144 clr ,x+
|
|
465 cmpx ,s
|
|
466 bcs L0144
|
|
467 leas $02,s get rid of that
|
|
468 * the stack image is:
|
|
469 * sp+6=u, usually $4D00
|
|
470 * sp+4=x, usually $4D0F
|
|
471 * sp+2= usually $4000
|
|
472 * sp+0= top of fat, $4100
|
|
473 ldx $02,s s/b right
|
|
474 leay $40,x
|
|
475 pshs y
|
|
476 DClr clr ,x+
|
|
477 cmpx ,s
|
|
478 bcs DClr
|
|
479 leas $02,s
|
|
480 ldx $02,s get it back again
|
|
481 ldd #$2EAE
|
|
482 std ,x
|
|
483 stb <$20,x
|
|
484 * again, I've gotta apply some smarts to locating it
|
|
485 ldx $04,s
|
|
486 ldb FDlocat,x
|
|
487 clra
|
|
488 ldx $02,s
|
|
489 std <$1E,x
|
|
490 std <$3E,x
|
|
491 lda <D.SysTsk u00D0
|
|
492 * the stack image is:
|
|
493 * sp+6=u, usually $4D00
|
|
494 * sp+4=x, usually $4D0F
|
|
495 * sp+2= usually $4000
|
|
496 * sp+0= top of fat, $4100
|
|
497 ldu $06,s
|
|
498 ldb <u0046,u
|
|
499 ldy #$0040
|
|
500 ldx $04,s
|
|
501
|
|
502 ifeq h6309-TRUE
|
|
503 lde DIRloca,x
|
|
504 clrf
|
|
505 tfr w,u
|
|
506 else
|
|
507 pshs d
|
|
508 lda DIRloca,x
|
|
509 clrb
|
|
510 tfr d,u
|
|
511 puls d
|
|
512 endc
|
|
513
|
|
514 ldx $02,s
|
|
515 os9 F$Move
|
|
516 ldx $04,s
|
|
517 lda RD.MAP,x
|
|
518 inca
|
|
519 clrb
|
|
520 leas $02,s
|
|
521 * the stack image is:
|
|
522 * sp+4=u, usually $4D00
|
|
523 * sp+2=x, usually $4D0F
|
|
524 * sp+0= usually $4000
|
|
525 puls u
|
|
526 * the stack image is:
|
|
527 * sp+2=u, usually $4D00
|
|
528 * sp+0=x, usually $4D0F
|
|
529 os9 F$SRtMem give back FatScra
|
|
530 L0178 leas $02,s skip the x offset
|
|
531 puls u get orig assignment back!
|
|
532
|
|
533 ifeq h6309-TRUE
|
|
534 ldw <L018A,pcr
|
|
535 stw Initstt,u crash time?
|
|
536 else
|
|
537 pshs d
|
|
538 ldd <L018A,pcr
|
|
539 std Initstt,u
|
|
540 puls d
|
|
541 endc
|
|
542
|
|
543 clrb
|
|
544 rts puls pc,u U allready pulled, use rts
|
|
545
|
|
546 L017C leas $04,s
|
|
547 puls pc,u
|
|
548 L018A fcs /Gene's RamDisk/
|
|
549 Initchk equ *
|
|
550 ifeq h6309-TRUE
|
|
551 ldw Initstt,u <L018A,pcr
|
|
552 cmpw <L018A,pcr Initstt,u
|
|
553 beq InitOk
|
|
554 else
|
|
555 pshs d
|
|
556 ldd Initstt,u
|
|
557 cmpd <L018A,pcr
|
|
558 puls d
|
|
559 beq InitOk
|
|
560 endc
|
|
561 comb
|
|
562 ldb E$NotRdy else report error
|
|
563 InitOk equ * relocated to give exit report
|
|
564 rts
|
|
565
|
|
566 Read equ *
|
|
567 * First, have we been assigned any memory?
|
|
568 bsr Initchk
|
|
569 * Now, if carry is clear, we have some memory, go
|
|
570 bcc ReadOk
|
|
571 rts return the error condition
|
|
572
|
|
573 ReadOk tst OurLink,u
|
|
574 beq ReadOk1
|
|
575 bsr Linkus bsr ChkLink
|
|
576 ReadOk1 pshs u
|
|
577 bsr L01C2
|
|
578 bcs L01C0
|
|
579 tfr d,x
|
|
580 lda <u0046,u
|
|
581 ldb <D.SysTsk u00D0
|
|
582 ldu $08,y
|
|
583 bra L01B9
|
|
584 ************ A seperate linker
|
|
585 Linkus pshs x
|
|
586 ldx PD.DVT,y
|
|
587 inc V$USRS,x
|
|
588 * ldy OurDesc,u
|
|
589 * ldd M$Name,y
|
|
590 * leax d,y point to device name
|
|
591 * ldd <D.Proc this is temp
|
|
592 * pshs d save it as no time slicing
|
|
593 * ldd <D.SysPrc takes place while
|
|
594 * std <D.Proc this is in effect!
|
|
595 * clra any type/lang
|
|
596 * os9 I$Attach
|
|
597 * puls d
|
|
598 * std <D.Proc
|
|
599 * bcc LinkusOK
|
|
600 * os9 F$Exit take error with us
|
|
601 LinkusOK puls x and restore our entry values
|
|
602 clr OurLink,u so we don't re-attach us again
|
|
603 rts
|
|
604
|
|
605 Write equ *
|
|
606 bsr Initchk
|
|
607 bcc WriteOk
|
|
608 rts
|
|
609 WriteOk tst OurLink,u has it been done?
|
|
610 beq WriteOk1
|
|
611 bsr Linkus
|
|
612 WriteOk1 pshs u
|
|
613 bsr L01C2
|
|
614 bcs L01C0
|
|
615 pshs b,a
|
|
616 lda <D.SysTsk
|
|
617 ldb <u0046,u
|
|
618 ldx $08,y
|
|
619 puls u
|
|
620 L01B9 ldy #$0100
|
|
621 os9 F$Move
|
|
622 L01C0 puls pc,u
|
|
623 L01C2 pshs x
|
|
624 tstb
|
|
625 bne L01F1
|
|
626 L01C7 cmpx <u0010,u
|
|
627 bcc L01F1
|
|
628 tfr x,d
|
|
629
|
|
630 ifeq h6309-TRUE
|
|
631 lsrd /2
|
|
632 lsrd /4
|
|
633 lsrd /8
|
|
634 lsrd /16
|
|
635 else
|
|
636 lsra
|
|
637 rorb
|
|
638 lsra
|
|
639 rorb
|
|
640 lsra
|
|
641 rorb
|
|
642 lsra
|
|
643 rorb
|
|
644 endc
|
|
645
|
|
646 andb #$FE
|
|
647 L01D8 ldx <u0038,u
|
|
648 beq L01F5
|
|
649 ldd d,x
|
|
650 beq L01F5
|
|
651 leax <u0040,u
|
|
652 std <$40,x
|
|
653 os9 F$SetTsk
|
|
654 lda $01,s
|
|
655 anda #$1F
|
|
656 clrb
|
|
657 puls pc,x
|
|
658 L01F1 ldb #$F1 load the error code
|
|
659 bra L01F7
|
|
660 L01F5 ldb #$F4 load the error code
|
|
661 L01F7 orcc #$01 set the carry
|
|
662 puls pc,x and go home with the error
|
|
663 SGtat comb
|
|
664 ldb #$D0 #E$IllMode
|
|
665 rts
|
|
666 Term equ *
|
|
667 pshs u
|
|
668 ifeq h6309-TRUE
|
|
669 ldw <u0036,u
|
|
670 else
|
|
671 ldy <u0036,u
|
|
672 endc
|
|
673
|
|
674 ldu <u0038,u
|
|
675 beq L022A
|
|
676 L020A ldb #$01 is now the same as F$AllRam loop in
|
|
677 ldx ,u++ the Init routine
|
|
678 beq L0213 this fixed some loose
|
|
679 os9 F$DelRAM ends mmap showed
|
|
680 L0213 equ *
|
|
681
|
|
682 ifeq h6309-TRUE
|
|
683 decw was leay -$01,y
|
|
684 else
|
|
685 leay -1,y
|
|
686 endc
|
|
687
|
|
688 bne L020A
|
|
689 ldu ,s
|
|
690 ldd <u0036,u
|
|
691 cmpd #$0020
|
|
692 bls L022A
|
|
693
|
|
694 ifeq h6309-TRUE
|
|
695 lsld
|
|
696 else
|
|
697 lslb
|
|
698 rora
|
|
699 endc
|
|
700
|
|
701 ldu <u0038,u
|
|
702 os9 F$SRtMem
|
|
703 L022A clra to remove, clrb here
|
|
704 clrb
|
|
705 puls u
|
|
706 std Initstt,u and "comment" us out
|
|
707 rts
|
|
708
|
|
709 emod
|
|
710 eom equ *
|
|
711 end
|
|
712
|
|
713 * a parking place for the snoop code
|
|
714 * pshs cc
|
|
715 * os9 F$RegDmp lets take a look
|
|
716 * puls cc
|
|
717 * end of the snoop code, 4 %&$# lines!
|
|
718
|