0
|
1 *****************************
|
|
2 * OS9 DASM VERSION 1.0 *
|
|
3 * (C)1992 J.R.COLLYER *
|
|
4 *****************************
|
|
5
|
|
6 ifp1
|
|
7 use os9defs
|
|
8 endc
|
|
9
|
|
10 begin mod len,name,prgrm+objct,reent+1,entry,dsize
|
|
11 lf equ $0A
|
|
12 cr equ $0D
|
|
13 sp equ $20
|
|
14 mask equ $FF
|
|
15 on equ $FF
|
|
16 stacksz equ 200
|
|
17 buffsiz equ 24576
|
|
18 pagesiz equ 8192
|
|
19 pagenum equ 3
|
|
20 path rmb 1
|
|
21 dpath rmb 1
|
|
22 mode rmb 1
|
|
23 pflag rmb 1
|
|
24 bflag rmb 1
|
|
25 count rmb 1
|
|
26 errnum rmb 1
|
|
27 listflg rmb 1
|
|
28 linkcnt rmb 1
|
|
29 address rmb 2
|
|
30 saveadr rmb 2
|
|
31 auxaddr rmb 2
|
|
32 endaddr rmb 2
|
|
33 moduloc rmb 2
|
|
34 pointer rmb 2
|
|
35 endbuff rmb 2
|
|
36 counter rmb 2
|
|
37 linkaddr rmb 2
|
|
38 curstack rmb 2
|
|
39 lststack rmb 2
|
|
40 firstack rmb 2
|
|
41 branchad rmb 2
|
|
42 offsopt rmb 1
|
|
43 offsflg rmb 1
|
|
44 gimicnt rmb 1
|
|
45 gimidat rmb 3
|
|
46 gimisys rmb 5
|
|
47 xaddress rmb 2
|
|
48 pcaller rmb 1
|
|
49 peflg rmb 1
|
|
50 psflg rmb 1
|
|
51 paddress rmb 2
|
|
52 pendaddr rmb 2
|
|
53 turn rmb 1
|
|
54 status rmb 4
|
|
55 eko rmb 1
|
|
56 rmb 27
|
|
57 linknam rmb stacksz
|
|
58 iobuff rmb stacksz
|
|
59 adrstack rmb stacksz
|
|
60 buffer rmb buffsiz
|
|
61 rmb stacksz
|
|
62 rmb stacksz
|
|
63 dsize equ .
|
|
64 name fcs /Dasm/
|
|
65 fcc /(C)1992 J.R.COLLYER/
|
|
66 fcb 1
|
|
67 entry decb
|
|
68 beq noparams
|
|
69 lbra params
|
|
70 noparams incb
|
|
71 stb path
|
|
72 leay copyr,pcr
|
|
73 bsr echo
|
|
74 lbsr init
|
|
75 centry leay prompt,pcr
|
|
76 bsr echo
|
|
77 lbsr getsta
|
|
78 clr eko,u
|
|
79 lbsr setsta
|
|
80 clra
|
|
81 leax iobuff,u
|
|
82 inkey ldb #1
|
|
83 os9 i$getstt
|
|
84 bcs inkey
|
|
85 ldy #1
|
|
86 os9 i$read
|
|
87 lbcs exit
|
|
88 leay commands,pcr
|
|
89 lda ,x
|
|
90 cmpa #'a
|
|
91 blo cloop
|
|
92 suba #sp
|
|
93 sta ,x
|
|
94 cloop leay 3,y
|
|
95 lda ,y
|
|
96 beq errcom
|
|
97 cmpa ,x
|
|
98 bne cloop
|
|
99 ldd 1,y
|
|
100 leay begin,pcr
|
|
101 jsr d,y
|
|
102 bra centry
|
|
103 errcom bsr comerr
|
|
104 bra centry
|
|
105 comerr bsr echoon
|
|
106 leay whatmsg,pcr
|
|
107 bsr echo
|
|
108 rts
|
|
109 errmsg stb errnum
|
|
110 leay prompt,pcr
|
|
111 bsr echo
|
|
112 ldb errnum
|
|
113 lda #2
|
|
114 os9 f$perr
|
|
115 rts
|
|
116 crlf lda #cr
|
|
117 sta ,x+
|
|
118 clra
|
|
119 sta ,x
|
|
120 leay iobuff,u
|
|
121 echo pshs u
|
|
122 tfr y,x
|
|
123 tfr y,u
|
|
124 ldy #0
|
|
125 outsize ldb ,u+
|
|
126 beq print
|
|
127 leay 1,y
|
|
128 bra outsize
|
|
129 print lda path
|
|
130 os9 i$writln
|
|
131 lbcs fatal
|
|
132 puls u
|
|
133 rts
|
|
134 input leax iobuff,u
|
|
135 ldy #stacksz
|
|
136 clra
|
|
137 os9 i$readln
|
|
138 bcs errmsg
|
|
139 rts
|
|
140 skip lda ,x+
|
|
141 cmpa #sp
|
|
142 beq skip
|
|
143 leax -1,x
|
|
144 rts
|
|
145 commons bsr echoon
|
|
146 bsr echo
|
|
147 bsr input
|
|
148 leax iobuff,u
|
|
149 bsr skip
|
|
150 rts
|
|
151 getsta leax status,u
|
|
152 ldd #0
|
|
153 os9 i$getstt
|
|
154 lbcs exit
|
|
155 rts
|
|
156 setsta os9 i$setstt
|
|
157 lbcs exit
|
|
158 rts
|
|
159 echoon bsr getsta
|
|
160 inc eko,u
|
|
161 bra setsta
|
|
162 shell leay shellmsg,pcr
|
|
163 bsr commons
|
|
164 clra
|
|
165 clrb
|
|
166 pshs u
|
|
167 tfr x,u
|
|
168 tfr d,y
|
|
169 shell2 leay 1,y
|
|
170 lda ,x+
|
|
171 cmpa #cr
|
|
172 bne shell2
|
|
173 clra
|
|
174 leax rshell,pcr
|
|
175 os9 f$fork
|
|
176 lbcs fatal
|
|
177 os9 f$wait
|
|
178 lbcs fatal
|
|
179 puls u
|
|
180 sheout rts
|
|
181 link leay linkmsg,pcr
|
|
182 bsr commons
|
|
183 cmpa #cr
|
|
184 beq sheout
|
|
185 cmpa #'.
|
|
186 beq setlinke
|
|
187 cmpa #'@
|
|
188 beq setlinkx
|
|
189 pelink clra
|
|
190 pshs x
|
|
191 pshs u
|
|
192 os9 f$link
|
|
193 lbcs lfatal
|
|
194 tfr u,x
|
|
195 ldd 2,x
|
|
196 subd #3
|
|
197 puls u
|
|
198 stx moduloc,u
|
|
199 sty address,u
|
|
200 sty linkaddr,u
|
|
201 leay d,x
|
|
202 sty endaddr,u
|
|
203 puls x
|
|
204 pshs x,u
|
|
205 os9 f$prsnam
|
|
206 puls x,u
|
|
207 lbcs errmsg
|
|
208 pshs x,u
|
|
209 leay linknam,u
|
|
210 os9 f$cmpnam
|
|
211 puls x,u
|
|
212 bcs savlnam
|
|
213 lda linkcnt,u
|
|
214 cmpa #on
|
|
215 bhs lnkout
|
|
216 inc linkcnt,u
|
|
217 lnkout rts
|
|
218 savlnam pshs x
|
|
219 clr linkcnt,u
|
|
220 leay linknam,u
|
|
221 putkinam lda ,x+
|
|
222 cmpa #cr
|
|
223 beq sitit
|
|
224 sta ,y+
|
|
225 bra putkinam
|
|
226 sitit leay -1,y
|
|
227 lda ,y
|
|
228 ora #$80
|
|
229 sta ,y
|
|
230 puls x,pc
|
|
231 setlinkx ldy linkaddr,u
|
|
232 sty address,u
|
|
233 rts
|
|
234 setlinke ldy moduloc,u
|
|
235 sty address,u
|
|
236 rts
|
|
237 unlink lbsr echoon
|
|
238 tst linkcnt,u
|
|
239 beq notlink
|
|
240 dec linkcnt,u
|
|
241 leay ulinkmsg,pcr
|
|
242 lbsr echo
|
|
243 pshs u
|
|
244 exg u,x
|
|
245 ldu moduloc,x
|
|
246 os9 f$unlink
|
|
247 bcs fatal
|
|
248 puls u
|
|
249 rts
|
|
250 notlink leay notlkmsg,pcr
|
|
251 lbsr echo
|
|
252 rts
|
|
253 fatal puls u
|
|
254 lbra errmsg
|
|
255 lfatal puls u
|
|
256 puls x
|
|
257 lbra errmsg
|
|
258 quit leay exitmsg,pcr
|
|
259 lbsr commons
|
|
260 ora #sp
|
|
261 cmpa #'y
|
|
262 beq exexit
|
|
263 rts
|
|
264 exexit clrb
|
|
265 exit os9 f$exit
|
|
266 help lbsr echoon
|
|
267 leay helpmsg,pcr
|
|
268 lbsr echo
|
|
269 rts
|
|
270 jump leay jumpmsg,pcr
|
|
271 lbsr commons
|
|
272 pjump leay address,u
|
|
273 sty auxaddr,u
|
|
274 bsr ejaddr
|
|
275 tstb
|
|
276 bne adrerr
|
|
277 ldd address,u
|
|
278 std paddress,u
|
|
279 tst offsopt,u
|
|
280 bne pjump1
|
|
281 bra pjump2
|
|
282 pjump1 pshs d
|
|
283 ldd moduloc,u
|
|
284 addd ,s++
|
|
285 std address,u
|
|
286 pjump2 clrb
|
|
287 rts
|
|
288 ejaddr cmpa #cr
|
|
289 beq addrerr
|
|
290 ldd ,y
|
|
291 std saveadr,u
|
|
292 clr count
|
|
293 clrb
|
|
294 bsr hexcalc
|
|
295 tst count
|
|
296 beq addrerr
|
|
297 clr count
|
|
298 bsr hexcalc
|
|
299 tst count
|
|
300 beq addrerr
|
|
301 stb ,y+
|
|
302 clr count
|
|
303 clrb
|
|
304 bsr hexcalc
|
|
305 tst count
|
|
306 beq addrerr
|
|
307 clr count
|
|
308 bsr hexcalc
|
|
309 tst count
|
|
310 beq addrerr
|
|
311 stb ,y
|
|
312 clrb
|
|
313 rts
|
|
314 hexcalc lda ,x
|
|
315 cmpa #'0
|
|
316 blo jout
|
|
317 cmpa #'9
|
|
318 bls makebin
|
|
319 anda #%11011111
|
|
320 cmpa #'A
|
|
321 blo jout
|
|
322 cmpa #'F
|
|
323 bhi jout
|
|
324 suba #7
|
|
325 makebin suba #'0
|
|
326 pshs a
|
|
327 lda #16
|
|
328 mul
|
|
329 addb ,s+
|
|
330 leax 1,x
|
|
331 inc count
|
|
332 jout rts
|
|
333 addrerr ldd saveadr,u
|
|
334 ldy auxaddr,u
|
|
335 std ,y
|
|
336 bckcall clrb
|
|
337 decb
|
|
338 rts
|
|
339 adrerr tst pcaller,u
|
|
340 bne bckcall
|
|
341 leay prompt,pcr
|
|
342 lbsr echo
|
|
343 leay adrmsg,pcr
|
|
344 lbsr echo
|
|
345 rts
|
|
346 chngend leay endadmsg,pcr
|
|
347 lbsr commons
|
|
348 pchgend leay endaddr,u
|
|
349 sty auxaddr,u
|
|
350 bsr ejaddr
|
|
351 tstb
|
|
352 bne adrerr
|
|
353 ldd endaddr,u
|
|
354 std pendaddr,u
|
|
355 tst offsopt,u
|
|
356 bne pchg1
|
|
357 pchg clrb
|
|
358 rts
|
|
359 pchg1 pshs d
|
|
360 ldd moduloc,u
|
|
361 addd ,s++
|
|
362 std endaddr,u
|
|
363 bra pchg
|
|
364 setmode leay getmode,pcr
|
|
365 lbsr commons
|
|
366 pshs u
|
|
367 leau mode,u
|
|
368 bsr onoff
|
|
369 puls u
|
|
370 tellmode leay prompt,pcr
|
|
371 lbsr echo
|
|
372 tst mode
|
|
373 bmi pmon
|
|
374 leay modemsg2,pcr
|
|
375 bra pmode
|
|
376 pmon leay modemsg1,pcr
|
|
377 pmode lbsr echo
|
|
378 rts
|
|
379 printer leay prtermsg,pcr
|
|
380 lbsr commons
|
|
381 pshs u
|
|
382 leau pflag,u
|
|
383 bsr onoff
|
|
384 puls u
|
|
385 tellprt leay prompt,pcr
|
|
386 lbsr echo
|
|
387 tst pflag
|
|
388 bmi ponm
|
|
389 leay scrmsg,pcr
|
|
390 bra pp
|
|
391 ponm leay prtmsg,pcr
|
|
392 pp lbsr echo
|
|
393 rts
|
|
394 onoff cmpa #'+
|
|
395 beq iton
|
|
396 cmpa #'-
|
|
397 bne exonoff
|
|
398 clr ,u
|
|
399 bra exonoff
|
|
400 iton lda #on
|
|
401 sta ,u
|
|
402 exonoff rts
|
|
403 bcom leay buffmsg,pcr
|
|
404 lbsr commons
|
|
405 cmpa #cr
|
|
406 beq tellb
|
|
407 cmpa #'.
|
|
408 beq buffe
|
|
409 cmpa #'@
|
|
410 beq buffx
|
|
411 tfr a,b
|
|
412 orb #sp
|
|
413 cmpb #'c
|
|
414 beq clsbuff
|
|
415 cmpb #'l
|
|
416 beq list
|
|
417 pshs u
|
|
418 leau bflag,u
|
|
419 bsr onoff
|
|
420 puls u
|
|
421 tellb leay prompt,pcr
|
|
422 lbsr echo
|
|
423 tst bflag
|
|
424 bmi bonm
|
|
425 leay buff1,pcr
|
|
426 bra bmexit
|
|
427 bonm leay buff2,pcr
|
|
428 bmexit lbsr echo
|
|
429 rts
|
|
430 time tst listflg,u
|
|
431 beq timeout
|
|
432 ldx #$3FFF
|
|
433 timel leax -1,x
|
|
434 bne timel
|
|
435 timeout rts
|
|
436 list lda #on
|
|
437 sta listflg,u
|
|
438 bsr listbuff
|
|
439 clr listflg,u
|
|
440 rts
|
|
441 buffe leay buffer,u
|
|
442 bra buffex
|
|
443 buffx ldy xaddress,u
|
|
444 buffex sty address,u
|
|
445 rts
|
|
446 clsbuff leax buffer,u
|
|
447 pshs x
|
|
448 clsloop clr ,x+
|
|
449 cmpx pointer,u
|
|
450 blo clsloop
|
|
451 puls x
|
|
452 stx pointer,u
|
|
453 clr counter,u
|
|
454 clr 1+counter,u
|
|
455 clr mode
|
|
456 clr bflag
|
|
457 rts
|
|
458 listbuff ldx counter,u
|
|
459 cmpx #0
|
|
460 beq listout
|
|
461 pshs x
|
|
462 leay buffer,u
|
|
463 bra lbl1
|
|
464 lbloop puls y
|
|
465 lbl0 lda ,y+
|
|
466 bne lbl0
|
|
467 lbl1 pshs y
|
|
468 lbsr echo
|
|
469 bsr time
|
|
470 ldx counter,u
|
|
471 leax -1,x
|
|
472 stx counter,u
|
|
473 cmpx #0
|
|
474 bne lbloop
|
|
475 puls y
|
|
476 puls x
|
|
477 stx counter,u
|
|
478 listout rts
|
|
479 back lbsr echoon
|
|
480 clr mode
|
|
481 leax iobuff,u
|
|
482 ldd address,u
|
|
483 subd #1
|
|
484 tfr d,y
|
|
485 tst offsopt,u
|
|
486 beq back2
|
|
487 lbsr setoffs
|
|
488 back2 lbsr outhex2
|
|
489 lbra next
|
|
490 ascii lbsr echoon
|
|
491 ascii2 clr mode
|
|
492 leax iobuff,u
|
|
493 ldd address,u
|
|
494 tfr d,y
|
|
495 tst offsopt,u
|
|
496 beq ascii3
|
|
497 lbsr setoffs
|
|
498 ascii3 lbsr outhex2
|
|
499 lbsr space1
|
|
500 ldb ,y+
|
|
501 pshs b
|
|
502 lbsr outhex1
|
|
503 lbsr space2
|
|
504 puls b
|
|
505 cmpb #'z+1
|
|
506 bhs dot
|
|
507 cmpb #sp
|
|
508 blo dot
|
|
509 stb ,x+
|
|
510 lbra next
|
|
511 dot ldb #'.
|
|
512 stb ,x+
|
|
513 lbra next
|
|
514 read leay fname,pcr
|
|
515 lbsr commons
|
|
516 cmpa #cr
|
|
517 beq readout
|
|
518 lda #exec.+read.
|
|
519 os9 i$open
|
|
520 lbcs errmsg
|
|
521 sta dpath
|
|
522 bsr moduread
|
|
523 bsr moduadrs
|
|
524 clr bflag
|
|
525 clr mode
|
|
526 readout rts
|
|
527 moduread leax buffer,u
|
|
528 ldy #buffsiz
|
|
529 os9 i$read
|
|
530 bcs chkeof
|
|
531 lda dpath
|
|
532 os9 i$close
|
|
533 rts
|
|
534 chkeof cmpb #e$eof
|
|
535 lbne errmsg
|
|
536 lda dpath
|
|
537 os9 i$close
|
|
538 lbcs errmsg
|
|
539 rts
|
|
540 moduadrs leax buffer,u
|
|
541 stx moduloc,u
|
|
542 ldd 2,x
|
|
543 subd #3
|
|
544 leay d,x
|
|
545 sty endaddr,u
|
|
546 ldd 9,x
|
|
547 leay d,x
|
|
548 sty address,u
|
|
549 sty xaddress,u
|
|
550 rts
|
|
551 write leay fname,pcr
|
|
552 lbsr commons
|
|
553 lda ,x
|
|
554 cmpa #cr
|
|
555 beq writout
|
|
556 cmpa #'*
|
|
557 beq makefile
|
|
558 bra openfile
|
|
559 makefile leax 1,x
|
|
560 lbsr skip
|
|
561 lda ,x
|
|
562 cmpa #cr
|
|
563 beq writout
|
|
564 lda #updat.
|
|
565 ldb #$0B
|
|
566 os9 i$create
|
|
567 lbcs errmsg
|
|
568 sta dpath
|
|
569 bsr outdisk
|
|
570 outwrit lda dpath
|
|
571 os9 i$close
|
|
572 lbcs errmsg
|
|
573 clr mode
|
|
574 clr bflag
|
|
575 writout rts
|
|
576 openfile lda #updat.
|
|
577 os9 i$open
|
|
578 lbcs errmsg
|
|
579 sta dpath
|
|
580 bsr seek
|
|
581 bsr outdisk
|
|
582 bra outwrit
|
|
583 seek pshs u
|
|
584 lda dpath
|
|
585 ldb #$02
|
|
586 os9 i$getstt
|
|
587 lbcs fatal
|
|
588 os9 i$seek
|
|
589 lbcs fatal
|
|
590 puls u
|
|
591 rts
|
|
592 chkbuff ldx pointer,u
|
|
593 cmpx endbuff,u
|
|
594 bhs outb2
|
|
595 leay iobuff,u
|
|
596 bufloop lda ,y+
|
|
597 sta ,x+
|
|
598 beq bnl
|
|
599 bra bufloop
|
|
600 bnl leay pointer,u
|
|
601 stx ,y
|
|
602 ldx counter,u
|
|
603 leax 1,x
|
|
604 stx counter,u
|
|
605 rts
|
|
606 outb2 leay prompt,pcr
|
|
607 lbsr echo
|
|
608 leay bfull,pcr
|
|
609 lbsr echo
|
|
610 clr bflag
|
|
611 clr mode
|
|
612 rts
|
|
613 outdisk lda dpath
|
|
614 ldb path
|
|
615 sta path
|
|
616 stb dpath
|
|
617 lbsr listbuff
|
|
618 lda path
|
|
619 ldb dpath
|
|
620 sta dpath
|
|
621 stb path
|
|
622 rts
|
|
623 branch lbsr echoon
|
|
624 ldx curstack,u
|
|
625 cmpx lststack,u
|
|
626 beq nomove
|
|
627 ldy address,u
|
|
628 sty ,x++
|
|
629 stx curstack,u
|
|
630 ldx branchad,u
|
|
631 stx address,u
|
|
632 lbra ddentry
|
|
633 nomove leay stackms1,pcr
|
|
634 nomove1 lbsr echo
|
|
635 rts
|
|
636 return lbsr echoon
|
|
637 ldx curstack,u
|
|
638 cmpx firstack,u
|
|
639 bhi yesmove
|
|
640 leay stackms2,pcr
|
|
641 bra nomove1
|
|
642 yesmove ldy ,--x
|
|
643 stx curstack,u
|
|
644 sty address,u
|
|
645 lbra ddentry
|
|
646 leay stackms2,pcr
|
|
647 lbsr echo
|
|
648 rts
|
|
649 offscom leay offsmsg,pcr
|
|
650 lbsr commons
|
|
651 pshs u
|
|
652 leau offsopt,u
|
|
653 lbsr onoff
|
|
654 puls u
|
|
655 telloffs leay prompt,pcr
|
|
656 lbsr echo
|
|
657 tst offsopt,u
|
|
658 bmi offson
|
|
659 leay offsmsg2,pcr
|
|
660 bra offsmode
|
|
661 offson leay offsmsg1,pcr
|
|
662 offsmode lbsr echo
|
|
663 rts
|
|
664 gimicom leay gimimsg,pcr
|
|
665 lbsr commons
|
|
666 clr gimicnt,u
|
|
667 leay gimidat,u
|
|
668 gimiloop lda ,x+
|
|
669 cmpa #cr
|
|
670 beq gimichk
|
|
671 cmpa #sp
|
|
672 beq gimiloop
|
|
673 cmpa #',
|
|
674 beq gimiloop
|
|
675 leax -1,x
|
|
676 clr count
|
|
677 clrb
|
|
678 lbsr hexcalc
|
|
679 tst count
|
|
680 beq gimibad
|
|
681 clr count
|
|
682 lbsr hexcalc
|
|
683 tst count
|
|
684 beq gimibad
|
|
685 cmpb #mask
|
|
686 bls nologic
|
|
687 orb #mask
|
|
688 andb #mask
|
|
689 nologic stb ,y+
|
|
690 inc gimicnt,u
|
|
691 ldb #pagenum
|
|
692 cmpb gimicnt,u
|
|
693 bne gimiloop
|
|
694 gimichk tst gimicnt,u
|
|
695 beq gimiprt
|
|
696 clra
|
|
697 clrb
|
|
698 gimiloo addd #pagesiz
|
|
699 dec gimicnt,u
|
|
700 bne gimiloo
|
|
701 leay gimidat,u
|
|
702 exg d,y
|
|
703 ldx #0
|
|
704 pshs u
|
|
705 leau buffer,u
|
|
706 swi2
|
|
707 fcb $1B
|
|
708 lbcs fatal
|
|
709 puls u
|
|
710 gimiprt leay buffer,u
|
|
711 sty address,u
|
|
712 leay prompt,pcr
|
|
713 lbsr echo
|
|
714 lbra ascii2
|
|
715 gimibad leay prompt,pcr
|
|
716 lbsr echo
|
|
717 ldb turn,u
|
|
718 eorb #on
|
|
719 stb turn,u
|
|
720 beq nxturn
|
|
721 leay gimimsg1,pcr
|
|
722 gbadout lbsr echo
|
|
723 rts
|
|
724 nxturn leay gimimsg2,pcr
|
|
725 bra gbadout
|
|
726 init ldb #100
|
|
727 leax dpath,u
|
|
728 initloop clr ,x+
|
|
729 decb
|
|
730 bne initloop
|
|
731 leax buffer,u
|
|
732 stx pointer,u
|
|
733 ldd #buffsiz
|
|
734 leay d,x
|
|
735 sty endbuff,u
|
|
736 ldd #$FFEF
|
|
737 std endaddr,u
|
|
738 prgmdat lda #mask top page
|
|
739 ldb #8
|
|
740 leay gimidat,u
|
|
741 prgdatlp sta ,y+
|
|
742 deca
|
|
743 decb
|
|
744 bne prgdatlp
|
|
745 lda #on
|
|
746 sta turn,u
|
|
747 leay dasmmsg,pcr
|
|
748 leax linknam,u
|
|
749 stuff1 lda ,y+
|
|
750 sta ,x+
|
|
751 bne stuff1
|
|
752 initstak leax adrstack,u
|
|
753 stx curstack,u
|
|
754 stx firstack,u
|
|
755 ldd #stacksz
|
|
756 leay d,x
|
|
757 sty lststack,u
|
|
758 rts
|
|
759 setoffs pshs a
|
|
760 lda #on
|
|
761 sta offsflg,u
|
|
762 puls a
|
|
763 rts
|
|
764 dentry lbsr echoon
|
|
765 ddentry ldy address,u
|
|
766 leax iobuff,u
|
|
767 pshs y
|
|
768 ldd ,s
|
|
769 tst offsopt,u
|
|
770 beq dentry2
|
|
771 bsr setoffs
|
|
772 dentry2 lbsr outhex2
|
|
773 lbsr space1
|
|
774 puls y
|
|
775 ldb ,y+
|
|
776 tfr b,a
|
|
777 bita #$80
|
|
778 lbmi grp80
|
|
779 anda #$F0
|
|
780 lbeq grp0
|
|
781 cmpa #$10
|
|
782 lbeq grp10
|
|
783 cmpa #$20
|
|
784 lbeq grp20
|
|
785 cmpa #$30
|
|
786 lbeq grp30
|
|
787 cmpa #$60
|
|
788 lbeq grp60
|
|
789 cmpa #$70
|
|
790 lbeq grp70
|
|
791 pshs b
|
|
792 pshs y
|
|
793 andb #$0F
|
|
794 lbsr set
|
|
795 puls y
|
|
796 puls b
|
|
797 andb #$F0
|
|
798 cmpb #$50
|
|
799 beq grp50
|
|
800 lda #'a
|
|
801 bra save
|
|
802 grp50 lda #'b
|
|
803 save sta ,x+
|
|
804 next sty address,u
|
|
805 lbsr crlf
|
|
806 options tst pflag
|
|
807 beq chkdisk
|
|
808 bsr hardprt
|
|
809 chkdisk tst bflag
|
|
810 beq chkauto
|
|
811 bsr diskwrt
|
|
812 chkauto tst mode
|
|
813 bmi automat
|
|
814 rts
|
|
815 automat ldd address,u
|
|
816 cmpd endaddr,u
|
|
817 lblo ddentry
|
|
818 rts
|
|
819 hardprt leax pmsg,pcr
|
|
820 lda #write.
|
|
821 os9 i$open
|
|
822 bcc hard
|
|
823 cmpb #246
|
|
824 beq hardprt
|
|
825 lbra errmsg
|
|
826 hard sta dpath
|
|
827 hard1 lda dpath
|
|
828 leax iobuff,u
|
|
829 ldy #stacksz
|
|
830 os9 i$writln
|
|
831 bcc hardout
|
|
832 cmpb #246
|
|
833 beq hard1
|
|
834 lbra errmsg
|
|
835 hardout lda dpath
|
|
836 os9 i$close
|
|
837 lbcs errmsg
|
|
838 rts
|
|
839 diskwrt lbsr chkbuff
|
|
840 rts
|
|
841 params ldb #1
|
|
842 stb path
|
|
843 pshs x
|
|
844 lbsr init
|
|
845 puls x
|
|
846 ldb #on
|
|
847 stb mode
|
|
848 stb pcaller,u
|
|
849 getparm lbsr skip
|
|
850 lda ,x+
|
|
851 cmpa #'-
|
|
852 lbne syntax
|
|
853 lbsr skip
|
|
854 lda ,x+
|
|
855 ora #sp
|
|
856 cmpa #'o
|
|
857 bne chkend
|
|
858 bsr chksub
|
|
859 stb offsopt,u
|
|
860 bra getparm
|
|
861 chkend cmpa #'e
|
|
862 bne chkstart
|
|
863 lbsr skip
|
|
864 lbsr pchgend
|
|
865 tstb
|
|
866 lbne syntaxa
|
|
867 bsr chksub
|
|
868 stb peflg,u
|
|
869 bra getparm
|
|
870 chkstart cmpa #'s
|
|
871 lbhi syntax
|
|
872 bne chkmem
|
|
873 lbsr skip
|
|
874 lbsr pjump
|
|
875 tstb
|
|
876 lbne syntaxa
|
|
877 bsr chksub
|
|
878 stb psflg,u
|
|
879 bra getparm
|
|
880 chksub clrb
|
|
881 decb
|
|
882 rts
|
|
883 chkmem cmpa #'m
|
|
884 bne chkread
|
|
885 bra penter
|
|
886 chkread cmpa #'r
|
|
887 beq inputr
|
|
888 cmpa #'l
|
|
889 lbne syntax
|
|
890 lbsr skip
|
|
891 bsr psnam
|
|
892 clra
|
|
893 pshs x,u
|
|
894 os9 f$link
|
|
895 bcs pfatal
|
|
896 puls x,u
|
|
897 bsr psnam
|
|
898 lbsr pelink
|
|
899 bra penter
|
|
900 pfatal puls x,u
|
|
901 lbra pexit
|
|
902 psnam pshs x
|
|
903 lda #'/
|
|
904 cmpa ,x
|
|
905 beq skip2
|
|
906 leax -1,x
|
|
907 sta ,x
|
|
908 skip2 os9 f$prsnam
|
|
909 bcs syntax
|
|
910 lda #cr
|
|
911 sta ,y
|
|
912 puls x
|
|
913 rts
|
|
914 inputr lbsr skip
|
|
915 lda ,x
|
|
916 cmpa #cr
|
|
917 beq syntax
|
|
918 lda #exec.+read.
|
|
919 os9 i$open
|
|
920 bcs pexit
|
|
921 sta dpath
|
|
922 lbsr moduread
|
|
923 lbsr moduadrs
|
|
924 penter tst psflg,u
|
|
925 beq pent10
|
|
926 tst offsopt,u
|
|
927 bne pent05
|
|
928 ldd paddress,u
|
|
929 std address,u
|
|
930 bra pent10
|
|
931 pent05 ldd paddress,u
|
|
932 pshs d
|
|
933 ldd moduloc,u
|
|
934 addd ,s++
|
|
935 std address,u
|
|
936 bra pent10
|
|
937 pent20 lbsr ddentry
|
|
938 bra pnoerr
|
|
939 pent10 tst peflg,u
|
|
940 beq pent20
|
|
941 tst offsopt,u
|
|
942 bne pent15
|
|
943 ldd pendaddr,u
|
|
944 std endaddr,u
|
|
945 bra pent20
|
|
946 pent15 ldd pendaddr,u
|
|
947 pshs d
|
|
948 ldd moduloc,u
|
|
949 addd ,s++
|
|
950 std endaddr,u
|
|
951 bra pent20
|
|
952 syntax leay usemsg,pcr
|
|
953 syntax1 lbsr echo
|
|
954 bra pnoerr
|
|
955 syntaxa leay usemsg,pcr
|
|
956 lbsr echo
|
|
957 leay adrmsg,pcr
|
|
958 bra syntax1
|
|
959 pexit lda #2
|
|
960 os9 f$perr
|
|
961 pnoerr clrb
|
|
962 os9 f$exit
|
|
963 grp0 pshs y
|
|
964 bsr set
|
|
965 bsr space2
|
|
966 g00 bsr dsign
|
|
967 g01 puls y
|
|
968 ldb ,y+
|
|
969 lbsr outhex1
|
|
970 lbra next
|
|
971 grp20 bsr sub20
|
|
972 g20 bsr space2
|
|
973 ldb ,y+
|
|
974 sex
|
|
975 lbra sbr
|
|
976 sub20 pshs y
|
|
977 leay table2,pcr
|
|
978 lda #4
|
|
979 bsr match
|
|
980 deca
|
|
981 bsr put
|
|
982 puls y
|
|
983 rts
|
|
984 grp70 andb #$0F
|
|
985 pshs y
|
|
986 bsr set
|
|
987 bsr space2
|
|
988 g70 bsr esign
|
|
989 g71 puls y
|
|
990 ldd ,y++
|
|
991 bsr outhex2
|
|
992 lbra next
|
|
993 set leay table1,pcr
|
|
994 lda #4
|
|
995 bsr match
|
|
996 deca
|
|
997 bsr put
|
|
998 rts
|
|
999 match cmpb ,y
|
|
1000 beq itis
|
|
1001 leay a,y
|
|
1002 bra match
|
|
1003 itis leay 1,y
|
|
1004 rts
|
|
1005 space2 ldd #$2020
|
|
1006 std ,x++
|
|
1007 rts
|
|
1008 space1 lda #$20
|
|
1009 sta ,x+
|
|
1010 rts
|
|
1011 dsign lda #$3C
|
|
1012 sta ,x+
|
|
1013 rts
|
|
1014 esign lda #$3E
|
|
1015 sta ,x+
|
|
1016 rts
|
|
1017 minus lda #'-
|
|
1018 sta ,x+
|
|
1019 rts
|
|
1020 put ldb ,y+
|
|
1021 stb ,x+
|
|
1022 deca
|
|
1023 bne put
|
|
1024 rts
|
|
1025 coma lda #',
|
|
1026 sta ,x+
|
|
1027 rts
|
|
1028 outhex2 tst offsflg,u
|
|
1029 beq outhex3
|
|
1030 clr offsflg,u
|
|
1031 cmpd moduloc,u
|
|
1032 blo outhex3
|
|
1033 cmpd endaddr,u
|
|
1034 bhi outhex3
|
|
1035 subd moduloc,u
|
|
1036 outhex3 exg a,b
|
|
1037 bsr outhex1
|
|
1038 tfr a,b
|
|
1039 outhex1 pshs b
|
|
1040 andb #$F0
|
|
1041 lsrb
|
|
1042 lsrb
|
|
1043 lsrb
|
|
1044 lsrb
|
|
1045 bsr v1
|
|
1046 puls b
|
|
1047 andb #$0F
|
|
1048 v1 cmpb #9
|
|
1049 bls v2
|
|
1050 addb #7
|
|
1051 v2 addb #$30
|
|
1052 stb ,x+
|
|
1053 rts
|
|
1054 grp60 andb #$0F
|
|
1055 pshs y
|
|
1056 lbsr set
|
|
1057 lbsr space2
|
|
1058 puls y
|
|
1059 ldb ,y+
|
|
1060 lbsr index
|
|
1061 lbra next
|
|
1062 grp10 pshs y
|
|
1063 cmpb #$10
|
|
1064 lbeq s10
|
|
1065 cmpb #$12
|
|
1066 lblo s11
|
|
1067 beq grp12
|
|
1068 cmpb #$13
|
|
1069 beq grp13
|
|
1070 cmpb #$19
|
|
1071 lblo grpsb
|
|
1072 beq grp19
|
|
1073 cmpb #$1D
|
|
1074 blo grpccr
|
|
1075 beq grpsex
|
|
1076 lda #5
|
|
1077 cmpb #$1F
|
|
1078 beq grp1f
|
|
1079 leay rexg,pcr
|
|
1080 n1e lbsr put
|
|
1081 puls y
|
|
1082 ldb ,y+
|
|
1083 pshs y
|
|
1084 pshs b
|
|
1085 andb #$F0
|
|
1086 lsrb
|
|
1087 lsrb
|
|
1088 lsrb
|
|
1089 lsrb
|
|
1090 bsr readreg
|
|
1091 lda #',
|
|
1092 sta ,x+
|
|
1093 puls b
|
|
1094 andb #$0F
|
|
1095 bsr readreg
|
|
1096 puls y
|
|
1097 lbra next
|
|
1098 grp1f leay rtfr,pcr
|
|
1099 bra n1e
|
|
1100 readreg tfr x,y
|
|
1101 leax rbyte,pcr
|
|
1102 loop2 cmpb ,x
|
|
1103 beq gotit
|
|
1104 leax 3,x
|
|
1105 bra loop2
|
|
1106 gotit ldb 1,x
|
|
1107 tst 2,x
|
|
1108 abx
|
|
1109 bmi get2
|
|
1110 ldb ,x
|
|
1111 stb ,y+
|
|
1112 bra rout
|
|
1113 get2 ldd ,x
|
|
1114 std ,y++
|
|
1115 rout tfr y,x
|
|
1116 rts
|
|
1117 grp12 leay rnop,pcr
|
|
1118 bra out10a
|
|
1119 grp13 leay rsync,pcr
|
|
1120 lda #4
|
|
1121 bra out10b
|
|
1122 grp19 leay rdaa,pcr
|
|
1123 bra out10a
|
|
1124 grpsex leay rsex,pcr
|
|
1125 out10a lda #3
|
|
1126 out10b lbsr put
|
|
1127 puls y
|
|
1128 lbra next
|
|
1129 grpccr cmpb #$1A
|
|
1130 bne grp1c
|
|
1131 leay rorcc,pcr
|
|
1132 outccr lda #7
|
|
1133 lbsr put
|
|
1134 lbra g01
|
|
1135 grp1c leay randcc,pcr
|
|
1136 bra outccr
|
|
1137 grpsb cmpb #$16
|
|
1138 bne grp17
|
|
1139 leay rlbra,pcr
|
|
1140 sbout lda #5
|
|
1141 lbsr put
|
|
1142 lbr puls y
|
|
1143 ldd ,y++
|
|
1144 sbr pshs y
|
|
1145 addd ,s
|
|
1146 std branchad,u
|
|
1147 tst offsopt,u
|
|
1148 beq srb2
|
|
1149 lbsr setoffs
|
|
1150 srb2 lbsr outhex2
|
|
1151 puls y
|
|
1152 lbra next
|
|
1153 grp17 leay rlbsr,pcr
|
|
1154 bra sbout
|
|
1155 grp30 pshs y
|
|
1156 cmpb #$38
|
|
1157 bhi rest30
|
|
1158 cmpb #$34
|
|
1159 lblo lea30
|
|
1160 tfr b,a
|
|
1161 lsrb
|
|
1162 bcc push
|
|
1163 leay pull,pcr
|
|
1164 bsr puss
|
|
1165 puls y
|
|
1166 ldb ,y+
|
|
1167 pshs y
|
|
1168 leay order2,pcr
|
|
1169 lda #8
|
|
1170 loop3 lsrb
|
|
1171 bsr tstbit
|
|
1172 deca
|
|
1173 bne loop3
|
|
1174 bra out30
|
|
1175 push leay pshr,pcr
|
|
1176 bsr puss
|
|
1177 puls y
|
|
1178 ldb ,y+
|
|
1179 pshs y
|
|
1180 leay order1,pcr
|
|
1181 lda #8
|
|
1182 loop4 lslb
|
|
1183 bsr tstbit
|
|
1184 deca
|
|
1185 bne loop4
|
|
1186 bra out30
|
|
1187 tstbit bcs tst30
|
|
1188 leay 2,y
|
|
1189 rts
|
|
1190 tst30 pshs d
|
|
1191 ldd ,y++
|
|
1192 tsta
|
|
1193 bmi clrp
|
|
1194 std ,x++
|
|
1195 sep lda #',
|
|
1196 sta ,x+
|
|
1197 puls d
|
|
1198 rts
|
|
1199 clrp stb ,x+
|
|
1200 bra sep
|
|
1201 puss pshs a
|
|
1202 lda #3
|
|
1203 lbsr put
|
|
1204 puls b
|
|
1205 bsr usreg
|
|
1206 rts
|
|
1207 usreg andb #$02
|
|
1208 bne rureg
|
|
1209 lda #'s
|
|
1210 pit sta ,x+
|
|
1211 lda #$20
|
|
1212 sta ,x+
|
|
1213 rts
|
|
1214 rureg lda #'u
|
|
1215 bra pit
|
|
1216 out30 puls y
|
|
1217 leax -1,x
|
|
1218 lbra next
|
|
1219 rest30 cmpb #$3C
|
|
1220 beq ccwait
|
|
1221 leay table3,pcr
|
|
1222 lda #4
|
|
1223 lbsr match
|
|
1224 deca
|
|
1225 lbsr put
|
|
1226 puls y
|
|
1227 lbra next
|
|
1228 ccwait leay rccwai,pcr
|
|
1229 lda #6
|
|
1230 lbsr put
|
|
1231 lbra g01
|
|
1232 lea30 leay rlea,pcr
|
|
1233 lda #3
|
|
1234 pshs b
|
|
1235 lbsr put
|
|
1236 puls a
|
|
1237 clrb
|
|
1238 anda #$0F
|
|
1239 pshs a
|
|
1240 loop5 cmpb ,s
|
|
1241 beq dpit
|
|
1242 incb
|
|
1243 bra loop5
|
|
1244 dpit pshs x
|
|
1245 leax lregr,pcr
|
|
1246 abx
|
|
1247 lda ,x
|
|
1248 puls x
|
|
1249 sta ,x+
|
|
1250 lbsr space1
|
|
1251 puls a
|
|
1252 dpit1 puls y
|
|
1253 ldb ,y+
|
|
1254 bsr index
|
|
1255 lbra next
|
|
1256 index pshs b
|
|
1257 tstb
|
|
1258 bmi not5
|
|
1259 bit5 bitb #$10
|
|
1260 beq posi
|
|
1261 orb #$F0
|
|
1262 negb
|
|
1263 lbsr minus
|
|
1264 b5out lbsr outhex1
|
|
1265 lbsr coma
|
|
1266 puls b
|
|
1267 bsr rr
|
|
1268 rts
|
|
1269 posi andb #$0F
|
|
1270 bra b5out
|
|
1271 not5 aslb
|
|
1272 aslb
|
|
1273 aslb
|
|
1274 aslb
|
|
1275 lbcs indirect
|
|
1276 beq rplus1
|
|
1277 bmi first
|
|
1278 aslb
|
|
1279 bmi second
|
|
1280 aslb
|
|
1281 bmi third
|
|
1282 bra rplus2
|
|
1283 first aslb
|
|
1284 lbeq bit8r
|
|
1285 bmi rpcrl
|
|
1286 aslb
|
|
1287 lbmi dr
|
|
1288 aslb
|
|
1289 lbmi bit16r
|
|
1290 lbra rqq
|
|
1291 second aslb
|
|
1292 bmi ar
|
|
1293 beq zoro
|
|
1294 aslb
|
|
1295 bmi br
|
|
1296 lbra rqq
|
|
1297 third aslb
|
|
1298 bmi minus2
|
|
1299 beq minus1
|
|
1300 lbra rqq
|
|
1301 rpcrl aslb
|
|
1302 lbeq bit8pr
|
|
1303 lbra bit16p
|
|
1304 rr pshs b
|
|
1305 andb #$60
|
|
1306 beq xregr
|
|
1307 cmpb #$20
|
|
1308 beq yregr
|
|
1309 cmpb #$40
|
|
1310 beq uregr
|
|
1311 cmpb #$60
|
|
1312 beq sregr
|
|
1313 lbra rqq
|
|
1314 xregr lda #'x
|
|
1315 bra store
|
|
1316 yregr lda #'y
|
|
1317 bra store
|
|
1318 uregr lda #'u
|
|
1319 bra store
|
|
1320 sregr lda #'s
|
|
1321 store sta ,x+
|
|
1322 puls b
|
|
1323 rts
|
|
1324 rplus1 puls b
|
|
1325 bsr rplus3
|
|
1326 lda #'+
|
|
1327 sta ,x+
|
|
1328 rts
|
|
1329 rplus2 puls b
|
|
1330 bsr rplus3
|
|
1331 ldd #$2B2B
|
|
1332 std ,x++
|
|
1333 rts
|
|
1334 rplus3 lbsr coma
|
|
1335 bsr rr
|
|
1336 rts
|
|
1337 minus1 lbsr coma
|
|
1338 lda #'-
|
|
1339 sta ,x+
|
|
1340 puls b
|
|
1341 bra rr
|
|
1342 minus2 lbsr coma
|
|
1343 ldd #$2D2D
|
|
1344 std ,x++
|
|
1345 puls b
|
|
1346 bra rr
|
|
1347 zoro puls b
|
|
1348 bra rplus3
|
|
1349 ar lda #'a
|
|
1350 bra abd
|
|
1351 br lda #'b
|
|
1352 bra abd
|
|
1353 dr lda #'d
|
|
1354 abd sta ,x+
|
|
1355 puls b
|
|
1356 bra rplus3
|
|
1357 bit8r ldb ,y+
|
|
1358 tstb
|
|
1359 bpl plus8
|
|
1360 negb
|
|
1361 lbsr minus
|
|
1362 plus8 lbsr outhex1
|
|
1363 puls b
|
|
1364 bra rplus3
|
|
1365 bit16r ldd ,y++
|
|
1366 tsta
|
|
1367 bpl plus16
|
|
1368 coma
|
|
1369 comb
|
|
1370 addd #1
|
|
1371 pshs a
|
|
1372 lbsr minus
|
|
1373 puls a
|
|
1374 plus16 lbsr outhex2
|
|
1375 puls b
|
|
1376 bra rplus3
|
|
1377 bit8pr ldb ,y+
|
|
1378 sex
|
|
1379 pshs y
|
|
1380 addd ,s
|
|
1381 tst offsopt,u
|
|
1382 beq bit8pr2
|
|
1383 lbsr setoffs
|
|
1384 bit8pr2 lbsr outhex2
|
|
1385 pcrn lbsr coma
|
|
1386 leay rpcr,pcr
|
|
1387 lda #3
|
|
1388 lbsr put
|
|
1389 puls y
|
|
1390 puls b
|
|
1391 rts
|
|
1392 bit16p ldd ,y++
|
|
1393 pshs y
|
|
1394 addd ,s
|
|
1395 tst offsopt,u
|
|
1396 beq bit16p2
|
|
1397 lbsr setoffs
|
|
1398 bit16p2 lbsr outhex2
|
|
1399 bra pcrn
|
|
1400 indirect puls b
|
|
1401 lda #$5B
|
|
1402 sta ,x+
|
|
1403 cmpb #$9F
|
|
1404 beq exdirect
|
|
1405 andb #$EF
|
|
1406 lbsr index
|
|
1407 indirout lda #$5D
|
|
1408 sta ,x+
|
|
1409 rts
|
|
1410 exdirect ldd ,y++
|
|
1411 lbsr outhex2
|
|
1412 bra indirout
|
|
1413 rqq ldd #$3F3F
|
|
1414 std ,x++
|
|
1415 puls b
|
|
1416 rts
|
|
1417 s10 puls y
|
|
1418 ldb ,y+
|
|
1419 pshs y
|
|
1420 cmpb #$30
|
|
1421 blo cbr
|
|
1422 cmpb #$3F
|
|
1423 beq os9
|
|
1424 bhi srest
|
|
1425 x10 puls y
|
|
1426 ldd #$3F3F
|
|
1427 std ,x++
|
|
1428 lbra next
|
|
1429 cbr cmpb #$20
|
|
1430 blo x10
|
|
1431 lda #'l
|
|
1432 sta ,x+
|
|
1433 lbsr sub20
|
|
1434 lbsr space1
|
|
1435 lbra lbr
|
|
1436 os9 puls y
|
|
1437 ldb ,y+
|
|
1438 pshs y
|
|
1439 pshs b
|
|
1440 leay ros9,pcr
|
|
1441 lda #5
|
|
1442 lbsr put
|
|
1443 leay os9table,pcr
|
|
1444 puls b
|
|
1445 os9loop cmpb ,y+
|
|
1446 bne os9next
|
|
1447 lda ,y+
|
|
1448 lbsr put
|
|
1449 os9out puls y
|
|
1450 lbra next
|
|
1451 os9next pshs b
|
|
1452 ldb ,y+
|
|
1453 exg x,y
|
|
1454 abx
|
|
1455 exg x,y
|
|
1456 puls b
|
|
1457 cmpy ros9end,pcr
|
|
1458 beq os9out
|
|
1459 bra os9loop
|
|
1460 srest tfr b,a
|
|
1461 rolb
|
|
1462 bmi overc
|
|
1463 pshs b
|
|
1464 tfr a,b
|
|
1465 leay tab1,pcr
|
|
1466 enter11 lda #6
|
|
1467 solve andb #$0F
|
|
1468 lbsr match
|
|
1469 deca
|
|
1470 lbsr put
|
|
1471 puls b
|
|
1472 rolb
|
|
1473 bmi next10
|
|
1474 rolb
|
|
1475 lbmi g00
|
|
1476 lda #'#
|
|
1477 sta ,x+
|
|
1478 lbra g71
|
|
1479 next10 rolb
|
|
1480 lbmi g70
|
|
1481 lbra dpit1
|
|
1482 overc pshs b
|
|
1483 tfr a,b
|
|
1484 leay tab2,pcr
|
|
1485 bra enter11
|
|
1486 s11 puls y
|
|
1487 ldb ,y+
|
|
1488 pshs y
|
|
1489 cmpb #$3F
|
|
1490 lblo x10
|
|
1491 bhi rest11
|
|
1492 leay rswi3,pcr
|
|
1493 lda #4
|
|
1494 lbsr put
|
|
1495 puls y
|
|
1496 lbra next
|
|
1497 rest11 tfr b,a
|
|
1498 rolb
|
|
1499 pshs b
|
|
1500 tfr a,b
|
|
1501 leay tab11,pcr
|
|
1502 bra enter11
|
|
1503 grp80 pshs y
|
|
1504 pshs b
|
|
1505 tfr b,a
|
|
1506 andb #$F0
|
|
1507 lslb
|
|
1508 beq check1
|
|
1509 lslb
|
|
1510 beq check2
|
|
1511 rein80 puls b
|
|
1512 tfr b,a
|
|
1513 rolb
|
|
1514 bmi over8
|
|
1515 leay tab80a,pcr
|
|
1516 mm80 pshs b
|
|
1517 tfr a,b
|
|
1518 bra enter11
|
|
1519 over8 leay tab80b,pcr
|
|
1520 bra mm80
|
|
1521 check1 cmpa #$8D
|
|
1522 beq rbr
|
|
1523 leay tab80a,pcr
|
|
1524 check anda #$0F
|
|
1525 cmpa #$0C
|
|
1526 bhs rein80
|
|
1527 cmpa #$03
|
|
1528 beq rein80
|
|
1529 tfr a,b
|
|
1530 lda #6
|
|
1531 lbsr match
|
|
1532 deca
|
|
1533 lbsr put
|
|
1534 lda #'#
|
|
1535 sta ,x+
|
|
1536 puls b
|
|
1537 lbra g01
|
|
1538 check2 leay tab80b,pcr
|
|
1539 bra check
|
|
1540 rbr puls b
|
|
1541 leay rbsr,pcr
|
|
1542 lda #3
|
|
1543 lbsr put
|
|
1544 puls y
|
|
1545 lbra g20
|
|
1546 rexg fcc /exg /
|
|
1547 rtfr fcc /tfr /
|
|
1548 rbyte fcb 0,30,0,1,28,0,2,26,0,3,24,0,4,22,0,5,20,128
|
|
1549 fcb 8,19,0,9,17,0,10,15,128,11,14,128
|
|
1550 fcc /dxyusppcabccdp/
|
|
1551 rccwai fcc /cwai #/
|
|
1552 rlea fcc /lea/
|
|
1553 lregr fcc /xysu/
|
|
1554 rpcr fcc /pcr/
|
|
1555 rnop fcc /nop/
|
|
1556 rsync fcc /sync/
|
|
1557 rdaa fcc /daa/
|
|
1558 rsex fcc /sex/
|
|
1559 rorcc fcc /orcc #/
|
|
1560 randcc fcc /andcc #/
|
|
1561 rlbra fcc /lbra /
|
|
1562 rlbsr fcc /lbsr /
|
|
1563 pull fcc /pul/
|
|
1564 pshr fcc /psh/
|
|
1565 order1 fcb 112,99,128,117,128,121,128,120,100,112,128,98,128,97,99,99
|
|
1566 order2 fcb 99,99,128,97,128,98,100,112,128,120,128,121,128,117,112,99
|
|
1567 table3 fcb $39
|
|
1568 fcc /rts/
|
|
1569 fcb $3a
|
|
1570 fcc /abx/
|
|
1571 fcb $3b
|
|
1572 fcc /rti/
|
|
1573 fcb $3d
|
|
1574 fcc /mul/
|
|
1575 fcb $3f
|
|
1576 fcc /swi/
|
|
1577 rbsr fcc /bsr/
|
|
1578 table1 fcb $0
|
|
1579 fcc /neg/
|
|
1580 fcb $01
|
|
1581 fcc /?? /
|
|
1582 fcb $02
|
|
1583 fcc /?? /
|
|
1584 fcb $03
|
|
1585 fcc /com/
|
|
1586 fcb $04
|
|
1587 fcc /lsr/
|
|
1588 fcb $05
|
|
1589 fcc /?? /
|
|
1590 fcb $06
|
|
1591 fcc /ror/
|
|
1592 fcb $07
|
|
1593 fcc /asr/
|
|
1594 fcb $08
|
|
1595 fcc /asl/
|
|
1596 fcb $09
|
|
1597 fcc /rol/
|
|
1598 fcb lf
|
|
1599 fcc /dec/
|
|
1600 fcb $0b
|
|
1601 fcc /?? /
|
|
1602 fcb $0c
|
|
1603 fcc /inc/
|
|
1604 fcb cr
|
|
1605 fcc /tst/
|
|
1606 fcb $0e
|
|
1607 fcc /jmp/
|
|
1608 fcb $0f
|
|
1609 fcc /clr/
|
|
1610 table2 fcb $20
|
|
1611 fcc /bra/
|
|
1612 fcb $21
|
|
1613 fcc /brn/
|
|
1614 fcb $22
|
|
1615 fcc /bhi/
|
|
1616 fcb $23
|
|
1617 fcc /bls/
|
|
1618 fcb $24
|
|
1619 fcc /bcc/
|
|
1620 fcb $25
|
|
1621 fcc /bcs/
|
|
1622 fcb $26
|
|
1623 fcc /bne/
|
|
1624 fcb $27
|
|
1625 fcc /beq/
|
|
1626 fcb $28
|
|
1627 fcc /bvc/
|
|
1628 fcb $29
|
|
1629 fcc /bvs/
|
|
1630 fcb $2a
|
|
1631 fcc /bpl/
|
|
1632 fcb $2b
|
|
1633 fcc /bmi/
|
|
1634 fcb $2c
|
|
1635 fcc /bge/
|
|
1636 fcb $2d
|
|
1637 fcc /blt/
|
|
1638 fcb $2e
|
|
1639 fcc /bgt/
|
|
1640 fcb $2f
|
|
1641 fcc /ble/
|
|
1642 tab1 fcb $03
|
|
1643 fcc /cmpd /
|
|
1644 fcb $0c
|
|
1645 fcc /cmpy /
|
|
1646 fcb $0e
|
|
1647 fcc /ldy /
|
|
1648 fcb $0f
|
|
1649 fcc /sty /
|
|
1650 tab2 fcb $0e
|
|
1651 fcc /lds /
|
|
1652 fcb $0f
|
|
1653 fcc /sts /
|
|
1654 tab11 fcb $03
|
|
1655 fcc /cmpu /
|
|
1656 fcb $0c
|
|
1657 fcc /cmps /
|
|
1658 tab80a fcb $00
|
|
1659 fcc /suba /
|
|
1660 fcb $01
|
|
1661 fcc /cmpa /
|
|
1662 fcb $02
|
|
1663 fcc /sbca /
|
|
1664 fcb $03
|
|
1665 fcc /subd /
|
|
1666 fcb $04
|
|
1667 fcc /anda /
|
|
1668 fcb $05
|
|
1669 fcc /bita /
|
|
1670 fcb $06
|
|
1671 fcc /lda /
|
|
1672 fcb $07
|
|
1673 fcc /sta /
|
|
1674 fcb $08
|
|
1675 fcc /eora /
|
|
1676 fcb $09
|
|
1677 fcc /adca /
|
|
1678 fcb lf
|
|
1679 fcc /ora /
|
|
1680 fcb $0b
|
|
1681 fcc /adda /
|
|
1682 fcb $0c
|
|
1683 fcc /cmpx /
|
|
1684 fcb cr
|
|
1685 fcc /jsr /
|
|
1686 fcb $0e
|
|
1687 fcc /ldx /
|
|
1688 fcb $0f
|
|
1689 fcc /stx /
|
|
1690 tab80b fcb $00
|
|
1691 fcc /subb /
|
|
1692 fcb $01
|
|
1693 fcc /cmpb /
|
|
1694 fcb $02
|
|
1695 fcc /sbcb /
|
|
1696 fcb $03
|
|
1697 fcc /addd /
|
|
1698 fcb $04
|
|
1699 fcc /andb /
|
|
1700 fcb $05
|
|
1701 fcc /bitb /
|
|
1702 fcb $06
|
|
1703 fcc /ldb /
|
|
1704 fcb $07
|
|
1705 fcc /stb /
|
|
1706 fcb $08
|
|
1707 fcc /eorb /
|
|
1708 fcb $09
|
|
1709 fcc /adcb /
|
|
1710 fcb lf
|
|
1711 fcc /orb /
|
|
1712 fcb $0b
|
|
1713 fcc /addb /
|
|
1714 fcb $0c
|
|
1715 fcc /ldd /
|
|
1716 fcb cr
|
|
1717 fcc /std /
|
|
1718 fcb $0e
|
|
1719 fcc /ldu /
|
|
1720 fcb $0f
|
|
1721 fcc /stu /
|
|
1722 rswi3 fcc /swi3/
|
|
1723 rshell fcc /shell/
|
|
1724 fcb cr
|
|
1725 ros9 fcc /os9 /
|
|
1726 os9table fcb $0,6
|
|
1727 fcc /F$Link/
|
|
1728 fcb $01,6
|
|
1729 fcc /F$Load/
|
|
1730 fcb $02,8
|
|
1731 fcc /F$UnLink/
|
|
1732 fcb $03,6
|
|
1733 fcc /F$Fork/
|
|
1734 fcb $04,6
|
|
1735 fcc /F$Wait/
|
|
1736 fcb $05,7
|
|
1737 fcc /F$Chain/
|
|
1738 fcb $06,6
|
|
1739 fcc /F$Exit/
|
|
1740 fcb $07,5
|
|
1741 fcc /F$Mem/
|
|
1742 fcb $08,6
|
|
1743 fcc /F$Send/
|
|
1744 fcb $09,6
|
|
1745 fcc /F$Icpt/
|
|
1746 fcb lf,7
|
|
1747 fcc /F$Sleep/
|
|
1748 fcb $0C,4
|
|
1749 fcc /F$ID/
|
|
1750 fcb cr,8
|
|
1751 fcc /F$SPrior/
|
|
1752 fcb $0E,6
|
|
1753 fcc /F$SSWI/
|
|
1754 fcb $0F,6
|
|
1755 fcc /F$Perr/
|
|
1756 fcb $10,8
|
|
1757 fcc /F$PrsNam/
|
|
1758 fcb $11,8
|
|
1759 fcc /F$CmpNam/
|
|
1760 fcb $12,8
|
|
1761 fcc /F$SchBit/
|
|
1762 fcb $13,8
|
|
1763 fcc /F$AllBit/
|
|
1764 fcb $14,8
|
|
1765 fcc /F$DelBit/
|
|
1766 fcb $15,6
|
|
1767 fcc /F$Time/
|
|
1768 fcb $16,7
|
|
1769 fcc /F$STime/
|
|
1770 fcb $17,5
|
|
1771 fcc /F$CRC/
|
|
1772 fcb $18,8
|
|
1773 fcc /F$GPrDsc/
|
|
1774 fcb $19,8
|
|
1775 fcc /F$GBlkMp/
|
|
1776 fcb $1A,8
|
|
1777 fcc /F$GModDr/
|
|
1778 fcb $1B,8
|
|
1779 fcc /F$CpyMem/
|
|
1780 fcb $1C,7
|
|
1781 fcc /F$SUser/
|
|
1782 fcb $1D,8
|
|
1783 fcc /F$UnLoad/
|
|
1784 fcb $1E,7
|
|
1785 fcc /F$Alarm/
|
|
1786 fcb $21,8
|
|
1787 fcc /F$NMLink/
|
|
1788 fcb $22,8
|
|
1789 fcc /F$NMLoad/
|
|
1790 fcb $27,6
|
|
1791 fcc /F$VIRQ/
|
|
1792 fcb $28,8
|
|
1793 fcc /F$SRqMem/
|
|
1794 fcb $29,8
|
|
1795 fcc /F$SRtMem/
|
|
1796 fcb $2A,5
|
|
1797 fcc /F$IRQ/
|
|
1798 fcb $2B,6
|
|
1799 fcc /F$IOQu/
|
|
1800 fcb $2C,7
|
|
1801 fcc /F$AProc/
|
|
1802 fcb $2D,7
|
|
1803 fcc /F$NProc/
|
|
1804 fcb $2E,8
|
|
1805 fcc /F$VModul/
|
|
1806 fcb $2F,8
|
|
1807 fcc /F$Find64/
|
|
1808 fcb $30,7
|
|
1809 fcc /F$All64/
|
|
1810 fcb $31,7
|
|
1811 fcc /F$Ret64/
|
|
1812 fcb $32,6
|
|
1813 fcc /F$SSvc/
|
|
1814 fcb $33,7
|
|
1815 fcc /F$IODel/
|
|
1816 fcb $34,7
|
|
1817 fcc /F$SLink/
|
|
1818 fcb $35,6
|
|
1819 fcc /F$Boot/
|
|
1820 fcb $36,7
|
|
1821 fcc /F$BtMem/
|
|
1822 fcb $37,8
|
|
1823 fcc /F$GProcP/
|
|
1824 fcb $38,6
|
|
1825 fcc /F$Move/
|
|
1826 fcb $39,8
|
|
1827 fcc /F$AllRAM/
|
|
1828 fcb $3A,8
|
|
1829 fcc /F$AllImg/
|
|
1830 fcb $3B,8
|
|
1831 fcc /F$DelImg/
|
|
1832 fcb $3C,8
|
|
1833 fcc /F$SetImg/
|
|
1834 fcb $3D,8
|
|
1835 fcc /F$FreeLB/
|
|
1836 fcb $3E,8
|
|
1837 fcc /F$FreeHB/
|
|
1838 fcb $3F,8
|
|
1839 fcc /F$AllTsk/
|
|
1840 fcb $40,8
|
|
1841 fcc /F$DelTsk/
|
|
1842 fcb $41,8
|
|
1843 fcc /F$SetTsk/
|
|
1844 fcb $42,8
|
|
1845 fcc /F$ResTsk/
|
|
1846 fcb $43,8
|
|
1847 fcc /F$RelTsk/
|
|
1848 fcb $44,8
|
|
1849 fcc /F$DATLog/
|
|
1850 fcb $46,7
|
|
1851 fcc /F$LDAXY/
|
|
1852 fcb $48,8
|
|
1853 fcc /F$LDDDXY/
|
|
1854 fcb $49,7
|
|
1855 fcc /F$LDABX/
|
|
1856 fcb $4A,7
|
|
1857 fcc /F$STABX/
|
|
1858 fcb $4B,8
|
|
1859 fcc /F$AllPrc/
|
|
1860 fcb $4C,8
|
|
1861 fcc /F$DelPrc/
|
|
1862 fcb $4D,7
|
|
1863 fcc /F$ELink/
|
|
1864 fcb $4E,8
|
|
1865 fcc /F$FModul/
|
|
1866 fcb $4F,8
|
|
1867 fcc /F$MapBlk/
|
|
1868 fcb $50,8
|
|
1869 fcc /F$ClrBlk/
|
|
1870 fcb $51,8
|
|
1871 fcc /F$DelRAM/
|
|
1872 fcb $52,8
|
|
1873 fcc /F$GCMDir/
|
|
1874 fcb $53,8
|
|
1875 fcc /F$AlHRam/
|
|
1876 fcb $80,8
|
|
1877 fcc /I$Attach/
|
|
1878 fcb $81,8
|
|
1879 fcc /I$Detach/
|
|
1880 fcb $82,5
|
|
1881 fcc /I$Dup/
|
|
1882 fcb $83,8
|
|
1883 fcc /I$Create/
|
|
1884 fcb $84,6
|
|
1885 fcc /I$Open/
|
|
1886 fcb $85,8
|
|
1887 fcc /I$MakDir/
|
|
1888 fcb $86,8
|
|
1889 fcc /I$Chgdir/
|
|
1890 fcb $87,8
|
|
1891 fcc /I$Delete/
|
|
1892 fcb $88,6
|
|
1893 fcc /I$Seek/
|
|
1894 fcb $89,6
|
|
1895 fcc /I$Read/
|
|
1896 fcb $8A,7
|
|
1897 fcc /I$Write/
|
|
1898 fcb $8B,8
|
|
1899 fcc /I$ReadLn/
|
|
1900 fcb $8C,8
|
|
1901 fcc /I$WritLn/
|
|
1902 fcb $8D,8
|
|
1903 fcc /I$GetStt/
|
|
1904 fcb $8E,8
|
|
1905 fcc /I$SetStt/
|
|
1906 fcb $8F,7
|
|
1907 fcc /I$Close/
|
|
1908 fcb $90,8
|
|
1909 fcc /I$DeletX/
|
|
1910 fcb 0,0
|
|
1911 ros9end equ *
|
|
1912 copyr fcb $0C
|
|
1913 fcb 7
|
|
1914 fcc "DASM (C) 1992"
|
|
1915 fcb lf
|
|
1916 fcc "J.R.COLLYER"
|
|
1917 fcb lf
|
|
1918 fcb cr
|
|
1919 fcb 0
|
|
1920 prompt fcc "dasm: "
|
|
1921 fcb 0
|
|
1922 whatmsg fcc "WHAT ??"
|
|
1923 fcb cr
|
|
1924 fcb 0
|
|
1925 adrmsg fcc "USE: [HEX DIGITS]"
|
|
1926 fcb cr
|
|
1927 fcb 0
|
|
1928 jumpmsg fcc "START ADDRESS ? "
|
|
1929 fcb 0
|
|
1930 ulinkmsg fcc "UNLINKED MODULE COUNT"
|
|
1931 fcb cr
|
|
1932 fcb 0
|
|
1933 notlkmsg fcc "MODULE LINK COUNT IS ZERO"
|
|
1934 fcb cr
|
|
1935 fcb 0
|
|
1936 linkmsg fcc "LINK ? "
|
|
1937 fcb 0
|
|
1938 dasmmsg fcs "dasm"
|
|
1939 fcb 0
|
|
1940 shellmsg fcc "SHELL ? "
|
|
1941 fcb 0
|
|
1942 getmode fcc "AUTO ? "
|
|
1943 fcb 0
|
|
1944 modemsg1 fcc "AUTO ON"
|
|
1945 fcb cr
|
|
1946 fcb 0
|
|
1947 modemsg2 fcc "AUTO OFF"
|
|
1948 fcb cr
|
|
1949 fcb 0
|
|
1950 prtermsg fcc "PRINTER ? "
|
|
1951 fcb 0
|
|
1952 prtmsg fcc "PRINTER ON"
|
|
1953 fcb cr
|
|
1954 fcb 0
|
|
1955 scrmsg fcc "PRINTER OFF"
|
|
1956 fcb cr
|
|
1957 fcb 0
|
|
1958 buffmsg fcc "BUFFER ? "
|
|
1959 fcb 0
|
|
1960 buff1 fcc "BUFFER OFF"
|
|
1961 fcb cr
|
|
1962 fcb 0
|
|
1963 buff2 fcc "BUFFER ON"
|
|
1964 fcb cr
|
|
1965 fcb 0
|
|
1966 bfull fcc "BUFFER FULL"
|
|
1967 fcb cr
|
|
1968 fcb 0
|
|
1969 stackms1 fcc "ADDRESS STACK IS FULL"
|
|
1970 fcb cr
|
|
1971 fcb 0
|
|
1972 stackms2 fcc "ADDRESS STACK IS EMPTY"
|
|
1973 fcb cr
|
|
1974 fcb 0
|
|
1975 helpmsg fcc "USE: ARROW KEYS $ ? A B E G L M O P Q R S U W"
|
|
1976 fcb cr
|
|
1977 fcb 0
|
|
1978 fname fcc "FILENAME ? "
|
|
1979 fcb 0
|
|
1980 endadmsg fcc "END ADDRESS ? "
|
|
1981 fcb 0
|
|
1982 gimimsg fcc "GIMI ? "
|
|
1983 fcb 0
|
|
1984 gimimsg1 fcc "EXAMPLE: 3F,3E,3D [ENTER]"
|
|
1985 fcb cr
|
|
1986 fcb 0
|
|
1987 gimimsg2 fcc "EXAMPLE: FF FE FD [ENTER]"
|
|
1988 fcb cr
|
|
1989 fcb 0
|
|
1990 offsmsg fcc "OFFSETS ? "
|
|
1991 fcb 0
|
|
1992 offsmsg1 fcc "OFFSETS ON"
|
|
1993 fcb cr
|
|
1994 fcb 0
|
|
1995 offsmsg2 fcc "OFFSETS OFF"
|
|
1996 fcb cr
|
|
1997 fcb 0
|
|
1998 exitmsg fcc "QUIT ARE YOU SURE (y/n) ? "
|
|
1999 fcb 0
|
|
2000 pmsg fcc "/p"
|
|
2001 usemsg fcb 7
|
|
2002 fcb lf
|
|
2003 fcc "*************************"
|
|
2004 fcb lf
|
|
2005 fcc "** OS9 DASM"
|
|
2006 fcb lf
|
|
2007 fcc "** (C)1992 J.R.COLLYER"
|
|
2008 fcb lf
|
|
2009 fcc "** usage: dasm <opts> [path] [module]"
|
|
2010 fcb lf
|
|
2011 fcc "** opts: -o use offset addresses"
|
|
2012 fcb lf
|
|
2013 fcc "** -s start address"
|
|
2014 fcb lf
|
|
2015 fcc "** -e end address"
|
|
2016 fcb lf
|
|
2017 fcc "** -m use hard addresses"
|
|
2018 fcb lf
|
|
2019 fcc "** -l link os9 module"
|
|
2020 fcb lf
|
|
2021 fcc "** -r read os9 module"
|
|
2022 fcb lf
|
|
2023 fcc "** [ENTER] Interactive mode"
|
|
2024 fcb lf
|
|
2025 fcb cr
|
|
2026 fcb 0
|
|
2027 commands fcb 00
|
|
2028 fdb 0000
|
|
2029 fcb $08 left arrow
|
|
2030 fdb return-begin
|
|
2031 fcb $09 right arrow
|
|
2032 fdb branch-begin
|
|
2033 fcb lf down arrow
|
|
2034 fdb dentry-begin
|
|
2035 fcb $0C up arrow
|
|
2036 fdb back-begin
|
|
2037 fcb $24 shell command
|
|
2038 fdb shell-begin
|
|
2039 fcb $3F help command
|
|
2040 fdb help-begin
|
|
2041 fcb $41 ASCII command
|
|
2042 fdb ascii-begin
|
|
2043 fcb $42 buffer command
|
|
2044 fdb bcom-begin
|
|
2045 fcb $45 end address for auto mode
|
|
2046 fdb chngend-begin
|
|
2047 fcb $47 gimi
|
|
2048 fdb gimicom-begin
|
|
2049 fcb $4C link command
|
|
2050 fdb link-begin
|
|
2051 fcb $4D mode command
|
|
2052 fdb setmode-begin
|
|
2053 fcb $4F offsets
|
|
2054 fdb offscom-begin
|
|
2055 fcb $50 printer command
|
|
2056 fdb printer-begin
|
|
2057 fcb $51 quit command
|
|
2058 fdb quit-begin
|
|
2059 fcb $52 read disk file command
|
|
2060 fdb read-begin
|
|
2061 fcb $53 start address
|
|
2062 fdb jump-begin
|
|
2063 fcb $55 unlink command
|
|
2064 fdb unlink-begin
|
|
2065 fcb $57 disk write
|
|
2066 fdb write-begin
|
|
2067 fcb 0
|
|
2068 emod
|
|
2069 len equ *
|
|
2070 end
|