annotate level1/cmds/mdir.asm @ 2514:7828af6e1b59

Adding startup.dw
author boisy
date Tue, 06 Apr 2010 13:09:10 +0000
parents 4604b8d90bd5
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1 ********************************************************************
13
5a5574d54988 Touched up source comments, added mdir to Makefile
boisy
parents: 0
diff changeset
2 * Mdir - Show module directory
0
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 *
1325
84ea83668304 Redid comments, reset all rev nibbles that weren't explictly set to 0
boisy
parents: 1277
diff changeset
6 * Edt/Rev YYYY/MM/DD Modified by
84ea83668304 Redid comments, reset all rev nibbles that weren't explictly set to 0
boisy
parents: 1277
diff changeset
7 * Comment
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
8 * ------------------------------------------------------------------
1325
84ea83668304 Redid comments, reset all rev nibbles that weren't explictly set to 0
boisy
parents: 1277
diff changeset
9 * 5 ????/??/??
84ea83668304 Redid comments, reset all rev nibbles that weren't explictly set to 0
boisy
parents: 1277
diff changeset
10 *
84ea83668304 Redid comments, reset all rev nibbles that weren't explictly set to 0
boisy
parents: 1277
diff changeset
11 * 6 2003/01/14 Boisy G. Pitre
84ea83668304 Redid comments, reset all rev nibbles that weren't explictly set to 0
boisy
parents: 1277
diff changeset
12 * Changed option to -e, optimized slightly.
84ea83668304 Redid comments, reset all rev nibbles that weren't explictly set to 0
boisy
parents: 1277
diff changeset
13 *
84ea83668304 Redid comments, reset all rev nibbles that weren't explictly set to 0
boisy
parents: 1277
diff changeset
14 * 7 2003/08/25 Rodney V. Hamilton
84ea83668304 Redid comments, reset all rev nibbles that weren't explictly set to 0
boisy
parents: 1277
diff changeset
15 * Fixed leading zero supression, more optimizations.
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
16
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
17 nam Mdir
13
5a5574d54988 Touched up source comments, added mdir to Makefile
boisy
parents: 0
diff changeset
18 ttl Show module directory
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
19
13
5a5574d54988 Touched up source comments, added mdir to Makefile
boisy
parents: 0
diff changeset
20 * Disassembled 02/04/05 12:49:18 by Disasm v1.6 (C) 1988 by RML
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
21
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
22 ifp1
13
5a5574d54988 Touched up source comments, added mdir to Makefile
boisy
parents: 0
diff changeset
23 use defsfile
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
24 endc
13
5a5574d54988 Touched up source comments, added mdir to Makefile
boisy
parents: 0
diff changeset
25
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
26 tylg set Prgrm+Objct
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
27 atrv set ReEnt+rev
1325
84ea83668304 Redid comments, reset all rev nibbles that weren't explictly set to 0
boisy
parents: 1277
diff changeset
28 rev set $00
1277
54ebe88fdc10 mdir fixes by Rodney!
boisy
parents: 838
diff changeset
29 edition set 7
92
3f67d4e039f0 Some labels changed to relevant names
roug
parents: 15
diff changeset
30 stdout set 1
13
5a5574d54988 Touched up source comments, added mdir to Makefile
boisy
parents: 0
diff changeset
31
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
32 mod eom,name,tylg,atrv,start,size
13
5a5574d54988 Touched up source comments, added mdir to Makefile
boisy
parents: 0
diff changeset
33
838
19ac91c8dbcf Changed option from e to -e, optimized slightly
boisy
parents: 200
diff changeset
34 org 0
19ac91c8dbcf Changed option from e to -e, optimized slightly
boisy
parents: 200
diff changeset
35 mdstart rmb 2
19ac91c8dbcf Changed option from e to -e, optimized slightly
boisy
parents: 200
diff changeset
36 mdend rmb 2
19ac91c8dbcf Changed option from e to -e, optimized slightly
boisy
parents: 200
diff changeset
37 parmptr rmb 2
1277
54ebe88fdc10 mdir fixes by Rodney!
boisy
parents: 838
diff changeset
38 zflag rmb 1 supress leading zeros flag
92
3f67d4e039f0 Some labels changed to relevant names
roug
parents: 15
diff changeset
39 bufptr rmb 1
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
40 u0008 rmb 1
838
19ac91c8dbcf Changed option from e to -e, optimized slightly
boisy
parents: 200
diff changeset
41 datebuf rmb 3
19ac91c8dbcf Changed option from e to -e, optimized slightly
boisy
parents: 200
diff changeset
42 timebuf rmb 3
1277
54ebe88fdc10 mdir fixes by Rodney!
boisy
parents: 838
diff changeset
43 u000F rmb 1 name field width
54ebe88fdc10 mdir fixes by Rodney!
boisy
parents: 838
diff changeset
44 u0010 rmb 1 last starting column
838
19ac91c8dbcf Changed option from e to -e, optimized slightly
boisy
parents: 200
diff changeset
45 narrow rmb 1
1277
54ebe88fdc10 mdir fixes by Rodney!
boisy
parents: 838
diff changeset
46 buffer rmb 80
54ebe88fdc10 mdir fixes by Rodney!
boisy
parents: 838
diff changeset
47 rmb 450 stack & parameters
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
48 size equ .
13
5a5574d54988 Touched up source comments, added mdir to Makefile
boisy
parents: 0
diff changeset
49
5a5574d54988 Touched up source comments, added mdir to Makefile
boisy
parents: 0
diff changeset
50 name fcs /Mdir/
200
e9ce43cc215e Made major changes to headers for consistency and identification
boisy
parents: 92
diff changeset
51 fcb edition
13
5a5574d54988 Touched up source comments, added mdir to Makefile
boisy
parents: 0
diff changeset
52
92
3f67d4e039f0 Some labels changed to relevant names
roug
parents: 15
diff changeset
53 tophead fcb C$LF
1277
54ebe88fdc10 mdir fixes by Rodney!
boisy
parents: 838
diff changeset
54 fcs " Module directory at "
92
3f67d4e039f0 Some labels changed to relevant names
roug
parents: 15
diff changeset
55 ltitle fcb C$LF
13
5a5574d54988 Touched up source comments, added mdir to Makefile
boisy
parents: 0
diff changeset
56 fcc "Addr Size Typ Rev Attr Use Module name"
5a5574d54988 Touched up source comments, added mdir to Makefile
boisy
parents: 0
diff changeset
57 fcb C$LF
5a5574d54988 Touched up source comments, added mdir to Makefile
boisy
parents: 0
diff changeset
58 fcc "---- ---- --- --- ---- --- ------------"
5a5574d54988 Touched up source comments, added mdir to Makefile
boisy
parents: 0
diff changeset
59 fcb C$CR
838
19ac91c8dbcf Changed option from e to -e, optimized slightly
boisy
parents: 200
diff changeset
60 stitle fcb C$LF
13
5a5574d54988 Touched up source comments, added mdir to Makefile
boisy
parents: 0
diff changeset
61 fcc "Addr Size Ty Rv At Uc Name"
5a5574d54988 Touched up source comments, added mdir to Makefile
boisy
parents: 0
diff changeset
62 fcb C$LF
5a5574d54988 Touched up source comments, added mdir to Makefile
boisy
parents: 0
diff changeset
63 fcc "---- ---- -- -- -- -- ---------"
5a5574d54988 Touched up source comments, added mdir to Makefile
boisy
parents: 0
diff changeset
64 fcb C$CR
5a5574d54988 Touched up source comments, added mdir to Makefile
boisy
parents: 0
diff changeset
65
838
19ac91c8dbcf Changed option from e to -e, optimized slightly
boisy
parents: 200
diff changeset
66 start stx <parmptr
1277
54ebe88fdc10 mdir fixes by Rodney!
boisy
parents: 838
diff changeset
67 clr <zflag
838
19ac91c8dbcf Changed option from e to -e, optimized slightly
boisy
parents: 200
diff changeset
68 clr <narrow assume wide output
19ac91c8dbcf Changed option from e to -e, optimized slightly
boisy
parents: 200
diff changeset
69 lda #stdout standard output
19ac91c8dbcf Changed option from e to -e, optimized slightly
boisy
parents: 200
diff changeset
70 ldb #SS.ScSiz we need screen size
19ac91c8dbcf Changed option from e to -e, optimized slightly
boisy
parents: 200
diff changeset
71 os9 I$GetStt get it
19ac91c8dbcf Changed option from e to -e, optimized slightly
boisy
parents: 200
diff changeset
72 bcc L00D2 branch if we got it
19ac91c8dbcf Changed option from e to -e, optimized slightly
boisy
parents: 200
diff changeset
73 cmpb #E$UnkSvc not a known service request error?
19ac91c8dbcf Changed option from e to -e, optimized slightly
boisy
parents: 200
diff changeset
74 lbne Exit if not, exit
1791
4604b8d90bd5 Modified to for better use of 51x24 driver
boisy
parents: 1747
diff changeset
75 bra Do80
838
19ac91c8dbcf Changed option from e to -e, optimized slightly
boisy
parents: 200
diff changeset
76 L00D2 cmpx #80 80 columns?
1791
4604b8d90bd5 Modified to for better use of 51x24 driver
boisy
parents: 1747
diff changeset
77 blt Chk51 branch if less than
4604b8d90bd5 Modified to for better use of 51x24 driver
boisy
parents: 1747
diff changeset
78 Do80 ldd #$0C30
4604b8d90bd5 Modified to for better use of 51x24 driver
boisy
parents: 1747
diff changeset
79 bra SetSize
4604b8d90bd5 Modified to for better use of 51x24 driver
boisy
parents: 1747
diff changeset
80 Chk51 cmpx #51 51 columns?
4604b8d90bd5 Modified to for better use of 51x24 driver
boisy
parents: 1747
diff changeset
81 blt Do32
4604b8d90bd5 Modified to for better use of 51x24 driver
boisy
parents: 1747
diff changeset
82 Do51 ldd #$0C28
4604b8d90bd5 Modified to for better use of 51x24 driver
boisy
parents: 1747
diff changeset
83 bra SetSize
4604b8d90bd5 Modified to for better use of 51x24 driver
boisy
parents: 1747
diff changeset
84 Do32 inc <narrow
838
19ac91c8dbcf Changed option from e to -e, optimized slightly
boisy
parents: 200
diff changeset
85 ldd #$0A15
1791
4604b8d90bd5 Modified to for better use of 51x24 driver
boisy
parents: 1747
diff changeset
86 SetSize
13
5a5574d54988 Touched up source comments, added mdir to Makefile
boisy
parents: 0
diff changeset
87 std <u000F
1791
4604b8d90bd5 Modified to for better use of 51x24 driver
boisy
parents: 1747
diff changeset
88 leay >tophead,pcr
1277
54ebe88fdc10 mdir fixes by Rodney!
boisy
parents: 838
diff changeset
89 leax <buffer,u
54ebe88fdc10 mdir fixes by Rodney!
boisy
parents: 838
diff changeset
90 stx <bufptr
54ebe88fdc10 mdir fixes by Rodney!
boisy
parents: 838
diff changeset
91 lbsr copySTR
838
19ac91c8dbcf Changed option from e to -e, optimized slightly
boisy
parents: 200
diff changeset
92 leax datebuf,u
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
93 os9 F$Time
838
19ac91c8dbcf Changed option from e to -e, optimized slightly
boisy
parents: 200
diff changeset
94 leax timebuf,u
13
5a5574d54988 Touched up source comments, added mdir to Makefile
boisy
parents: 0
diff changeset
95 lbsr L0224
1277
54ebe88fdc10 mdir fixes by Rodney!
boisy
parents: 838
diff changeset
96 lbsr writeBUF
54ebe88fdc10 mdir fixes by Rodney!
boisy
parents: 838
diff changeset
97 ldx >D.ModDir MUST use ext addr for page 0
838
19ac91c8dbcf Changed option from e to -e, optimized slightly
boisy
parents: 200
diff changeset
98 stx <mdstart
13
5a5574d54988 Touched up source comments, added mdir to Makefile
boisy
parents: 0
diff changeset
99 ldd >D.ModDir+2
838
19ac91c8dbcf Changed option from e to -e, optimized slightly
boisy
parents: 200
diff changeset
100 std <mdend
1277
54ebe88fdc10 mdir fixes by Rodney!
boisy
parents: 838
diff changeset
101 leax -MD$ESize,x
92
3f67d4e039f0 Some labels changed to relevant names
roug
parents: 15
diff changeset
102 * Check for 'E' given as argument
838
19ac91c8dbcf Changed option from e to -e, optimized slightly
boisy
parents: 200
diff changeset
103 ldy <parmptr
19ac91c8dbcf Changed option from e to -e, optimized slightly
boisy
parents: 200
diff changeset
104 ldd ,y+
19ac91c8dbcf Changed option from e to -e, optimized slightly
boisy
parents: 200
diff changeset
105 andb #$DF
19ac91c8dbcf Changed option from e to -e, optimized slightly
boisy
parents: 200
diff changeset
106 cmpd #$2D45 -E ?
1277
54ebe88fdc10 mdir fixes by Rodney!
boisy
parents: 838
diff changeset
107 bne L015D
54ebe88fdc10 mdir fixes by Rodney!
boisy
parents: 838
diff changeset
108 leax >ltitle,pcr
838
19ac91c8dbcf Changed option from e to -e, optimized slightly
boisy
parents: 200
diff changeset
109 tst <narrow
1277
54ebe88fdc10 mdir fixes by Rodney!
boisy
parents: 838
diff changeset
110 beq L012B
54ebe88fdc10 mdir fixes by Rodney!
boisy
parents: 838
diff changeset
111 leax >stitle,pcr
838
19ac91c8dbcf Changed option from e to -e, optimized slightly
boisy
parents: 200
diff changeset
112 L012B ldy #80 max. length to write
19ac91c8dbcf Changed option from e to -e, optimized slightly
boisy
parents: 200
diff changeset
113 lda #stdout
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
114 os9 I$WritLn
838
19ac91c8dbcf Changed option from e to -e, optimized slightly
boisy
parents: 200
diff changeset
115 ldx <mdstart
1277
54ebe88fdc10 mdir fixes by Rodney!
boisy
parents: 838
diff changeset
116 bra L01B9
54ebe88fdc10 mdir fixes by Rodney!
boisy
parents: 838
diff changeset
117 loop ldy MD$MPtr,x
54ebe88fdc10 mdir fixes by Rodney!
boisy
parents: 838
diff changeset
118 beq L015D skip if unused slot
54ebe88fdc10 mdir fixes by Rodney!
boisy
parents: 838
diff changeset
119 ldd M$Name,y
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
120 leay d,y
1277
54ebe88fdc10 mdir fixes by Rodney!
boisy
parents: 838
diff changeset
121 lbsr copySTR
54ebe88fdc10 mdir fixes by Rodney!
boisy
parents: 838
diff changeset
122 L0141 lbsr outSP
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
123 ldb <u0008
13
5a5574d54988 Touched up source comments, added mdir to Makefile
boisy
parents: 0
diff changeset
124 subb #$12
5a5574d54988 Touched up source comments, added mdir to Makefile
boisy
parents: 0
diff changeset
125 cmpb <u0010
5a5574d54988 Touched up source comments, added mdir to Makefile
boisy
parents: 0
diff changeset
126 bhi L0154
5a5574d54988 Touched up source comments, added mdir to Makefile
boisy
parents: 0
diff changeset
127 L014C subb <u000F
5a5574d54988 Touched up source comments, added mdir to Makefile
boisy
parents: 0
diff changeset
128 bhi L014C
5a5574d54988 Touched up source comments, added mdir to Makefile
boisy
parents: 0
diff changeset
129 bne L0141
5a5574d54988 Touched up source comments, added mdir to Makefile
boisy
parents: 0
diff changeset
130 bra L015D
1277
54ebe88fdc10 mdir fixes by Rodney!
boisy
parents: 838
diff changeset
131 L0154 lbsr writeBUF
54ebe88fdc10 mdir fixes by Rodney!
boisy
parents: 838
diff changeset
132 L015D leax MD$ESize,x
838
19ac91c8dbcf Changed option from e to -e, optimized slightly
boisy
parents: 200
diff changeset
133 cmpx <mdend
92
3f67d4e039f0 Some labels changed to relevant names
roug
parents: 15
diff changeset
134 bcs loop
1277
54ebe88fdc10 mdir fixes by Rodney!
boisy
parents: 838
diff changeset
135 lbsr writeBUF
838
19ac91c8dbcf Changed option from e to -e, optimized slightly
boisy
parents: 200
diff changeset
136 bra ExitOk
92
3f67d4e039f0 Some labels changed to relevant names
roug
parents: 15
diff changeset
137 *
838
19ac91c8dbcf Changed option from e to -e, optimized slightly
boisy
parents: 200
diff changeset
138 * A module entry is 2 two byte pointers.
92
3f67d4e039f0 Some labels changed to relevant names
roug
parents: 15
diff changeset
139 * If the first pointer is $0000, then the slot is unused
1277
54ebe88fdc10 mdir fixes by Rodney!
boisy
parents: 838
diff changeset
140 L0168 ldy MD$MPtr,x ptr=0?
54ebe88fdc10 mdir fixes by Rodney!
boisy
parents: 838
diff changeset
141 beq gotonxt yes, skip unused slot
54ebe88fdc10 mdir fixes by Rodney!
boisy
parents: 838
diff changeset
142 ldd MD$MPtr,x address (faster than tfr)
54ebe88fdc10 mdir fixes by Rodney!
boisy
parents: 838
diff changeset
143 bsr out4HS
54ebe88fdc10 mdir fixes by Rodney!
boisy
parents: 838
diff changeset
144 ldd M$Size,y size
54ebe88fdc10 mdir fixes by Rodney!
boisy
parents: 838
diff changeset
145 bsr out4HS
838
19ac91c8dbcf Changed option from e to -e, optimized slightly
boisy
parents: 200
diff changeset
146 tst <narrow
13
5a5574d54988 Touched up source comments, added mdir to Makefile
boisy
parents: 0
diff changeset
147 bne L0181
1277
54ebe88fdc10 mdir fixes by Rodney!
boisy
parents: 838
diff changeset
148 bsr outSP
54ebe88fdc10 mdir fixes by Rodney!
boisy
parents: 838
diff changeset
149 L0181 lda M$Type,y type/lang
54ebe88fdc10 mdir fixes by Rodney!
boisy
parents: 838
diff changeset
150 bsr out2HS
838
19ac91c8dbcf Changed option from e to -e, optimized slightly
boisy
parents: 200
diff changeset
151 tst <narrow
13
5a5574d54988 Touched up source comments, added mdir to Makefile
boisy
parents: 0
diff changeset
152 bne L018B
1277
54ebe88fdc10 mdir fixes by Rodney!
boisy
parents: 838
diff changeset
153 bsr outSP
54ebe88fdc10 mdir fixes by Rodney!
boisy
parents: 838
diff changeset
154 L018B lda M$Revs,y revision
54ebe88fdc10 mdir fixes by Rodney!
boisy
parents: 838
diff changeset
155 anda #RevsMask
54ebe88fdc10 mdir fixes by Rodney!
boisy
parents: 838
diff changeset
156 bsr out2HS
54ebe88fdc10 mdir fixes by Rodney!
boisy
parents: 838
diff changeset
157 ldb M$Revs,y attributes
54ebe88fdc10 mdir fixes by Rodney!
boisy
parents: 838
diff changeset
158 lda #'r
54ebe88fdc10 mdir fixes by Rodney!
boisy
parents: 838
diff changeset
159 bsr L01FE bit 7 (ReEnt)
838
19ac91c8dbcf Changed option from e to -e, optimized slightly
boisy
parents: 200
diff changeset
160 tst <narrow
13
5a5574d54988 Touched up source comments, added mdir to Makefile
boisy
parents: 0
diff changeset
161 bne L01A7
1277
54ebe88fdc10 mdir fixes by Rodney!
boisy
parents: 838
diff changeset
162 lda #'w bit 6 (ModProt:1=writable)
13
5a5574d54988 Touched up source comments, added mdir to Makefile
boisy
parents: 0
diff changeset
163 bsr L01FE
1277
54ebe88fdc10 mdir fixes by Rodney!
boisy
parents: 838
diff changeset
164 lda #'3 bit 5 (ModNat:6309 Native mode)
13
5a5574d54988 Touched up source comments, added mdir to Makefile
boisy
parents: 0
diff changeset
165 bsr L01FE
1277
54ebe88fdc10 mdir fixes by Rodney!
boisy
parents: 838
diff changeset
166 lda #'? bit 4 undefined
13
5a5574d54988 Touched up source comments, added mdir to Makefile
boisy
parents: 0
diff changeset
167 bsr L01FE
1277
54ebe88fdc10 mdir fixes by Rodney!
boisy
parents: 838
diff changeset
168 L01A7 bsr outSP
54ebe88fdc10 mdir fixes by Rodney!
boisy
parents: 838
diff changeset
169 bsr outSP
54ebe88fdc10 mdir fixes by Rodney!
boisy
parents: 838
diff changeset
170 lda MD$Link,x user count
54ebe88fdc10 mdir fixes by Rodney!
boisy
parents: 838
diff changeset
171 bsr out2HS
54ebe88fdc10 mdir fixes by Rodney!
boisy
parents: 838
diff changeset
172 ldd M$Name,y
54ebe88fdc10 mdir fixes by Rodney!
boisy
parents: 838
diff changeset
173 leay d,y module name
54ebe88fdc10 mdir fixes by Rodney!
boisy
parents: 838
diff changeset
174 bsr copySTR
54ebe88fdc10 mdir fixes by Rodney!
boisy
parents: 838
diff changeset
175 bsr writeBUF
54ebe88fdc10 mdir fixes by Rodney!
boisy
parents: 838
diff changeset
176 gotonxt leax MD$ESize,x
838
19ac91c8dbcf Changed option from e to -e, optimized slightly
boisy
parents: 200
diff changeset
177 L01B9 cmpx <mdend
13
5a5574d54988 Touched up source comments, added mdir to Makefile
boisy
parents: 0
diff changeset
178 bcs L0168
92
3f67d4e039f0 Some labels changed to relevant names
roug
parents: 15
diff changeset
179
838
19ac91c8dbcf Changed option from e to -e, optimized slightly
boisy
parents: 200
diff changeset
180 ExitOk clrb
19ac91c8dbcf Changed option from e to -e, optimized slightly
boisy
parents: 200
diff changeset
181 Exit os9 F$Exit
92
3f67d4e039f0 Some labels changed to relevant names
roug
parents: 15
diff changeset
182
1277
54ebe88fdc10 mdir fixes by Rodney!
boisy
parents: 838
diff changeset
183 out4HS inc <zflag supress leading zeros
54ebe88fdc10 mdir fixes by Rodney!
boisy
parents: 838
diff changeset
184 inc <zflag
54ebe88fdc10 mdir fixes by Rodney!
boisy
parents: 838
diff changeset
185 bsr Byt2Hex
54ebe88fdc10 mdir fixes by Rodney!
boisy
parents: 838
diff changeset
186 dec <zflag
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
187 tfr b,a
1277
54ebe88fdc10 mdir fixes by Rodney!
boisy
parents: 838
diff changeset
188 out2HS bsr Byt2Hex
54ebe88fdc10 mdir fixes by Rodney!
boisy
parents: 838
diff changeset
189 bra outSP
838
19ac91c8dbcf Changed option from e to -e, optimized slightly
boisy
parents: 200
diff changeset
190
1277
54ebe88fdc10 mdir fixes by Rodney!
boisy
parents: 838
diff changeset
191 Byt2Hex inc <zflag supress leading zero
54ebe88fdc10 mdir fixes by Rodney!
boisy
parents: 838
diff changeset
192 pshs a
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
193 lsra
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
194 lsra
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
195 lsra
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
196 lsra
13
5a5574d54988 Touched up source comments, added mdir to Makefile
boisy
parents: 0
diff changeset
197 bsr L01DB
1277
54ebe88fdc10 mdir fixes by Rodney!
boisy
parents: 838
diff changeset
198 puls a
54ebe88fdc10 mdir fixes by Rodney!
boisy
parents: 838
diff changeset
199 anda #$0F is this a zero?
54ebe88fdc10 mdir fixes by Rodney!
boisy
parents: 838
diff changeset
200 L01DB bne L01E8 no, print it
54ebe88fdc10 mdir fixes by Rodney!
boisy
parents: 838
diff changeset
201 tst <zflag still supressing zeros?
54ebe88fdc10 mdir fixes by Rodney!
boisy
parents: 838
diff changeset
202 bgt outZSP yes, count it and print space
54ebe88fdc10 mdir fixes by Rodney!
boisy
parents: 838
diff changeset
203 L01E8 clr <zflag nonzero, print all the rest
54ebe88fdc10 mdir fixes by Rodney!
boisy
parents: 838
diff changeset
204 adda #'0
92
3f67d4e039f0 Some labels changed to relevant names
roug
parents: 15
diff changeset
205 cmpa #'9
3f67d4e039f0 Some labels changed to relevant names
roug
parents: 15
diff changeset
206 bls ApndA
1277
54ebe88fdc10 mdir fixes by Rodney!
boisy
parents: 838
diff changeset
207 adda #$07 Make it A-F
92
3f67d4e039f0 Some labels changed to relevant names
roug
parents: 15
diff changeset
208 bra ApndA
1277
54ebe88fdc10 mdir fixes by Rodney!
boisy
parents: 838
diff changeset
209
54ebe88fdc10 mdir fixes by Rodney!
boisy
parents: 838
diff changeset
210 outZSP dec <zflag countdown to last digit
1747
d588589fc0e0 Fixed source to use symbolics for space, etc.
boisy
parents: 1325
diff changeset
211 outSP lda #C$SPAC append a space
92
3f67d4e039f0 Some labels changed to relevant names
roug
parents: 15
diff changeset
212 *
3f67d4e039f0 Some labels changed to relevant names
roug
parents: 15
diff changeset
213 * append a char (in reg a) to buffer
3f67d4e039f0 Some labels changed to relevant names
roug
parents: 15
diff changeset
214 *
3f67d4e039f0 Some labels changed to relevant names
roug
parents: 15
diff changeset
215 ApndA pshs x
3f67d4e039f0 Some labels changed to relevant names
roug
parents: 15
diff changeset
216 ldx <bufptr
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
217 sta ,x+
92
3f67d4e039f0 Some labels changed to relevant names
roug
parents: 15
diff changeset
218 stx <bufptr
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
219 puls pc,x
1277
54ebe88fdc10 mdir fixes by Rodney!
boisy
parents: 838
diff changeset
220 *
54ebe88fdc10 mdir fixes by Rodney!
boisy
parents: 838
diff changeset
221 * process attribute flag bit
54ebe88fdc10 mdir fixes by Rodney!
boisy
parents: 838
diff changeset
222 *
13
5a5574d54988 Touched up source comments, added mdir to Makefile
boisy
parents: 0
diff changeset
223 L01FE rolb
92
3f67d4e039f0 Some labels changed to relevant names
roug
parents: 15
diff changeset
224 bcs ApndA
3f67d4e039f0 Some labels changed to relevant names
roug
parents: 15
diff changeset
225 lda #'.
3f67d4e039f0 Some labels changed to relevant names
roug
parents: 15
diff changeset
226 bra ApndA
1277
54ebe88fdc10 mdir fixes by Rodney!
boisy
parents: 838
diff changeset
227 *
54ebe88fdc10 mdir fixes by Rodney!
boisy
parents: 838
diff changeset
228 * Copy an FCS string to buffer
54ebe88fdc10 mdir fixes by Rodney!
boisy
parents: 838
diff changeset
229 *
54ebe88fdc10 mdir fixes by Rodney!
boisy
parents: 838
diff changeset
230 copySTR lda ,y
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
231 anda #$7F
92
3f67d4e039f0 Some labels changed to relevant names
roug
parents: 15
diff changeset
232 bsr ApndA
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
233 lda ,y+
1277
54ebe88fdc10 mdir fixes by Rodney!
boisy
parents: 838
diff changeset
234 bpl copySTR
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
235 rts
92
3f67d4e039f0 Some labels changed to relevant names
roug
parents: 15
diff changeset
236 *
3f67d4e039f0 Some labels changed to relevant names
roug
parents: 15
diff changeset
237 * Append a CR to buffer and write it
3f67d4e039f0 Some labels changed to relevant names
roug
parents: 15
diff changeset
238 *
1277
54ebe88fdc10 mdir fixes by Rodney!
boisy
parents: 838
diff changeset
239 writeBUF pshs y,x,a
92
3f67d4e039f0 Some labels changed to relevant names
roug
parents: 15
diff changeset
240 lda #C$CR
3f67d4e039f0 Some labels changed to relevant names
roug
parents: 15
diff changeset
241 bsr ApndA
3f67d4e039f0 Some labels changed to relevant names
roug
parents: 15
diff changeset
242 leax <buffer,u
1277
54ebe88fdc10 mdir fixes by Rodney!
boisy
parents: 838
diff changeset
243 stx <bufptr
13
5a5574d54988 Touched up source comments, added mdir to Makefile
boisy
parents: 0
diff changeset
244 ldy #80
92
3f67d4e039f0 Some labels changed to relevant names
roug
parents: 15
diff changeset
245 lda #stdout
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
246 os9 I$WritLn
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
247 puls pc,y,x,a
92
3f67d4e039f0 Some labels changed to relevant names
roug
parents: 15
diff changeset
248
1277
54ebe88fdc10 mdir fixes by Rodney!
boisy
parents: 838
diff changeset
249 * Write the time to the buffer as HH:MM:SS
838
19ac91c8dbcf Changed option from e to -e, optimized slightly
boisy
parents: 200
diff changeset
250 L0224 bsr Byt2ASC
19ac91c8dbcf Changed option from e to -e, optimized slightly
boisy
parents: 200
diff changeset
251 bsr Colon
19ac91c8dbcf Changed option from e to -e, optimized slightly
boisy
parents: 200
diff changeset
252 Colon lda #':
92
3f67d4e039f0 Some labels changed to relevant names
roug
parents: 15
diff changeset
253 bsr ApndA
838
19ac91c8dbcf Changed option from e to -e, optimized slightly
boisy
parents: 200
diff changeset
254 Byt2ASC ldb ,x+
1277
54ebe88fdc10 mdir fixes by Rodney!
boisy
parents: 838
diff changeset
255 Hundreds subb #100
838
19ac91c8dbcf Changed option from e to -e, optimized slightly
boisy
parents: 200
diff changeset
256 bcc Hundreds
1277
54ebe88fdc10 mdir fixes by Rodney!
boisy
parents: 838
diff changeset
257 * code to print 100's digit removed - max timefield value is 59
54ebe88fdc10 mdir fixes by Rodney!
boisy
parents: 838
diff changeset
258 Tens lda #'9+1
54ebe88fdc10 mdir fixes by Rodney!
boisy
parents: 838
diff changeset
259 TensLoop deca
838
19ac91c8dbcf Changed option from e to -e, optimized slightly
boisy
parents: 200
diff changeset
260 addb #10
19ac91c8dbcf Changed option from e to -e, optimized slightly
boisy
parents: 200
diff changeset
261 bcc TensLoop
92
3f67d4e039f0 Some labels changed to relevant names
roug
parents: 15
diff changeset
262 bsr ApndA
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
263 tfr b,a
92
3f67d4e039f0 Some labels changed to relevant names
roug
parents: 15
diff changeset
264 adda #'0
3f67d4e039f0 Some labels changed to relevant names
roug
parents: 15
diff changeset
265 bra ApndA
13
5a5574d54988 Touched up source comments, added mdir to Makefile
boisy
parents: 0
diff changeset
266
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
267 emod
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
268 eom equ *
13
5a5574d54988 Touched up source comments, added mdir to Makefile
boisy
parents: 0
diff changeset
269 end