annotate level1/cmds/pxd.asm @ 200:e9ce43cc215e

Made major changes to headers for consistency and identification
author boisy
date Mon, 15 Jul 2002 03:42:42 +0000
parents 0912ac5dc2ff
children baead4d344f1
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1 ********************************************************************
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
2 * pxd - Print execution directory
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
3 *
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
4 * $Id$
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
5 *
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
6 * Ed. Comments Who YY/MM/DD
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
7 * ------------------------------------------------------------------
200
e9ce43cc215e Made major changes to headers for consistency and identification
boisy
parents: 15
diff changeset
8 * 1 From Tandy OS-9 Level One VR 02.00.00
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
9
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
10 nam pxd
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
11 ttl Print working directory
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
12
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
13 * Disassembled 98/09/10 23:50:10 by Disasm v1.6 (C) 1988 by RML
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
14
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
15 ifp1
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
16 use defsfile
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
17 endc
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
18
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
19 tylg set Prgrm+Objct
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
20 atrv set ReEnt+rev
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
21 rev set $01
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
22 edition set 1
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
23
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
24 mod eom,name,tylg,atrv,start,size
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
25
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
26 fildes rmb 1
13
5a5574d54988 Touched up source comments, added mdir to Makefile
boisy
parents: 0
diff changeset
27 bufptr rmb 2
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
28 u0003 rmb 2
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
29 u0005 rmb 1
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
30 u0006 rmb 2
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
31 u0008 rmb 1
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
32 u0009 rmb 2
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
33 u000B rmb 3
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
34 u000E rmb 29
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
35 u002B rmb 2
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
36 u002D rmb 129
13
5a5574d54988 Touched up source comments, added mdir to Makefile
boisy
parents: 0
diff changeset
37 buffer rmb 1
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
38 sttbuf rmb 282
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
39 size equ .
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
40
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
41 name fcs /pxd/
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
42 fcb edition
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
43
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
44 badnam fcc "pxd: bad name in path"
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
45 fcb C$CR
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
46 dotdot fcc "."
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
47 dot fcc "."
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
48 cr fcb C$CR
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
49 rdmsg fcc "read error"
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
50 fcb C$CR
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
51
13
5a5574d54988 Touched up source comments, added mdir to Makefile
boisy
parents: 0
diff changeset
52 start leax >buffer,u
5a5574d54988 Touched up source comments, added mdir to Makefile
boisy
parents: 0
diff changeset
53 lda #C$CR
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
54 sta ,x
13
5a5574d54988 Touched up source comments, added mdir to Makefile
boisy
parents: 0
diff changeset
55 stx <bufptr
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
56 leax >dot,pcr
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
57 bsr open
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
58 sta <fildes
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
59 lbsr rdtwo
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
60 ldd <u0003
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
61 std <u0009
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
62 lda <u0005
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
63 sta <u000B
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
64 L0052 bsr L00C6
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
65 beq L0079
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
66 leax >dotdot,pcr
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
67 bsr chdir
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
68 lda <fildes
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
69 os9 I$Close
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
70 bcs L008D
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
71 leax >dot,pcr
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
72 bsr open
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
73 bsr rdtwo
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
74 bsr L00A8
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
75 bsr L00E2
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
76 ldd <u0003
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
77 std <u0009
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
78 lda <u0005
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
79 sta <u000B
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
80 bra L0052
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
81 L0079 lbsr L00FB
13
5a5574d54988 Touched up source comments, added mdir to Makefile
boisy
parents: 0
diff changeset
82 ldx <bufptr
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
83 ldy #$0081
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
84 lda #$01
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
85 os9 I$WritLn
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
86 lda <fildes
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
87 os9 I$Close
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
88 clrb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
89 L008D os9 F$Exit
13
5a5574d54988 Touched up source comments, added mdir to Makefile
boisy
parents: 0
diff changeset
90 chdir lda #DIR.+EXEC.+READ.
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
91 os9 I$ChgDir
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
92 rts
13
5a5574d54988 Touched up source comments, added mdir to Makefile
boisy
parents: 0
diff changeset
93 open lda #DIR.+EXEC.+READ.
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
94 os9 I$Open
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
95 rts
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
96 read32 lda <fildes
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
97 leax u000E,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
98 ldy #$0020
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
99 os9 I$Read
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
100 rts
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
101 L00A8 lda <fildes
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
102 bsr read32
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
103 bcs L010F
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
104 leax u000E,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
105 leax <$1D,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
106 leay u0009,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
107 bsr attop
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
108 bne L00A8
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
109 rts
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
110 attop ldd ,x++
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
111 cmpd ,y++
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
112 bne L00C5
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
113 lda ,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
114 cmpa ,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
115 L00C5 rts
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
116 L00C6 leax u0003,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
117 leay u0006,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
118 bsr attop * check if we're at the top
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
119 rts
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
120 rdtwo bsr read32 * read "." from directory
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
121 ldd <u002B
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
122 std <u0006
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
123 lda <u002D
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
124 sta <u0008
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
125 bsr read32 * read ".." from directory
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
126 ldd <u002B
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
127 std <u0003
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
128 lda <u002D
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
129 sta <u0005
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
130 rts
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
131 L00E2 leax u000E,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
132 prsnam os9 F$PrsNam
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
133 bcs L0109
13
5a5574d54988 Touched up source comments, added mdir to Makefile
boisy
parents: 0
diff changeset
134 ldx <bufptr
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
135 L00EB lda ,-y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
136 anda #$7F
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
137 sta ,-x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
138 decb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
139 bne L00EB
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
140 lda #$2F
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
141 sta ,-x
13
5a5574d54988 Touched up source comments, added mdir to Makefile
boisy
parents: 0
diff changeset
142 stx <bufptr
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
143 rts
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
144 L00FB lda <fildes
13
5a5574d54988 Touched up source comments, added mdir to Makefile
boisy
parents: 0
diff changeset
145 ldb #SS.DevNm
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
146 leax >sttbuf,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
147 os9 I$GetStt
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
148 bsr prsnam
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
149 rts
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
150 L0109 leax >badnam,pcr
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
151 bra wrerr
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
152 L010F leax >rdmsg,pcr
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
153 bra wrerr
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
154 L0115 lda #$02
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
155 os9 I$Write
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
156 bcs L0128
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
157 rts
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
158 bsr L0115
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
159 leax >cr,pcr
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
160 wrerr lda #$02
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
161 os9 I$WritLn
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
162 L0128 ldb #$00
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
163 os9 F$Exit
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
164
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
165 emod
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
166 eom equ *
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
167 end
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
168