====== COPY ======
Header for : Copy
Module size: $2DC #732
Module CRC : $C75D81 (Good)
Hdr parity : $F6
Exec. off : $00D8 #216
Data size : $1300 #4864
Edition : $07 #7
Ty/La At/Rv: $11 $81
Prog mod, 6809 Obj, re-ent, R/O
===== CODE =====
* Disassembly by Os9disasm of copy
mod L02dc,L000d,$11,$81,L00d8,D1300
* OS-9 system function equates
F$Exit equ $06
I$Create equ $83
I$Open equ $84
I$Seek equ $88
I$Read equ $89
I$Write equ $8a
I$WritLn equ $8c
I$GetStt equ $8d
I$SetStt equ $8e
I$Close equ $8f
* class D external label equates
Dffff equ $ffff
* OS9 data area definitions
D0000 rmb 1
D0001 rmb 1
D0002 rmb 1
D0003 rmb 1
D0004 rmb 2
D0006 rmb 2
D0008 rmb 2
D000a rmb 2
D000c rmb 2
D000e rmb 1
D000f rmb 17
D0020 rmb 18
D0032 rmb 2
D0034 rmb 17
D0045 rmb 4795
D1300 equ .
L000d coma
clr -16,s
adcb $0752
L0012 equ *-1
fcb $65
fcb $61
lsr -7,s
bra L006c
clra
fcb $55
fcb $52
coma
fcb $45
bge L0040
asl 9,s
lsr $2043
bra L009b
fcb $6f
bra L008d
clr 14,s
lsr $696e
fcb $75
fcb $65
abx
bra L0086
L0033 equ *-1
fcb $65
fcb $61
lsr -7,s
bra L007e
fcb $45
comb
lsrb
rola
fcb $4e
fcb $41
L0040 lsrb
rola
clra
fcb $4e
bge L0066
asl 9,s
lsr $2043
bra L00c1
fcb $6f
bra L00b3
clr 14,s
lsr $696e
fcb $75
fcb $65
abx
bra L0067
L0059 equ *-1
L005a fcb $55
com $653a
bra L00a3
clr -16,s
rol $203c
negb
L0066 fcb $61
L0067 lsr $6831
fcb $3e
bra L00a9
L006c equ *-1
negb
fcb $61
lsr $6832
fcb $3e
bra L00d0
blt L00ea
tstb
dec D0020
bra L00a9
com $203d
L007e equ *-1
bra L00f4
rol 14,s
asr 12,s
fcb $65
L0086 bra L00ec
fcb $72
rol -10,s
fcb $65
bra L00f1
L008d equ *-1
clr -16,s
rol $2028
negb
fcb $61
lsr $6832
bra L0107
fcb $75
L009b com 29728
fcb $62
fcb $65
bra L0105
clr 13,s
L00a3 equ *-1
neg $6c65
lsr $6520
L00a9 equ *-1
neg $6174
asl 12,s
rol -13,s
lsr $290d
L00b3 equ *-1
L00b4 asr D0045
fcb $72
fcb $72
clr -14,s
bra L00e9
bra L0135
fcb $72
rol -12,s
L00c1 fcb $65
bra L013a
fcb $65
fcb $72
rol 6,s
rol 3,s
fcb $61
lsr $696f
fcb $6e
bra L0137
L00d0 equ *-1
fcb $61
rol 12,s
fcb $65
lsr D000e,y
tst D0032
L00d8 equ *-1
adcb #2
neg D0034
nega
leau 16,u
L00e1 clr ,-u
cmpu ,s
bhi L00e1
tfr y,d
L00e9 equ *-1
L00ea subd ,s++
L00ec subd #$0300
clrb
std D0004
L00f1 equ *-1
pshs x
L00f4 lda ,x+
cmpa #$2d
beq L0100
cmpa #$0d
bne L00f4
bra L0113
L0100 ldd ,x+
eora #$53
anda #$df
L0105 equ *-1
bne L0110
L0107 equ *-1
cmpb #$30
bcc L0110
inc D000e
bra L00f4
L0110 lbra L0276
L0113 puls x
lda #1
os9 I$Open
bcc L0125
cmpb #$d7
lbeq L0276
lbra L027d
L0125 sta D0000
tst D000e
beq L0135
lda ,x
ldb #$d7
cmpa #$2f
lbne L027d
L0135 pshs x
L0137 lda D0000
leax 16,u
L013a equ *-2
ldb #0
os9 I$GetStt
lblo L027d
lda ,x
sta D0002
ldb #$0f
cmpa #1
bne L0165
pshs x,u
lda D0000
ldb #2
os9 I$GetStt
lblo L027d
stx D0006
stu D0008
puls x,u
ldb 19,x
L0165 stb D000f
puls x
lda #1
lbsr L028a
lda #3
ldb D000f
os9 I$Create
bcc L0184
inc D0003
lda #2
ldb D000f
os9 I$Create
lblo L027d
L0184 sta D0001
leax 16,u
ldb #0
os9 I$GetStt
lblo L027d
ldb ,x
cmpb #1
beq L019c
inc D0003
bra L01dd
L019c tst D0003
bne L01ad
ldb #1
stb 8,x
ldb #0
os9 I$SetStt
lblo L027d
L01ad lda D0002
cmpa #1
bne L01dd
pshs u
lda D0001
ldb #2
ldx D0006
ldu D0008
os9 I$SetStt
lblo L027d
puls u
leax 16,u
ldy #$0010
lda D0000
ldb #$0f
os9 I$GetStt
bcs L01dd
lda D0001
ldb #$0f
os9 I$SetStt
L01dd leax 768,u
clra
lbsr L028a
lda D0000
ldy D0004
os9 I$Read
bcs L025a
lda #1
lbsr L028a
lda D0001
os9 I$Write
lblo L027d
tst D0003
bne L024d
pshs y,u
ldx D000a
ldu D000c
lda D0001
os9 I$Seek
bcs L027d
ldu 2,s
leau 768,u
ldd ,s
addd D000c
std D000c
ldd ,s
bcc L0222
leax 1,x
stx D000a
L0222 ldy #$0100
std ,s
tsta
bne L022d
tfr d,y
L022d ldx 2,s
leax 512,x
lda D0001
os9 I$Read
bcs L027d
L023a lda ,u+
cmpa ,x+
bne L026b
leay Dffff,y
bne L023a
ldd ,s
subd #$0100
bhi L0222
puls y,u
L024d lda D0000
ldb #6
os9 I$GetStt
bcc L01dd
cmpb #$d3
beq L0262
L025a cmpb #$d3
bne L027d
lda #1
bsr L028a
L0262 lda D0001
os9 I$Close
bcc L027c
bra L027d
L026b leax L00b4,pcr
bsr L0280
comb
ldb #1
bra L027d
L0276 leax L005a,pcr
bsr L0280
L027c clrb
L027d os9 F$Exit
L0280 ldy #$0100
L0284 lda #1
os9 I$WritLn
rts
L028a tst D000e
beq L02c7
pshs x,y
L0290 pshs a
tsta
bne L029f
leax L0012,pcr
ldy #$0021
bra L02a7
L029f leax L0033,pcr
ldy #$0026
L02a7 bsr L0284
leax ,-s
ldy #1
clra
os9 I$Read
lda ,s+
eora #$43
anda #$df
beq L02c1
bsr L02c8
puls a
bne L0290
L02c1 bsr L02c8
puls a
puls x,y
L02c7 rts
L02c8 pshs a,x,y
lda #1
leax L0059,pcr
ldy #$0050
os9 I$WritLn
puls a,x,y,pc
emod
L02dc equ *
end
===== RTS =====
Return to [[:OS-9:]] or [[:Top:]]