Table of Contents

PWD

Header for : pwd
Module size: $130  #304
Module CRC : $FB5CC0 (Good)
Hdr parity : $19
Exec. off  : $0035  #53
Data size  : $01C9  #457
Edition    : $01  #1
Ty/La At/Rv: $11 $81
Prog mod, 6809 Obj, re-ent, R/O

CODE

* Disassembly by Os9disasm of pwd

 mod L0130,L000d,$11,$81,L0035,D01c9

* OS-9 system function equates

F$Exit equ $06
F$PrsNam equ $10
I$Open equ $84
I$ChgDir equ $86
I$Read equ $89
I$Write equ $8a
I$WritLn equ $8c
I$GetStt equ $8d
I$Close equ $8f

* OS9 data area definitions

D0000 rmb 1
D0001 rmb 2
D0003 rmb 2
D0005 rmb 1
D0006 rmb 2
D0008 rmb 1
D0009 rmb 2
D000b rmb 32
D002b rmb 2
D002d rmb 3
D0030 rmb 66
D0072 rmb 53
D00a7 rmb 290
D01c9 equ .

L000d neg   30692
 fcb $01
L0011 neg   30564
 abx   
 bra   L0079
 fcb $61
 fcb $64
 bra   L0089
 fcb $61
 tst   5,s
 bra   L0089
 fcb $6e
 bra   L0093
 fcb $61
 lsr   $680d
L0027 bgt   L0057
L0028 equ *-1
L0029 tst   D0072
L002a equ *-1
 fcb $65
 fcb $61
 fcb $64
 bra   L0095
 fcb $72
 fcb $72
 clr   -14,s
 tst   D0030
L0035 equ *-1
 adcb  #0
 ldx   a,x
 tst   D00a7
 anda  #$9f
 fcb $01
 leax  >L0028,pcr
 bsr   L0096
 sta   D0000
 lbsr  L00cd
 ldd   D0003
 std   D0009
 lda   D0005
 sta   D000b
L0052 bsr   L00c6
 beq   L0079
 leax  >L0027,pcr
L0057 equ *-3
 bsr   L0090
 lda   D0000
 os9 I$Close
 bcs   L008d
 leax  >L0028,pcr
 bsr   L0096
 bsr   L00cd
 bsr   L00a8
 bsr   L00e2
 ldd   D0003
 std   D0009
 lda   D0005
 sta   D000b
 bra   L0052
L0079 lbsr  L00fb
 ldx   D0001
 ldy   #$0081
 lda   #1
 os9 I$WritLn
 lda   D0000
L0089 os9 I$Close
 clrb  
L008d os9 F$Exit
L0090 lda   #$81
 os9 I$ChgDir
L0093 equ *-2
L0095 rts   
L0096 lda   #$81
 os9 I$Open
 rts   
L009c lda   D0000
 leax  14,u
 ldy   #$0020
 os9 I$Read
 rts   
L00a8 lda   D0000
 bsr   L009c
 bcs   L010f
 leax  14,u
 leax  29,x
 leay  9,u
 bsr   L00ba
 bne   L00a8
 rts   
L00ba ldd   ,x++
 cmpd  ,y++
 bne   L00c5
 lda   ,x
 cmpa  ,y
L00c5 rts   
L00c6 leax  3,u
 leay  6,u
 bsr   L00ba
 rts   
L00cd bsr   L009c
 ldd   D002b
 std   D0006
 lda   D002d
 sta   D0008
 bsr   L009c
 ldd   D002b
 std   D0003
 lda   D002d
 sta   D0005
 rts   
L00e2 leax  14,u
L00e4 os9 F$PrsNam
 bcs   L0109
 ldx   D0001
L00eb lda   ,-y
 anda  #$7f
 sta   ,-x
 decb  
 bne   L00eb
 lda   #$2f
 sta   ,-x
 stx   D0001
 rts   
L00fb lda   D0000
 ldb   #$0e
 leax  175,u
 os9 I$GetStt
 bsr   L00e4
 rts   
L0109 leax  L0011,pcr
 bra   L0123
L010f leax  L002a,pcr
 bra   L0123
L0115 lda   #2
 os9 I$Write
 bcs   L0128
 rts   
 bsr   L0115
 leax  L0029,pcr
L0123 lda   #2
 os9 I$WritLn
L0128 ldb   #0
 os9 F$Exit

 emod 

L0130 equ *

 end

RTS

Return to OS-9 or Top