* Disassembly by Os9disasm of edit
mod L1516,L000d,$11,$81,L0161,D0c1f
* OS-9 system function equates
F$Link equ $00
F$UnLink equ $02
F$Fork equ $03
F$Wait equ $04
F$Exit equ $06
F$Mem equ $07
F$Icpt equ $09
F$PErr equ $0f
F$PrsNam equ $10
I$Create equ $83
I$Open equ $84
I$Delete equ $87
I$Read equ $89
I$Write equ $8a
I$ReadLn equ $8b
I$WritLn equ $8c
I$Close equ $8f
* class D external label equates
Dfffe equ $fffe
Dffff equ $ffff
* OS9 data area definitions
D0000 rmb 1
D0001 rmb 1
D0002 rmb 1
D0003 rmb 1
D0004 rmb 1
D0005 rmb 1
D0006 rmb 1
D0007 rmb 1
D0008 rmb 1
D0009 rmb 1
D000a rmb 1
D000b rmb 1
D000c rmb 2
D000e rmb 1
D000f rmb 1
D0010 rmb 1
D0011 rmb 1
D0012 rmb 2
D0014 rmb 2
D0016 rmb 2
D0018 rmb 2
D001a rmb 2
D001c rmb 2
D001e rmb 2
D0020 rmb 1
D0021 rmb 2
D0023 rmb 1
D0024 rmb 1
D0025 rmb 1
D0026 rmb 1
D0027 rmb 2
D0029 rmb 1
D002a rmb 1
D002b rmb 2
D002d rmb 2
D002f rmb 1
D0030 rmb 2
D0032 rmb 4
D0036 rmb 1
D0037 rmb 1
D0038 rmb 1
D0039 rmb 1
D003a rmb 1
D003b rmb 1
D003c rmb 1
D003d rmb 1
D003e rmb 1
D003f rmb 1
D0040 rmb 1
D0041 rmb 1
D0042 rmb 1
D0043 rmb 1
D0044 rmb 1
D0045 rmb 2
D0047 rmb 1
D0048 rmb 1
D0049 rmb 2
D004b rmb 2
D004d rmb 1
D004e rmb 1
D004f rmb 2
D0051 rmb 4
D0055 rmb 2
D0057 rmb 13
D0064 rmb 7
D006b rmb 2
D006d rmb 2
D006f rmb 5
D0074 rmb 7
D007b rmb 5
D0080 rmb 9
D0089 rmb 1
D008a rmb 4
D008e rmb 16
D009e rmb 7
D00a5 rmb 1
D00a6 rmb 11
D00b1 rmb 3
D00b4 rmb 2
D00b6 rmb 15
D00c5 rmb 8
D00cd rmb 2
D00cf rmb 2
D00d1 rmb 2
D00d3 rmb 2
D00d5 rmb 1
D00d6 rmb 18
D00e8 rmb 4
D00ec rmb 1
D00ed rmb 10
D00f7 rmb 4
D00fb rmb 3
D00fe rmb 2
D0100 rmb 2847
D0c1f equ .
L000d fcb $45
lsr 9,s
andb $0328
coma
bvs L0047
rts
fcb $38
leay 13,u
rol 3,s
fcb $72
clr -9,s
fcb $61
fcb $72
fcb $65
L0022 fcb $01
lbra L0292
lbra L0c38
lbra L0bec
lbra L0be3
lbra L100f
lbra L0770
lbra L06ea
lbra L0716
lbra L073f
lbra L04a1
lbra L046b
lbra L05d6
L0047 lbra L0626
lbra L0094
lbra L0b96
lbra L0b01
L0053 lda #0
sta 35,u
rti
L0059 ldx D000e
jmp ,x
L005d lda D0026
lbsr L0107
lda #$3a
lbsr L0107
ldx D0012
leax 375,x
lda D000a
ldy #$0080
os9 I$ReadLn
bcc L0081
cmpb #$d3
lbeq L114d
lbra L12aa
L0081 rts
L0082 pshs d,x
lbsr L06d7
bsr L008b
puls d,x,pc
L008b pshs d
lbsr L0130
bsr L0094
puls d,pc
L0094 pshs d,x,y
cmpd #0
beq L00c6
leay d,x
pshs y
L00a0 tst D0037
beq L00ac
lda #$20
bsr L0107
bsr L0107
bsr L0107
L00ac tst D0023
beq L00c4
lda ,x+
bsr L0107
cmpx ,s
beq L00be
cmpa #$0d
bne L00ac
bra L00a0
L00be cmpa #$0d
beq L00c4
bsr L00ff
L00c4 puls y
L00c6 puls d,x,y,pc
L00c8 pshs d,y
ldd D0002
tstb
beq L00e0
cmpa ,s
bne L00e0
ldd D0021
addd #1
std D0021
ldb D0020
adcb #0
stb D0020
L00e0 bsr L0130
tfr d,y
lda ,s
os9 I$Write
lblo L12aa
puls d,y,pc
L00ef pshs a
bsr L00ff
lda D0037
clr D0037
bsr L008b
sta D0037
puls a,pc
L00fd bsr L00ff
L00ff pshs a
lda #$0d
bsr L0107
puls a,pc
L0107 pshs a,x,y
lda D000b
ldy #1
tfr s,x
tst D0041
bmi L0119
tst D003e
beq L0120
L0119 os9 I$WritLn
lblo L12aa
L0120 puls a,x,y,pc
L0122 pshs x
lda ,x+
cmpa #$0d
lbeq L1272
bsr L0132
puls x,pc
L0130 lda #$0d
L0132 pshs x,y
ldb #$0d
ldy #0
L013a cmpx D001c
beq L014c
leay D0001,y
cmpb ,x
beq L014c
cmpa ,x+
bne L013a
leay Dffff,y
bra L0152
L014c cmpa #$0d
lbne L1272
L0152 tfr y,d
cmpd #0
puls x,y,pc
L015a pshs d,x,u
os9 F$PrsNam
puls d,x,u,pc
L0161 tfr u,d
std D0012
sts D001e
leas 1054,u
addd #$041f
std D0014
std D0016
std D001c
std D001a
pshs d,x,y,u
leax L0022,pcr
stx D000c
leax L005d,pcr
stx D000e
leax L09dd,pcr
stx D0010
ldd #0
std D0051
std D006f
std D0089
leax L1482,pcr
stx D004d
leax L13cf,pcr
stx D006b
leax L0000,pcr
stx D004f
stx D006d
leax L13b0,pcr
lda #1
os9 F$Link
bcs L01b5
jsr ,y
L01b5 leax L13b6,pcr
lda #1
os9 F$Link
bcs L01c2
jsr ,y
L01c2 puls d,x,y,u
lda #255
sta D0041
inca
sta D0001
sta D0003
sta D0005
sta D0007
sta D000a
sta D003d
inca
sta D000b
sta D003e
sta D0040
lda #$45
sta D0026
clr D0036
lbsr L0691
cmpa #$0d
beq L0260
lbsr L015a
bcs L0259
lda #1
stx D0032
os9 I$Open
bcs L024b
ldb #1
std D0000
pshs x
leay 247,u
leax L139f,pcr
ldd #7
lbsr L0b96
pshs y
ldx D0032
L020f cmpx 2,s
beq L0220
lda ,x+
sta ,y+
cmpa #$2f
bne L020f
sty ,s
bra L020f
L0220 puls y
leax L13a7,pcr
ldd #8
lbsr L0b96
ldx D0032
ldd ,s
subd D0032
sty D0032
lbsr L0b96
lda #$0d
sta ,y
puls x
lbsr L0691
cmpa #$0d
bne L024b
leax 254,u
inc D0036
L024b ldd #$020b
os9 I$Create
bcs L025b
ldb #2
std D0002
bra L0260
L0259 ldb #$d8
L025b orcc #1
os9 F$Exit
L0260 ldy #0
sty D0024
lda #$42
lbsr L06ea
lbsr L073f
lda #$42
ldy #1
lbsr L06ea
leax L0053,pcr
ldu D0012
os9 F$Icpt
tst D0001
beq L028f
ldd D001e
subd D001c
subd #$0400
lbsr L0f43
L028f lbsr L00fd
L0292 ldu D0012
leas 1054,u
leax 670,u
stx D0045
stx D0047
leax -40,x
stx D0049
lda #255
sta D0041
sta D0023
lda D0040
sta D003e
clr D003b
clr D003a
clr D003c
lda #1
sta D0037
tst D003d
beq L02cb
tst D0039
bne L02cb
leax L1398,pcr
lbsr L00ef
lbsr L00ff
L02cb clr D003d
clr D0039
lbsr L0059
leax 375,u
lbsr L0130
leay d,x
sty D002b
ldy #0
sty D0029
leau 630,u
stu D0027
lda ,x
cmpa #$20
bne L02f8
leax 1,x
lbsr L0bde
bra L0292
L02f8 cmpa #$0d
bne L0308
ldx D001a
lbsr L06b2
stx D001a
lbsr L008b
bra L0292
L0308 bsr L0310
lbsr L00ff
lbra L0292
L0310 ldd D0043
pshs d
ldd D0045
std D0043
pshs d
lda D003e
pshs a
clr D002f
inc D0041
L0322 cmpx D002b
lbhs L03b8
lbsr L0691
cmpa #$0d
bne L0335
leax 1,x
clr D002f
bra L0322
L0335 ldd D0027
pshs d
stu D0027
ldd D0029
pshs d
ldd D002b
pshs d
pshs u
lbsr L0691
sta D0038
lbsr L03d3
pshs x
pshs u
leax <L039d,pcr
pshu x
pshu u
tfr d,x
lda D0038
tst D003b
bne L0372
tst D003c
bne L0372
tst D003d
beq L0397
tst D003a
bne L0372
cmpa #$3a
bne L0372
stb D003d
L0372 cmpa #$5b
bne L0378
inc D003a
L0378 cmpa #$5d
bne L039d
dec D003a
bpl L039d
tst D003c
bne L0395
lbsr L0964
tst D003b
bne L038f
clr D003d
bra L039d
L038f clr D003b
bra L039d
bra L039d
L0395 clr D003c
L0397 lda D0041
clr D0039
jsr ,y
L039d puls u
puls x
puls u
puls d
std D002b
puls d
std D0029
puls d
std D0027
tst D0023
lbeq L127b
lbra L0322
L03b8 dec D0041
puls a
sta D003e
puls d
std D0045
puls d
std D0043
tst D003d
beq L03d2
lda #1
sta D003d
clr D003c
clr D003b
L03d2 rts
L03d3 lbsr L0691
bsr L040e
beq L0400
leax 1,x
lbsr L04a1
lbeq L1269
pshs y
tfr d,y
ldd ,y
leay d,y
sty D002b
ldy ,s
lbsr L04f4
tfr y,d
puls y
sty D0029
leay L0310,pcr
rts
L0400 pshs d
lbsr L04f4
ldd #0
std D0029
std D002b
puls y,pc
L040e ldb ,x+
lbsr L04d0
tfr a,b
L0415 ldy D0012
leay D004d,y
cmpb #$2e
bne L0425
ldy D0012
leay D006b,y
L0425 sty D004b
ldy ,y
L042b lda ,y
bne L043c
ldy D004b
leay D0004,y
sty D004b
ldy ,y
beq L045d
L043c cmpb #$2e
beq L0446
cmpb ,y+
bne L044a
bra L044e
L0446 bsr L046b
beq L044e
L044a bsr L0462
bra L042b
L044e pshs y
bsr L0462
ldd Dfffe,y
ldy D004b
addd D0002,y
orcc #4
puls y,pc
L045d leax -1,x
andcc #251
rts
L0462 lda ,y+
cmpa #$0d
bne L0462
leay D0002,y
rts
L046b pshs d,x,y
lda ,y
bsr L04da
bne L049d
L0473 sty 4,s
lda ,y+
bsr L04d0
bne L0491
pshs a
lda ,x+
bsr L04d0
cmpa ,s+
beq L0473
L0486 sty 4,s
lda ,y+
bsr L04da
beq L0486
bra L049d
L0491 lda ,x
bsr L04da
beq L049d
stx 2,s
orcc #4
bra L049f
L049d andcc #251
L049f puls d,x,y,pc
L04a1 pshs u
ldu D0014
lbsr L0691
L04a8 lda 4,u
cmpa #$4d
bne L04c0
leay 11,u
lbsr L069a
bsr L046b
beq L04c4
ldd ,u
leau d,u
cmpu D001c
bcs L04a8
L04c0 orcc #4
puls u,pc
L04c4 lbsr L069a
lbsr L0691
tfr u,d
andcc #251
puls u,pc
L04d0 cmpa #$61
bcs L04da
cmpa #$7a
bhi L04da
suba #$20
L04da cmpa #$5f
beq L04ee
cmpa #$41
bcs L04f1
cmpa #$5a
bls L04ee
cmpa #$61
bcs L04f1
cmpa #$7a
bhi L04f1
L04ee orcc #4
rts
L04f1 andcc #251
rts
L04f4 clr D0042
pshs d
L04f8 lbsr L069a
lbsr L0691
bsr L052b
L0500 cmpa #$0d
beq L0525
cmpa #$4c
bne L050f
pshu x
lbsr L06c2
bra L0525
L050f cmpa #$23
bne L0517
bsr L0540
bra L04f8
L0517 cmpa #$24
lbne L1287
L051d bsr L0553
cmpa #$24
beq L051d
bra L0500
L0525 ldb D0042
pshu b
puls d,pc
L052b lbsr L069a
pshs a
cmpa #$0d
beq L053e
inc D0042
L0536 leay D0001,y
lda ,y
bsr L04da
beq L0536
L053e puls a,pc
L0540 pshs d
lda ,x
cmpa #$23
bne L054c
bsr L05b3
bra L0551
L054c lbsr L05d6
pshu d
L0551 puls d,pc
L0553 pshs b
lbsr L0691
cmpa #$24
bne L0562
bsr L05b3
bsr L052b
bra L057e
L0562 pshu x
lbsr L0122
leax d,x
leax 2,x
bsr L052b
cmpa #$24
bne L057e
pshs a,x
lbsr L0691
cmpa #$24
puls a,x
beq L057e
leax -1,x
L057e puls b,pc
L0580 pshs a,x,y
ldy D0029
ldb #0
L0587 lbsr L069a
cmpa #$0d
beq L05ab
lbsr L0691
addb #1
lda ,x+
cmpa ,y+
bne L059e
lbsr L046b
beq L05ad
L059e ldx 1,s
L05a0 lda ,y+
lbsr L04da
beq L05a0
leay Dffff,y
bra L0587
L05ab ldb #0
L05ad stx 1,s
cmpb #0
puls a,x,y,pc
L05b3 pshs y
lda ,x
cmpa #$24
beq L05c1
cmpa #$23
lbne L1287
L05c1 bsr L0580
lbeq L1290
ldy D0027
negb
addb D0004,y
lslb
leay D0005,y
ldd b,y
pshu d
puls y,pc
L05d6 lda ,x
cmpa #$2a
bne L05e3
leax 1,x
ldd #-1
bra L05f3
L05e3 ldd #0
bsr L0600
bne L05ef
ldd #1
bra L05f3
L05ef bsr L0600
bne L05ef
L05f3 rts
L05f4 beq L0606
com D00e8
neg D0064
neg D000a
neg D0001
neg D0000
L0600 pshs d,y
ldb ,x
subb #$30
L0606 cmpb #$0a
bcc L0622
leax 1,x
lda #0
ldy #$000a
L0612 addd ,s
lblo L1266
leay Dffff,y
bne L0612
std ,s
andcc #251
puls d,y,pc
L0622 orcc #4
puls d,y,pc
L0626 pshs d,x,y
leax >L05f4,pcr
ldy #$2f20
L0630 leay D0100,y
subd ,x
bcc L0630
addd ,x++
pshs d
ldd ,x
tfr y,d
beq L0659
ldy #$2f30
cmpd #12320
bne L0652
ldy #$2f20
tfr b,a
L0652 lbsr L0107
puls d
bra L0630
L0659 lbsr L0107
leas 2,s
puls d,x,y,pc
L0660 pshs d,x
ldx D0027
ldd -2,x
puls d,x,pc
L0668 pshs d,x
tst D0023
beq L0683
ldx D0027
ldd -2,x
beq L0683
cmpd #-1
bne L067e
andcc #251
bra L0683
L067e subd #1
std -2,x
L0683 puls d,x,pc
L0685 pshs d,x
ldx D0027
ldd -2,x
cmpd #-1
puls d,x,pc
L0691 lda ,x+
cmpa #$20
beq L0691
leax -1,x
rts
L069a lda ,y+
cmpa #$20
beq L069a
leay Dffff,y
rts
L06a3 pshs d
ldd D001c
sty D001c
bsr L06b2
pshs cc
std D001c
puls cc,d,pc
L06b2 pshs a
L06b4 cmpx D001c
beq L06c0
lda ,x+
cmpa #$0d
bne L06b4
andcc #251
L06c0 puls a,pc
L06c2 cmpx D001c
beq L06ce
bsr L06b2
cmpx D0018
beq L06ce
leax -1,x
L06ce andcc #251
rts
L06d1 bsr L06d7
beq L06e9
leax -1,x
L06d7 pshs a
L06d9 cmpx D0018
beq L06e7
lda ,-x
cmpa #$0d
bne L06d9
leax 1,x
andcc #251
L06e7 puls a
L06e9 rts
L06ea pshs d,x,y
ldd #$000b
ldy D001c
lbsr L0bc0
leax d,y
sty D0016
stx D001c
stx D0018
stx D001a
std ,y
std D0002,y
lda ,s
sta D0004,y
ldd 4,s
std D0005,y
ldd D0000
std D0004
ldd D0002
std D0006
puls d,x,y,pc
L0716 pshs d,x,y
stx D001a
ldd ,x
lbsr L0bec
nega
negb
sbca #0
ldx D001c
leax d,x
stx D0016
leay 11,x
sty D0018
ldd 2,x
leay d,x
sty D001a
ldd 7,x
std D0004
ldd 9,x
std D0006
puls d,x,y,pc
L073f pshs d,x,y
ldx D0016
ldd D001c
subd D0016
std ,x
ldd D001a
subd D0016
std 2,x
ldd D0004
std 7,x
ldd D0006
std 9,x
lda 4,x
cmpa #$42
bne L0763
ldd 5,x
std D0024
bra L076e
L0763 ldy D0014
sty D001a
ldd ,x
lbsr L0c38
L076e puls d,x,y,pc
L0770 pshs d
ldx D0014
L0774 lda 4,x
cmpa #$42
bne L0781
ldd ,s
cmpd 5,x
beq L0788
L0781 lbsr L089b
bcs L0774
andcc #251
L0788 puls d,pc
ldx D0012
ldd 5,u
addd #$041f
leax d,x
cmpx D001c
bls L07a1
os9 F$Mem
lblo L12aa
sty D001e
L07a1 pulu u,pc
lbsr L0922
lbsr L00ff
ldd D001c
subd D0014
lbsr L0626
lda #$20
lbsr L0107
lbsr L0107
ldd D001e
subd D0014
lbsr L0626
lbsr L00ff
lbra L0929
ldx D0016
lda 4,x
cmpa #$42
lbne L127e
ldd D001c
subd D0016
std ,x
ldd 5,u
cmpd 5,x
beq L07f9
bsr L0770
beq L07f3
ldd #$000b
lbsr L0bc0
lbsr L073f
lda #$42
ldy 5,u
lbsr L06ea
pulu u,pc
L07f3 lbsr L073f
lbsr L0716
L07f9 pulu u,pc
tst D0041
lbne L127e
ldx D0016
lda 4,x
cmpa #$42
lbne L127e
ldx 5,x
ldy D0024
pshs x,y
ldx 5,u
lbsr L0691
cmpa 1,x
bne L0825
lbsr L073f
lda #$4d
lbsr L06ea
bra L0836
L0825 leax 1,x
lbsr L04a1
lbeq L1278
lbsr L073f
tfr d,x
lbsr L0716
L0836 puls x,y
stx D0024
sty D002d
lda #$4d
sta D0026
pulu u,pc
lbsr L0922
leax L13c6,pcr
lbsr L00ef
ldx D0014
L084f ldb 4,x
cmpb #$42
bne L0873
ldd 5,x
cmpx D0016
beq L0863
cmpd D0024
beq L0866
lda #$20
cmpx #$862a
L0863 equ *-2
cmpx #$8624
L0866 equ *-2
lbsr L0107
ldd 5,x
lbsr L0626
lbsr L00ff
L0873 bsr L089b
bcs L084f
leax L13be,pcr
lbsr L00ef
ldx D0014
L0880 pshs x
lda 4,x
cmpa #$4d
bne L0893
leax 11,x
lbsr L008b
puls x
bsr L089b
bcs L0880
L0893 lbsr L00ff
lbsr L0929
pulu u,pc
L089b pshs d
ldd ,x
leax d,x
cmpx D001c
puls d,pc
tst D0041
lbne L127e
ldx 5,u
lda ,x+
pshs a
lbsr L0691
lbsr L04a1
lbeq L1278
tfr d,y
ldd ,y
ldx D001a
pshs d,x
sty D001a
lbsr L0bec
ldd D0016
subd ,s
std D0016
ldd D0018
subd ,s
std D0018
ldd D001c
subd ,s
std D001c
puls x
puls d
pshs x
subd ,s++
std D001a
pulu u,pc
pshs u
ldx 5,u
lbsr L0130
tfr d,y
tfr x,u
leax <L090c,pcr
lda #1
ldb #0
os9 F$Fork
lblo L12aa
os9 F$Wait
tstb
lbne L12aa
puls u
pulu u,pc
L090c comb
asla
fcb $45
inca
inca
tst D00ec
fcb $45
beq L0918
lda #1
L0918 sta D003e
tst D0041
bne L0920
sta D0040
L0920 pulu u,pc
L0922 lda D003e
sta D003f
inc D003e
rts
L0929 lda D003f
sta D003e
rts
ldx ,u
ldx 2,x
ldy D0045
cmpy D0049
lbls L128d
stx ,--y
ldx #0
stx ,--y
sty D0045
pulu u,pc
ldx D0045
ldd ,x
addd #1
std ,x
cmpd 5,u
bcs L095a
bsr L0964
pulu u,pc
L095a ldy 2,x
ldx ,u
sty 2,x
pulu u,pc
L0964 pshs x
ldx D0045
leax 4,x
cmpx D0043
lbhi L128a
stx D0045
puls x,pc
bsr L0922
ldx D001a
lbsr L0660
beq L098a
L097d lbsr L008b
lbsr L06b2
beq L098a
lbsr L0668
bne L097d
L098a bsr L0929
pulu u,pc
bsr L0922
lbsr L0660
beq L09af
ldx D001a
lbsr L06d7
bra L09a1
L099c lbsr L06d1
beq L09a6
L09a1 lbsr L0668
bne L099c
L09a6 pshs x
ldd D001a
subd ,s++
lbsr L0094
L09af lbsr L0929
pulu u,pc
inc D002f
ldd 5,u
std D0030
bne L09be
clr D002f
L09be pulu u,pc
L09c0 lbsr L06b2
beq L09d4
L09c5 pshs d
ldd D0030
lbsr L0b01
puls d
bne L09c0
cmpx D001a
bcs L09c0
L09d4 rts
L09d5 pshs x,y
ldx D0010
stx 2,s
puls x,pc
L09dd pshs d,y
ldx D001a
lda ,y+
tst D002f
beq L09e9
bsr L09c5
L09e9 pshs x,y
L09eb cmpa ,y
beq L0a0b
ldb ,y+
cmpx D001c
bcc L0a05
cmpb ,x+
beq L09eb
puls x,y
leax 1,x
tst D002f
beq L09e9
bsr L09c0
bra L09e9
L0a05 orcc #1
bra L0a0b
andcc #254
L0a0b puls x,y
puls d,y,pc
L0a0f lbsr L1126
tst D0041
bne L0a29
tst D003d
beq L0a29
inc D0039
lbsr L0922
leax L1318,pcr
lbsr L00ef
lbsr L0929
L0a29 pulu u,pc
L0a2b pshs d,x,y
lbsr L0660
andcc #254
beq L0a4e
ldx 5,u
lbsr L0122
L0a39 ldy 5,u
bsr L09d5
bcs L0a4e
lbsr L0082
leax d,x
stx D001a
lbsr L0668
bne L0a39
andcc #254
L0a4e puls d,x,y,pc
L0a50 pshs d,x,y
lbsr L0660
andcc #254
beq L0a94
ldx 5,u
lbsr L0122
pshs d
ldx 7,u
lbsr L0122
pshs d
L0a67 ldd 2,s
subd ,s
lbsr L0bc0
ldy 7,u
lbsr L09d5
bcs L0a92
stx D001a
ldd ,s
lbsr L100f
ldx 5,u
leax 1,x
ldd 2,s
lbsr L0be3
ldx D001a
lbsr L0082
lbsr L0668
bne L0a67
andcc #254
L0a92 leas 4,s
L0a94 puls d,x,y,pc
lbsr L0a2b
lblo L0a0f
rts
lbsr L0a50
lblo L0a0f
rts
ldx D001a
lbsr L0a50
bra L0ab2
ldx D001a
lbsr L0a2b
L0ab2 pshs cc
cmpx D001a
beq L0abf
ldx D001a
lbsr L06d7
stx D001a
L0abf puls cc
lblo L0a0f
rts
lbsr L0660
beq L0aff
ldx 5,u
lbsr L0122
leax 1,x
L0ad2 pshs d,x
ldx D001a
cmpx D001c
bcs L0adf
lbsr L1126
bra L0aff
L0adf lbsr L06c2
ldd ,s
lbsr L0bc0
stx D001a
ldx 2,s
lbsr L0be3
ldx D001a
lbsr L0082
lbsr L06b2
stx D001a
puls d,x
lbsr L0668
bne L0ad2
L0aff pulu u,pc
L0b01 pshs y
cmpd #0
beq L0b26
tfr d,y
lbsr L06d7
L0b0e lda ,x
cmpa #$0d
beq L0b20
cmpx D001c
bcc L0b20
leax 1,x
leay Dffff,y
bne L0b0e
leax -1,x
L0b20 tfr y,d
cmpd #0
L0b26 puls y,pc
lbsr L0660
beq L0b5c
ldx D001a
ldd 5,u
bsr L0b01
stx D001a
std 5,u
beq L0b5c
tfr d,y
lbsr L0668
beq L0b5c
leay Dffff,y
lda #$20
ldx D001c
pshs x
L0b48 cmpx D001e
lbhs L126f
sta ,x+
lbsr L0668
bne L0b48
tfr y,d
puls x
lbsr L0be3
L0b5c pulu u,pc
lbsr L0660
beq L0b94
ldx D001a
lbsr L06d7
pshs x
ldx 5,u
lbsr L0122
leax 1,x
ldy D001c
L0b74 bsr L0b96
lbeq L126f
lbsr L0668
bne L0b74
ldx D001c
tfr y,d
subd D001c
bsr L0be3
lda #$0d
bsr L0bb5
ldx ,s
ldd D001a
subd ,s++
lbsr L0094
L0b94 pulu u,pc
L0b96 pshs d,x,u
tfr d,u
L0b9a cmpy D001e
bcc L0bb1
cmpu #0
beq L0bad
lda ,x+
sta ,y+
leau -1,u
bra L0b9a
L0bad andcc #251
puls d,x,u,pc
L0bb1 orcc #4
puls d,x,u,pc
L0bb5 pshs d,x
tfr s,x
ldd #1
bsr L0be3
puls d,x,pc
L0bc0 pshs x
ldx D001c
leax d,x
cmpx D001e
lbhs L126f
puls x,pc
L0bce pshs y
ldy D001c
bsr L0b96
lbeq L126f
sty D001c
puls y,pc
L0bde lda #$0d
lbsr L0132
L0be3 bsr L0bce
bsr L0c38
addd D001a
std D001a
rts
L0bec pshs d,x,y,u
cmpd #0
beq L0c36
std D00cf
ldd D001a
subd D001c
tfr d,y
addd ,s
std D00d1
ldd D001c
subd D00cf
std D00d3
ldx D001c
lda ,-x
stx D00d5
sta D00cd
bra L0c22
L0c10 cmpx D00d5
bne L0c1e
lda D00cd
sta ,u
lda ,-x
stx D00d5
sta D00cd
L0c1e leay D0001,y
beq L0c36
L0c22 ldd D00d1
L0c24 tfr x,u
leax d,x
lda ,x
sta ,u
cmpx D00d3
bcc L0c10
ldd D00cf
leay D0001,y
bne L0c24
L0c36 puls d,x,y,u,pc
L0c38 pshs d
ldd D001c
subd D001a
subd ,s
bsr L0bec
puls d,pc
lbsr L0660
beq L0caf
ldd D0024
lbsr L0770
pshs x
ldd ,x
leay d,x
leax 11,x
pshs x
L0c58 pshs y
cmpx ,s++
bne L0c63
lbsr L1126
bra L0c6d
L0c63 lbsr L06a3
beq L0c6d
lbsr L0668
bne L0c58
L0c6d tfr x,d
subd ,s
puls x,y
pshs d
lbsr L0094
ldd D0002,y
subd #$000b
subd ,s
bcc L0c84
ldd #0
L0c84 addd #$000b
std D0002,y
ldd ,y
subd ,s
std ,y
ldd D0016
subd ,s
std D0016
ldd D0018
subd ,s
std D0018
puls d
ldy D001a
stx D001a
ldx D001c
sty D001c
lbsr L0bec
stx D001c
sty D001a
L0caf pulu u,pc
lbsr L0660
beq L0d0d
ldx D001c
pshs x
ldd D0024
lbsr L0770
pshs x
ldx D001a
pshs x
L0cc5 cmpx D001c
bcs L0cce
lbsr L1126
bra L0cd8
L0cce lbsr L06b2
beq L0cd8
lbsr L0668
bne L0cc5
L0cd8 tfr x,d
subd ,s
puls x,y
lbsr L0094
leax d,x
pshs d,x
stx D001c
ldd ,y
addd ,s
std ,y
ldd D0002,y
leax d,y
stx D001a
addd ,s
std D0002,y
ldd D0016
addd ,s
std D0016
ldd D0018
addd ,s
std D0018
puls d,x,y
lbsr L0c38
stx D001a
sty D001c
L0d0d pulu u,pc
tst D0005
beq L0d4d
lbsr L0660
beq L0d7a
ldx D001c
L0d1a leay 128,x
cmpy D001e
bls L0d28
bsr L0d68
lbra L126f
L0d28 lda D0004
ldy #$0080
os9 I$ReadLn
bcc L0d5f
pshs b
bsr L0d68
puls b
cmpb #$d3
lbne L12aa
ldd D0004
cmpd D0000
beq L0d4d
os9 I$Close
lblo L12aa
L0d4d clr D0005
lbsr L1126
tst D0041
bne L0d5d
leax L138a,pcr
lbsr L00ef
L0d5d bra L0d7a
L0d5f tfr y,d
leax d,x
lbsr L0668
bne L0d1a
L0d68 tfr x,d
subd D001c
ldx D001a
pshs d,x
ldx D001c
lbsr L0be3
puls d,x
lbsr L0094
L0d7a rts
tst D0007
lbeq L1275
lbsr L0660
beq L0db5
ldy D001a
L0d89 tfr y,x
lbsr L0130
bne L0d9d
bsr L0da9
lbsr L1126
leax L137c,pcr
lbsr L00ef
rts
L0d9d leay d,x
lda D0006
lbsr L00c8
lbsr L0668
bne L0d89
L0da9 ldx D001a
tfr y,d
subd D001a
lbsr L0094
lbsr L100f
L0db5 rts
ldd D0004
cmpd D0000
beq L0dc9
tstb
beq L0dc9
os9 I$Close
lblo L12aa
clr D0005
L0dc9 ldx 5,u
ldb ,x+
cmpb ,x
bne L0dd7
ldd D0000
std D0004
pulu u,pc
L0dd7 lbsr L0ec6
lbne L12a8
lda #1
os9 I$Open
lblo L12aa
ldb #1
std D0004
pulu u,pc
ldd D0006
cmpd D0002
beq L0e00
tstb
beq L0e00
os9 I$Close
lblo L12aa
clr D0007
L0e00 ldx 5,u
ldb ,x+
cmpb ,x
bne L0e0e
ldd D0002
std D0006
pulu u,pc
L0e0e lbsr L0ec6
lbne L12a8
ldd #$021b
os9 I$Create
lblo L12aa
ldb #1
std D0006
pulu u,pc
ldx 5,u
ldb ,x+
lbsr L0ec6
lbne L12a8
lda #1
os9 I$Open
lblo L12aa
sta D0008
L0e3b ldx D001c
ldy #$000b
bsr L0eb7
lda D0008
os9 I$Read
bcs L0e6e
lda 4,x
cmpa #$4d
beq L0e58
ldd 5,x
beq L0e58
ldb #$d3
bra L0e6e
L0e58 clr 8,x
clr 10,x
ldd ,x
subd #$000b
tfr d,y
leax 11,x
bsr L0eb7
lda D0008
os9 I$Read
bcc L0e7f
L0e6e pshs b
lda D0008
os9 I$Close
puls b
cmpb #$d3
lbne L12aa
pulu u,pc
L0e7f lbsr L0691
pshs x
lbsr L04a1
puls x
bne L0e3b
lbsr L008b
ldx D001c
ldd ,x
ldy D001a
leax d,x
stx D001c
pshs d,y
ldx D0014
stx D001a
lbsr L0c38
ldd D0016
addd ,s
std D0016
ldd D0018
addd ,s
std D0018
puls d,y
leay d,y
sty D001a
bra L0e3b
L0eb7 pshs d,y
tfr y,d
leay d,x
cmpy D001e
lbhs L126f
puls d,y,pc
L0ec6 lbsr L0691
pshs x,y
leay ,x
L0ecd cmpb ,y+
bne L0ecd
pshs y
lbsr L015a
bcs L0ee1
cmpy ,s++
bcc L0ee1
orcc #4
puls x,y,pc
L0ee1 andcc #251
puls x,y,pc
ldx #-1
pshs x
ldx 7,u
leax 1,x
lbsr L0691
L0ef1 lbsr L04a1
lbeq L1278
pshs d
lbsr L0691
ldy 7,u
cmpa ,y
bne L0ef1
ldx 5,u
ldb ,x+
bsr L0ec6
lbne L12a8
ldd #$021b
os9 I$Create
lblo L12aa
sta D0008
L0f1a puls x
cmpx #-1
beq L0f3c
ldd #0
std 5,x
ldy ,x
lda D0008
os9 I$Write
bcc L0f1a
pshs b
lda D0008
os9 I$Close
puls b
lbra L12aa
L0f3c lda D0008
os9 I$Close
pulu u,pc
L0f43 tst D0001
beq L0f8e
ldx D001c
leay d,x
leay D0080,y
cmpy D001e
bcs L0f5d
cmpd #$0080
bcs L0f8e
subd #$0080
L0f5d tfr d,y
lda D0000
os9 I$Read
bcs L0f77
tfr y,d
leax d,x
stx D001c
ldy #$0080
lda D0000
os9 I$ReadLn
bcc L0f88
L0f77 cmpb #$d3
lbne L12aa
leax L138a,pcr
lbsr L00ef
clr D0005
bra L0f8e
L0f88 tfr y,d
leax d,x
stx D001c
L0f8e rts
tst D0003
beq L0fa8
ldx D0018
ldd D001a
subd D0018
tfr d,y
lda D0002
os9 I$Write
stx D001a
tfr y,d
bsr L100f
bsr L0f43
L0fa8 pulu u,pc
lbsr L0660
beq L0fd4
ldx D001a
lbsr L06d7
stx D001a
pshs x
L0fb8 cmpx D001c
bne L0fc1
lbsr L1126
bra L0fce
L0fc1 lbsr L008b
lbsr L06b2
beq L0fce
lbsr L0668
bne L0fb8
L0fce tfr x,d
subd ,s++
bsr L100f
L0fd4 pulu u,pc
lbsr L0660
beq L0ffa
ldx D001a
pshs x
L0fdf cmpx D001c
bne L0fe8
lbsr L1126
bra L0fef
L0fe8 leax 1,x
lbsr L0668
bne L0fdf
L0fef tfr x,d
subd ,s
puls x
lbsr L0094
bsr L100f
L0ffa pulu u,pc
ldx D001a
lbsr L0130
beq L100d
subd #1
beq L100d
bsr L100f
lbsr L0082
L100d pulu u,pc
L100f pshs d
lbsr L0bec
ldd D001c
subd ,s
std D001c
puls d,pc
lbsr L0660
beq L1035
ldx D001a
L1023 cmpx D0018
bne L102c
lbsr L1126
bra L1033
L102c leax -1,x
lbsr L0668
bne L1023
L1033 stx D001a
L1035 pulu u,pc
lbsr L0660
beq L1035
ldx D001a
L103e cmpx D001c
bne L1047
lbsr L1126
bra L1033
L1047 leax 1,x
lbsr L0668
bne L103e
bra L1033
ldx D001a
lbsr L0660
bne L105c
lbsr L06c2
bra L106f
L105c cmpx D001c
bne L1065
lbsr L1126
bra L106f
L1065 lbsr L06b2
beq L106f
lbsr L0668
bne L105c
L106f stx D001a
lbsr L008b
pulu u,pc
ldx D001a
lbsr L0660
bne L1082
lbsr L06d7
bra L106f
L1082 cmpx D0018
bne L108b
lbsr L1126
bra L106f
L108b lbsr L06d1
beq L106f
lbsr L0668
bne L1082
bra L106f
ldx D0018
stx D001a
pulu u,pc
ldx D001c
stx D001a
pulu u,pc
lda #1
sta D003c
clr D003a
pulu u,pc
L10ab lda #1
sta D003d
clr D003a
pulu u,pc
L10b3 clra
sta D003d
sta D003a
pulu u,pc
ldx D001a
cmpx D001c
beq L10ab
lda ,x
cmpa #$0d
beq L10ab
bra L10b3
ldx D001a
cmpx D001c
beq L10b3
lda ,x
cmpa #$0d
beq L10b3
bra L10ab
ldx D001a
cmpx D001c
bne L10b3
bra L10ab
ldx D001a
cmpx D001c
beq L10b3
bra L10ab
bsr L10f2
bne L10ab
bra L10b3
bsr L10f2
beq L10ab
bra L10b3
L10f2 ldx 5,u
ldy D001a
ldb ,x+
L10f9 cmpb ,x
beq L110a
cmpy D001c
beq L1108
lda ,x+
cmpa ,y+
beq L10f9
L1108 andcc #251
L110a rts
tst D0005
bne L10b3
bra L10ab
lda D0005
beq L10b3
bra L10ab
ldd 5,u
beq L10b3
bra L10ab
lda #0
lbsr L0685
beq L10b3
bra L10ab
L1126 pshs a
lbsr L0685
beq L1133
lda #1
sta D003d
clr D003a
L1133 puls a,pc
lda #0
sta D003d
sta D003a
inca
sta D003b
pulu u,pc
lda #0
sta D003a
inca
sta D003d
sta D003b
pulu u,pc
pulu u,pc
L114d tst D0041
lbne L127e
ldx D0016
lda 4,x
cmpa #$42
beq L11c5
ldx D001c
cmpx D0018
lbeq L1281
lda #$0d
cmpa -1,x
beq L1175
leax 1,x
cmpx D001e
lbhs L126f
sta -1,x
stx D001c
L1175 ldx D0018
lbsr L0691
lbsr L04da
lbne L1281
pshs x
L1183 lda ,x+
lbsr L04da
beq L1183
cmpa #$20
beq L119c
cmpa #$0d
beq L119c
cmpa #$24
beq L119c
cmpa #$23
lbne L1281
L119c ldx ,s
lbsr L04a1
lbne L1284
ldb #$2e
puls x
lbsr L0415
lbeq L1284
lbsr L073f
ldd D0024
lbsr L0770
lbsr L0716
ldd D002d
std D0024
lda #$45
sta D0026
pulu u,pc
L11c5 ldd #1
lbsr L0770
cmpx D0016
beq L11d2
lbra L126c
L11d2 ldy D0012
leay D0089,y
L11d9 ldx ,y++
beq L11e4
jsr ,x
os9 F$UnLink
bra L11d9
L11e4 ldx D0018
ldd D001c
subd D0018
tfr d,y
L11ec ldd D0002
cmpb #0
beq L1261
os9 I$Write
bcs L1263
ldx D0014
ldd D001e
subd D0014
tfr d,y
ldd D0000
cmpb #0
beq L1261
os9 I$Read
bcc L11ec
cmpb #$d3
bne L1263
tst D0036
beq L1261
ldd D001e
subd D0014
os9 F$Mem
bcs L1263
lda D0000
os9 I$Close
bcs L1263
lda D0002
os9 I$Close
bcs L1263
ldx D0032
os9 I$Delete
bcs L1261
ldy D0032
L1233 ldx D0032
L1235 lda ,y+
sta ,x+
cmpa #$2f
beq L1233
cmpa #$0d
bne L1235
ldy D0012
leax D00fe,y
tfr x,u
lbsr L0130
leax D00f7,y
tfr d,y
ldd #$0100
os9 F$Fork
bcs L1263
os9 F$Wait
tstb
bne L1263
L1261 ldb #0
L1263 os9 F$Exit
L1266 ldb #0
cmpx #$c60b
L1269 equ *-2
cmpx #$c613
L126c equ *-2
cmpx #$c622
L126f equ *-2
cmpx #$c633
L1272 equ *-2
cmpx #$c641
L1275 equ *-2
cmpx #$c64f
L1278 equ *-2
cmpx #$c659
L127b equ *-2
cmpx #$c65f
L127e equ *-2
cmpx #$c66d
L1281 equ *-2
cmpx #$c67c
L1284 equ *-2
cmpx #$c687
L1287 equ *-2
cmpx #$c694
L128a equ *-2
cmpx #$c694
L128d equ *-2
cmpx #$c6a5
L1290 equ *-2
lda #255
sta D0023
inc D003e
leax >L12c9,pcr
clra
leax d,x
lbsr L00ef
lbsr L00ff
lbra L0292
L12a8 ldb #$d7
L12aa inc D003e
pshs b
leax <L12c5,pcr
ldy #4
lda D000b
os9 I$Write
puls b
os9 F$PErr
lbsr L00ff
lbra L0292
L12c5 clra
comb
rts
bra L130c
L12c9 equ *-1
fcb $41
lsra
bra L131c
fcb $55
tsta
fcb $42
fcb $45
fcb $52
tst D0057
asla
fcb $41
lsrb
bra L1319
swi
tst D002a
bra L132d
clra
lsrb
bra L1325
fcb $55
rora
bra L130a
fcb $31
bra L1314
tst D002a
asrb
clra
fcb $52
fcb $4b
comb
negb
fcb $41
coma
fcb $45
bra L133d
fcb $55
inca
inca
bpl L1309
tsta
rola
comb
comb
rola
fcb $4e
asra
bra L1349
fcb $45
inca
rola
tsta
L1309 tst D002a
L130a equ *-1
rora
L130c rola
inca
fcb $45
bra L1354
inca
clra
comb
L1314 fcb $45
lsra
bpl L1325
L1318 fcb $4e
L1319 clra
lsrb
bra L1363
L131c equ *-1
clra
fcb $55
fcb $4e
lsra
tst D0042
fcb $52
fcb $45
L1325 fcb $41
fcb $4b
tst D004d
fcb $41
coma
fcb $52
clra
L132d bra L1378
comb
bra L1381
negb
fcb $45
fcb $4e
tst D0042
fcb $41
lsra
bra L1388
fcb $41
coma
L133d fcb $52
clra
bra L138f
fcb $41
tsta
fcb $45
tst D0044
fcb $55
negb
inca
L1349 bra L1398
fcb $41
coma
fcb $52
clra
tst D0042
fcb $41
lsra
bra L13ab
L1354 equ *-1
fcb $41
fcb $52
bra L13a5
rola
comb
lsrb
tst D0042
fcb $52
fcb $41
coma
fcb $4b
fcb $45
L1363 lsrb
bra L13b3
rola
comb
tsta
fcb $41
lsrb
coma
asla
tst D0055
fcb $4e
lsra
fcb $45
rora
rola
fcb $4e
fcb $45
lsra
bra L13cf
L1378 equ *-1
fcb $41
fcb $52
tst D002a
L137c equ *-1
fcb $45
fcb $4e
lsra
bra L13d1
L1381 equ *-1
rora
bra L13d9
fcb $45
lslb
lsrb
L1388 bpl L1397
L138a bpl L13d1
fcb $4e
lsra
bra L13df
L138f equ *-1
rora
bra L13d9
rola
inca
fcb $45
bpl L13a5
L1397 equ *-1
L1398 bpl L13e0
fcb $41
rola
inca
bpl L13ac
L139f fcb $52
fcb $45
fcb $4e
fcb $41
tsta
fcb $45
L13a5 bra L13b4
L13a7 comb
coma
fcb $52
fcb $41
L13ab lsrb
L13ac coma
asla
bra L13bd
L13b0 fcb $45
lsra
lsrb
L13b3 negb
L13b4 leas 13,x
L13b6 fcb $45
lsra
lsrb
inca
rola
fcb $42
leay 13,x
L13bd equ *-1
L13be tsta
fcb $41
coma
fcb $52
clra
comb
abx
tst D0042
L13c6 equ *-1
fcb $55
rora
rora
fcb $45
fcb $52
comb
abx
tst D004d
L13cf equ *-1
fcb $41
L13d1 coma
bcc L13e1
asr D00fb
fcb $45
clra
rora
L13d9 tst D0011
fcb $11
fcb $4e
fcb $45
clra
L13df rora
L13e0 tst D0011
L13e1 equ *-1
fcb $0b
fcb $45
clra
fcb $42
tst D0010
ldu D004e
fcb $45
clra
fcb $42
tst D0010
ldb D0045
clra
inca
tst D0010
eorb #$4e
fcb $45
clra
inca
tst D0010
ora 23109
fcb $52
clra
bls L1410
fcb $11
lbsr L675b
fcb $41
fcb $52
bls L1418
fcb $11
sex
comb
lsrb
fcb $52
L1410 bcc L141f
fcb $10
ldb 14,u
comb
lsrb
fcb $52
L1418 bcc L1427
fcb $10
ldd 4,u
rola
fcb $52
L141f tst D0008
coma
comb
tst D0011
puls d,u
L1427 tst D0011
nega
comb
fcb $45
fcb $41
fcb $52
coma
asla
bls L1456
tst D000a
lda D0043
asla
fcb $41
fcb $4e
asra
fcb $45
bls L1461
bcc L144c
dec D009e
inca
clra
fcb $41
lsra
bcc L1454
jmp D0025
comb
fcb $41
rorb
L144c fcb $45
bcc L1473
tst D000e
bitb -13,u
rola
L1454 decb
fcb $45
L1456 tst D0007
subd 4,u
fcb $45
inca
bcc L146b
asl D00a5
fcb $52
L1461 fcb $45
fcb $41
lsra
bcc L1473
tst D00b6
asrb
fcb $52
rola
L146b lsrb
fcb $45
bcc L147c
tst D00ed
comb
asla
L1473 fcb $45
inca
inca
bra L14c4
tst D0008
stb 14,u
L147c fcb $45
asrb
tst D000f
fcb $8f
neg D0041
L1482 equ *-1
bls L1492
rol D00b4
inca
bls L1497
rol D0074
lslb
bls L149c
rol D008e
bmi L14b6
L1492 equ *-1
tst D0010
negb
blt L14bb
L1497 equ *-1
tst D0010
ror $4423
L149c equ *-1
tst D000f
ora 5,u
bls L14c7
tst D000a
ldb #$3c
bls L14b6
fcb $10
andcc #$3e
bls L14bb
fcb $10
pulu cc,dp,u
bls L14d7
tst D000b
fcb $5e
L14b6 fcb $4b
bls L14c6
clr D00d6
L14bb comb
bls L14e2
tst D000a
jsr 3,u
bls L14e8
L14c4 bcc L14d3
L14c6 dec D00a6
L14c7 equ *-1
fcb $55
tst D000f
ldd 21539
tst D000b
bvc L1514
bls L14e1
L14d3 equ *-1
asr D00c5
fcb $5e
L14d7 tst D0010
sta D002f
tst D0010
jsr D004d
bls L14ee
L14e1 asr D008a
L14e2 equ *-1
rorb
bls L14f3
rol D0012
L14e8 asra
bls L14f8
inc D0044
negb
L14ee bls L14fd
inc D00b1
fcb $5b
L14f3 tst D0009
bgt L1554
bls L1506
L14f8 equ *-1
rol D0048
abx
tst D0010
L14fd equ *-1
subd -14,u
bls L150f
tst D000f
asrb
bls L1514
L1506 equ *-1
tst D007b
brn L1557
tst D0011
fcb $4b
fcb $51
L150f tst D0011
tsta
fcb $00
emod
L1516 equ *
end