====== FREE ======
Header for : Free
Module size: $2C1 #705
Module CRC : $8542E9 (Good)
Hdr parity : $EB
Exec. off : $00A5 #165
Data size : $0361 #865
Edition : $04 #4
Ty/La At/Rv: $11 $81
Prog mod, 6809 Obj, re-ent, R/O
===== CODE =====
* Disassembly by Os9disasm of free
mod L02c1,L000d,$11,$81,L00a5,D0361
* OS-9 system function equates
F$Exit equ $06
F$PrsNam equ $10
I$Open equ $84
I$Seek equ $88
I$Read equ $89
I$WritLn equ $8c
I$Close equ $8f
* OS9 data area definitions
D0000 rmb 1
D0001 rmb 1
D0002 rmb 1
D0003 rmb 1
D0004 rmb 1
D0005 rmb 2
D0007 rmb 1
D0008 rmb 1
D0009 rmb 1
D000a rmb 1
D000b rmb 1
D000c rmb 20
D0020 rmb 7
D0027 rmb 46
D0055 rmb 12
D0061 rmb 2
D0063 rmb 51
D0096 rmb 7
D009d rmb 708
D0361 equ .
L000d rora
fcb $72
fcb $65
bitb 4,x
L0012 dec D0055
com $653a
bra L005f
fcb $72
fcb $65
fcb $65
bra L0079
ble L0084
rol -13,s
fcb $6b
jmp 1,s
tst 5,s
tstb
dec D0020
bra L00a0
fcb $65
inc 12,s
com $2068
clr -9,s
bra L00a3
fcb $61
jmp -7,s
bra L009f
rol -13,s
fcb $6b
bra L00b3
fcb $65
com -12,s
clr -14,s
com $2061
fcb $72
fcb $65
bra L00c1
jmp -11,s
com $6564
tst D0063
L0052 equ *-1
fcb $72
fcb $65
fcb $61
lsr $6564
bra L00ca
fcb $6e
ora $4361
L005d equ *-2
L005f neg $6163
rol -12,s
rol -17888
L0066 equ *-1
com $6563
lsr $6f72
com $20a8
L0070 blt L00e5
fcb $65
com -12,s
clr -14,s
bra L00dc
L0079 inc -11,s
com 29797
fcb $72
com $a920
L0081 equ *-1
rora
fcb $72
L0084 fcb $65
fcb $65
bra L00fb
fcb $65
com -12,s
clr -14,s
com $2c20
inc 1,s
fcb $72
asr 5,s
com 29728
fcb $62
inc 15,s
com d,s
L009d bra L0112
L009f fcb $65
L00a0 com -12,s
clr -14,s
L00a3 equ *-1
addd 12621
L00a5 equ *-2
sty D0001
cmpd #0
beq L00de
lda ,x+
cmpa #$0d
L00b3 equ *-1
beq L00de
cmpa #$2f
beq L00ca
L00ba leax L0012,pcr
ldy #$0040
L00c1 equ *-1
lda #2
os9 I$WritLn
lbra L01c2
L00ca leax -1,x
pshs x
os9 F$PrsNam
puls x
bcs L00ba
L00d5 lda ,x+
lbsr L020e
subb #1
L00dc bcc L00d5
L00de lda #$40
lbsr L020e
lbsr L020c
L00e5 equ *-1
leax 13,u
stx D0001
lda #1
os9 I$Open
sta D0003
bcs L00fd
leax 93,u
ldy #$003f
os9 I$Read
L00fb equ *-2
L00fd lblo L01c3
lbsr L0218
leay 124,u
lda #$bf
sta 156,u
lbsr L0202
leay L0052,pcr
L0112 equ *-2
lbsr L0202
lbsr L0289
lbsr L0218
leay L005d,pcr
lbsr L0202
leax 93,u
lbsr L0245
leay L0066,pcr
lbsr L0202
dec D0002
ldd D0063
pshs d
clr ,-s
leax ,s
lbsr L0245
leas 3,s
leay L0070,pcr
lbsr L0202
lbsr L0218
clra
clrb
sta D0004
std D0005
sta D000a
std D000b
sta D0007
std D0008
lda D0003
ldx #0
pshs u
ldu #256
os9 I$Seek
puls u
leax 415,u
stx D009d
L016d lda D0003
leax 159,u
ldy #$0100
os9 I$Read
bcs L01c3
L017c lda ,x+
bsr L01c6
stb ,-s
beq L0192
L0184 ldd D0005
addd D0063
std D0005
bcc L018e
inc D0004
L018e dec ,s
bne L0184
L0192 leas 1,s
cmpx D009d
bcs L017c
ldd D0061
subd #$0100
std D0061
bhi L016d
bsr L01e3
leax 4,u
lbsr L0245
leay L0081,pcr
bsr L0202
leax 7,u
lbsr L0245
leay L009d,pcr
bsr L0202
bsr L0218
lda D0003
os9 I$Close
bcs L01c3
L01c2 clrb
L01c3 os9 F$Exit
L01c6 clrb
cmpa #255
beq L01e3
bsr L01cd
L01cd bsr L01cf
L01cf bsr L01d1
L01d1 asla
bcs L01e3
incb
pshs d
ldd D000b
addd D0063
std D000b
bcc L01e1
inc D000a
L01e1 puls d,pc
L01e3 pshs d
ldd D000a
cmpd D0007
bhi L01f4
bne L01fa
ldb D000c
cmpb D0009
bls L01fa
L01f4 sta D0007
ldd D000b
std D0008
L01fa clr D000a
clr D000b
clr D000c
puls d,pc
L0202 lda ,y
anda #$7f
bsr L020e
lda ,y+
bpl L0202
L020c lda #$20
L020e pshs x
ldx D0001
sta ,x+
stx D0001
puls x,pc
L0218 pshs a,x,y
lda #$0d
bsr L020e
leax 13,u
stx D0001
ldy #$0050
lda #1
os9 I$WritLn
puls a,x,y,pc
L022d eora D0096
suba #$0f
fcb $42
nega
fcb $01
lda #$a0
neg D0027
fcb $10
neg D0003
fcb $e8
neg D0000
fcb $64
neg D0000
dec D0000
neg D0001
L0245 lda #$0a
pshs d,x,y
leay
===== RTS =====
Return to [[:OS-9:]] or [[:Top:]]