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 <L00ac,pcr
lda #$83
os9 I$Open
bcs L00a5
ldx D003a
ldu D003c
os9 I$Seek
bcs L00a5
ldx D0005
ldy D0007
os9 I$Write
bcs L00a5
os9 I$Close
bcs L00a5
clrb
L00a5 os9 F$Exit
L00a8 ldb #$d7
bra L00a5
L00ac bgt L00bb
L00ae ldx D0000
bsr L00f6
ldu D0000
lda ,u
cmpa #$2f
beq L00c7
lda ,y
L00bb equ *-1
cmpa #$2f
beq L00c7
leau <L00ac,pcr
stu D0000
bra L00cd
L00c7 leax ,y
bsr L00f6
bcs L00f2
L00cd stx D0002
stb D0004
leax ,y
bsr L00f6
bcc L00cd
ldb D0004
beq L00f2
ldx D0005
os9 F$PrsNam
bcs L00f2
lda ,y
cmpa #$2f
beq L00f2
cmpb #$1e
bcc L00f2
stx D0005
clra
std D0007
rts
L00f2 comb
ldb #$d7
rts
L00f6 os9 F$PrsNam
bcc L0119
clrb
leau ,x
L00fe lda ,u+
bpl L0107
incb
cmpa #$ae
bne L010c
L0107 incb
cmpa #$2e
beq L00fe
L010c decb
beq L0118
leay -1,u
cmpb #3
bcc L0118
clrb
bra L0119
L0118 coma
L0119 rts
emod
L011d equ *
end
RTS
This website uses cookies. By using the website, you agree with storing cookies on your computer. Also you acknowledge that you have read and understand our Privacy Policy. If you do not agree leave the website.
OK More information about cookies