====== RENAME ======
Header for : Rename
Module size: $11D #285
Module CRC : $C94E50 (Good)
Hdr parity : $34
Exec. off : $0014 #20
Data size : $01D1 #465
Edition : $05 #5
Ty/La At/Rv: $11 $81
Prog mod, 6809 Obj, re-ent, R/O
===== CODE =====
* Disassembly by Os9disasm of rename
mod L011d,L000d,$11,$81,L0014,D01d1
* OS-9 system function equates
F$Exit equ $06
F$PrsNam equ $10
F$CmpNam equ $11
I$Open equ $84
I$ChgDir equ $86
I$Seek equ $88
I$Write equ $8a
I$GetStt equ $8d
I$Close equ $8f
* OS9 data area definitions
D0000 rmb 2
D0002 rmb 2
D0004 rmb 1
D0005 rmb 2
D0007 rmb 1
D0008 rmb 24
D0020 rmb 26
D003a rmb 2
D003c rmb 405
D01d1 equ .
L000d fcb $52
fcb $65
jmp 1,s
tst b,s
fcb $05
L0014 cmpd #4
lblo L00a8
stx D0000
lda #2
os9 I$Open
bcc L0032
cmpb #$d6
bne L00a5
ldx D0000
lda #$82
os9 I$Open
bcs L00a5
L0032 stx D0005
ldb #0
leax 32,u
os9 I$GetStt
bcs L00a5
os9 I$Close
bcs L00a5
ldb D0020
cmpb #1
bne L00a8
bsr L00ae
bcs L00a5
ldx D0002
lda #$0d
sta -1,x
ldx D0000
lda #3
os9 I$ChgDir
bcs L00a5
ldx D0005
ldb D0008
decb
lda b,x
ora #$80
sta b,x
incb
cmpb D0004
bne L0075
leay ,x
ldx D0002
os9 F$CmpNam
bcc L0082
L0075 ldx D0005
lda #1
os9 I$Open
bcc L00a8
cmpb #$d8
bne L00a8
L0082 leax
===== RTS =====
Return to [[:OS-9:]] or [[:Top:]]