annotate level2/cmds/dirm.asm @ 977:dd89c62ea2ca

os9.asm and oscode.asm now use BTStart symbolic from systype
author boisy
date Tue, 04 Feb 2003 19:43:52 +0000
parents 835a015e3f3b
children bf6f854a4299
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
967
835a015e3f3b Added to CMDS
boisy
parents:
diff changeset
1 ********************************************************************
835a015e3f3b Added to CMDS
boisy
parents:
diff changeset
2 * DirM - Show module directory
835a015e3f3b Added to CMDS
boisy
parents:
diff changeset
3 *
835a015e3f3b Added to CMDS
boisy
parents:
diff changeset
4 * $Id$
835a015e3f3b Added to CMDS
boisy
parents:
diff changeset
5 *
835a015e3f3b Added to CMDS
boisy
parents:
diff changeset
6 * Changes:
835a015e3f3b Added to CMDS
boisy
parents:
diff changeset
7 *
835a015e3f3b Added to CMDS
boisy
parents:
diff changeset
8 * Added internal print buffer, so an I$Write call is not performed for every
835a015e3f3b Added to CMDS
boisy
parents:
diff changeset
9 * byte printed out. Halves printout time.
835a015e3f3b Added to CMDS
boisy
parents:
diff changeset
10 *
835a015e3f3b Added to CMDS
boisy
parents:
diff changeset
11 * Added SS.ScSiz check, and goes to 32-column output if display is 40 columns
835a015e3f3b Added to CMDS
boisy
parents:
diff changeset
12 * or less.
835a015e3f3b Added to CMDS
boisy
parents:
diff changeset
13 *
835a015e3f3b Added to CMDS
boisy
parents:
diff changeset
14 * Ed. Comments Who YY/MM/DD
835a015e3f3b Added to CMDS
boisy
parents:
diff changeset
15 * ------------------------------------------------------------------
835a015e3f3b Added to CMDS
boisy
parents:
diff changeset
16 * ? Disassembled at 8:18:38 AD 94/11/10
835a015e3f3b Added to CMDS
boisy
parents:
diff changeset
17 * 5 Added internal print buffer, so an I$Write AD ??/??/??
835a015e3f3b Added to CMDS
boisy
parents:
diff changeset
18 * call is not performed for every byte printed
835a015e3f3b Added to CMDS
boisy
parents:
diff changeset
19 * out. Halves printout time. Added SS.ScSiz
835a015e3f3b Added to CMDS
boisy
parents:
diff changeset
20 * check, and goes to 32-column output if display
835a015e3f3b Added to CMDS
boisy
parents:
diff changeset
21 * is 40 columns or less.
835a015e3f3b Added to CMDS
boisy
parents:
diff changeset
22
835a015e3f3b Added to CMDS
boisy
parents:
diff changeset
23 nam DirM
835a015e3f3b Added to CMDS
boisy
parents:
diff changeset
24 ttl Show module directory
835a015e3f3b Added to CMDS
boisy
parents:
diff changeset
25
835a015e3f3b Added to CMDS
boisy
parents:
diff changeset
26 ifp1
835a015e3f3b Added to CMDS
boisy
parents:
diff changeset
27 use defsfile
835a015e3f3b Added to CMDS
boisy
parents:
diff changeset
28 endc
835a015e3f3b Added to CMDS
boisy
parents:
diff changeset
29
835a015e3f3b Added to CMDS
boisy
parents:
diff changeset
30 tylg set Prgrm+Objct
835a015e3f3b Added to CMDS
boisy
parents:
diff changeset
31 atrv set ReEnt+rev
835a015e3f3b Added to CMDS
boisy
parents:
diff changeset
32 rev set $01
835a015e3f3b Added to CMDS
boisy
parents:
diff changeset
33 edition set 5
835a015e3f3b Added to CMDS
boisy
parents:
diff changeset
34
835a015e3f3b Added to CMDS
boisy
parents:
diff changeset
35 Bound equ 40 width at which change is made to 32-col printing
835a015e3f3b Added to CMDS
boisy
parents:
diff changeset
36
835a015e3f3b Added to CMDS
boisy
parents:
diff changeset
37
835a015e3f3b Added to CMDS
boisy
parents:
diff changeset
38 mod eom,name,tylg,atrv,start,size
835a015e3f3b Added to CMDS
boisy
parents:
diff changeset
39
835a015e3f3b Added to CMDS
boisy
parents:
diff changeset
40 MD.DAT rmb 2
835a015e3f3b Added to CMDS
boisy
parents:
diff changeset
41 MD.Crnt rmb 2
835a015e3f3b Added to CMDS
boisy
parents:
diff changeset
42 MD.Strt rmb 2
835a015e3f3b Added to CMDS
boisy
parents:
diff changeset
43 MD.End rmb 2
835a015e3f3b Added to CMDS
boisy
parents:
diff changeset
44 MD.MPDAT rmb 5
835a015e3f3b Added to CMDS
boisy
parents:
diff changeset
45 PntCnt rmb 1
835a015e3f3b Added to CMDS
boisy
parents:
diff changeset
46
835a015e3f3b Added to CMDS
boisy
parents:
diff changeset
47 *Single rmb 1 single entry/line?
835a015e3f3b Added to CMDS
boisy
parents:
diff changeset
48 Width rmb 1 width of the output device
835a015e3f3b Added to CMDS
boisy
parents:
diff changeset
49
835a015e3f3b Added to CMDS
boisy
parents:
diff changeset
50 PBuffer rmb 31 internal print buffer
835a015e3f3b Added to CMDS
boisy
parents:
diff changeset
51 Buffer rmb 40 room for a name buffer
835a015e3f3b Added to CMDS
boisy
parents:
diff changeset
52 MD.Data rmb 2048 size of the module directory
835a015e3f3b Added to CMDS
boisy
parents:
diff changeset
53 rmb 200 for the stack
835a015e3f3b Added to CMDS
boisy
parents:
diff changeset
54 size equ .
835a015e3f3b Added to CMDS
boisy
parents:
diff changeset
55 name equ *
835a015e3f3b Added to CMDS
boisy
parents:
diff changeset
56 fcs /DirM/
835a015e3f3b Added to CMDS
boisy
parents:
diff changeset
57 fcb edition
835a015e3f3b Added to CMDS
boisy
parents:
diff changeset
58
835a015e3f3b Added to CMDS
boisy
parents:
diff changeset
59 H2 fcc / Bk Ofst Size Ty At Link Name/
835a015e3f3b Added to CMDS
boisy
parents:
diff changeset
60 fcb C$CR
835a015e3f3b Added to CMDS
boisy
parents:
diff changeset
61 H3 fcc / -- ---- ---- -- -- ---- -----/
835a015e3f3b Added to CMDS
boisy
parents:
diff changeset
62 H1 fcb C$CR
835a015e3f3b Added to CMDS
boisy
parents:
diff changeset
63
835a015e3f3b Added to CMDS
boisy
parents:
diff changeset
64 * Believe it or not, all this internal crap is still smaller than having
835a015e3f3b Added to CMDS
boisy
parents:
diff changeset
65 * a different version of the header for 32/80 columns.
835a015e3f3b Added to CMDS
boisy
parents:
diff changeset
66 Dump ldu #PBuffer output print buffer
835a015e3f3b Added to CMDS
boisy
parents:
diff changeset
67 lda ,x+ get first character
835a015e3f3b Added to CMDS
boisy
parents:
diff changeset
68 sta ,u+ move it over
835a015e3f3b Added to CMDS
boisy
parents:
diff changeset
69 ldb <Width get the width
835a015e3f3b Added to CMDS
boisy
parents:
diff changeset
70
835a015e3f3b Added to CMDS
boisy
parents:
diff changeset
71 D.01 cmpa #C$CR CR?
835a015e3f3b Added to CMDS
boisy
parents:
diff changeset
72 beq D.Print yup, dump it out
835a015e3f3b Added to CMDS
boisy
parents:
diff changeset
73
835a015e3f3b Added to CMDS
boisy
parents:
diff changeset
74 lda ,x+ grab a character
835a015e3f3b Added to CMDS
boisy
parents:
diff changeset
75 sta ,u+ save it
835a015e3f3b Added to CMDS
boisy
parents:
diff changeset
76 cmpa #C$SPAC was it a space?
835a015e3f3b Added to CMDS
boisy
parents:
diff changeset
77 bne D.01 no, just save it
835a015e3f3b Added to CMDS
boisy
parents:
diff changeset
78
835a015e3f3b Added to CMDS
boisy
parents:
diff changeset
79 cmpb #Bound 40-column screen?
835a015e3f3b Added to CMDS
boisy
parents:
diff changeset
80 bls D.01 yes, don't add the space
835a015e3f3b Added to CMDS
boisy
parents:
diff changeset
81 sta ,u+ if a space, save another copy of it
835a015e3f3b Added to CMDS
boisy
parents:
diff changeset
82 bra D.01
835a015e3f3b Added to CMDS
boisy
parents:
diff changeset
83
835a015e3f3b Added to CMDS
boisy
parents:
diff changeset
84 D.Print lda #$01 to STDOUT
835a015e3f3b Added to CMDS
boisy
parents:
diff changeset
85 ldx #PBuffer
835a015e3f3b Added to CMDS
boisy
parents:
diff changeset
86 ldy #50 max. size of data to print
835a015e3f3b Added to CMDS
boisy
parents:
diff changeset
87 OS9 I$WritLn dump it out
835a015e3f3b Added to CMDS
boisy
parents:
diff changeset
88 bcs Exit
835a015e3f3b Added to CMDS
boisy
parents:
diff changeset
89 rts
835a015e3f3b Added to CMDS
boisy
parents:
diff changeset
90
835a015e3f3b Added to CMDS
boisy
parents:
diff changeset
91 start equ *
835a015e3f3b Added to CMDS
boisy
parents:
diff changeset
92 stu <MD.DAT u=$0000 always on startup in OS-9 LII
835a015e3f3b Added to CMDS
boisy
parents:
diff changeset
93 ldd #$0100+SS.ScSiz stdout, get screen size
835a015e3f3b Added to CMDS
boisy
parents:
diff changeset
94 OS9 I$GetStt
835a015e3f3b Added to CMDS
boisy
parents:
diff changeset
95 bcs s.01
835a015e3f3b Added to CMDS
boisy
parents:
diff changeset
96 tfr x,d
835a015e3f3b Added to CMDS
boisy
parents:
diff changeset
97 bra s.02 save actual screen size
835a015e3f3b Added to CMDS
boisy
parents:
diff changeset
98
835a015e3f3b Added to CMDS
boisy
parents:
diff changeset
99 s.01 cmpb #E$UnkSvc
835a015e3f3b Added to CMDS
boisy
parents:
diff changeset
100 bne Exit
835a015e3f3b Added to CMDS
boisy
parents:
diff changeset
101 ldb #80 default to 80 columns if error
835a015e3f3b Added to CMDS
boisy
parents:
diff changeset
102 s.02 stb <Width
835a015e3f3b Added to CMDS
boisy
parents:
diff changeset
103
835a015e3f3b Added to CMDS
boisy
parents:
diff changeset
104 leax <H1,pcr print out initial CR
835a015e3f3b Added to CMDS
boisy
parents:
diff changeset
105 bsr Dump
835a015e3f3b Added to CMDS
boisy
parents:
diff changeset
106 leax >H2,pcr header of names
835a015e3f3b Added to CMDS
boisy
parents:
diff changeset
107 bsr Dump
835a015e3f3b Added to CMDS
boisy
parents:
diff changeset
108 leax <H3,pcr and hyphens
835a015e3f3b Added to CMDS
boisy
parents:
diff changeset
109 bsr Dump
835a015e3f3b Added to CMDS
boisy
parents:
diff changeset
110
835a015e3f3b Added to CMDS
boisy
parents:
diff changeset
111 ldx #MD.Data
835a015e3f3b Added to CMDS
boisy
parents:
diff changeset
112 os9 F$GModDr
835a015e3f3b Added to CMDS
boisy
parents:
diff changeset
113 bcs Exit
835a015e3f3b Added to CMDS
boisy
parents:
diff changeset
114 stu <MD.Strt save start address of system module dir
835a015e3f3b Added to CMDS
boisy
parents:
diff changeset
115
835a015e3f3b Added to CMDS
boisy
parents:
diff changeset
116 sty <MD.End save end of the module directory
835a015e3f3b Added to CMDS
boisy
parents:
diff changeset
117 bra L00B5
835a015e3f3b Added to CMDS
boisy
parents:
diff changeset
118
835a015e3f3b Added to CMDS
boisy
parents:
diff changeset
119 ClnExit clrb
835a015e3f3b Added to CMDS
boisy
parents:
diff changeset
120 Exit os9 F$Exit
835a015e3f3b Added to CMDS
boisy
parents:
diff changeset
121
835a015e3f3b Added to CMDS
boisy
parents:
diff changeset
122 L00AD ldx <MD.Crnt
835a015e3f3b Added to CMDS
boisy
parents:
diff changeset
123 leax MD$ESIZE,x go to the next entry
835a015e3f3b Added to CMDS
boisy
parents:
diff changeset
124 cmpx <MD.End
835a015e3f3b Added to CMDS
boisy
parents:
diff changeset
125 bcc ClnExit
835a015e3f3b Added to CMDS
boisy
parents:
diff changeset
126
835a015e3f3b Added to CMDS
boisy
parents:
diff changeset
127 L00B5 stx <MD.Crnt
835a015e3f3b Added to CMDS
boisy
parents:
diff changeset
128 ldu #PBuffer temporary print buffer
835a015e3f3b Added to CMDS
boisy
parents:
diff changeset
129 ldd MD$MPDAT,x get module DAT image
835a015e3f3b Added to CMDS
boisy
parents:
diff changeset
130 beq L00AD if zero, skip this entry
835a015e3f3b Added to CMDS
boisy
parents:
diff changeset
131 pshs d
835a015e3f3b Added to CMDS
boisy
parents:
diff changeset
132 cmpd <MD.DAT
835a015e3f3b Added to CMDS
boisy
parents:
diff changeset
133 beq L00CD
835a015e3f3b Added to CMDS
boisy
parents:
diff changeset
134 std <MD.DAT save the current DAT image
835a015e3f3b Added to CMDS
boisy
parents:
diff changeset
135 lda #'- start of this block
835a015e3f3b Added to CMDS
boisy
parents:
diff changeset
136 fcb $8C skip 2 bytes
835a015e3f3b Added to CMDS
boisy
parents:
diff changeset
137
835a015e3f3b Added to CMDS
boisy
parents:
diff changeset
138 L00CD lda #C$SPAC space
835a015e3f3b Added to CMDS
boisy
parents:
diff changeset
139 sta ,u+ store it in the data buffer
835a015e3f3b Added to CMDS
boisy
parents:
diff changeset
140 L00D0 puls d restore current DAT image
835a015e3f3b Added to CMDS
boisy
parents:
diff changeset
141 subd <MD.Strt take out start of the block
835a015e3f3b Added to CMDS
boisy
parents:
diff changeset
142 ldy #MD.Data point to module directory data
835a015e3f3b Added to CMDS
boisy
parents:
diff changeset
143 leay d,y to the DAT image within it
835a015e3f3b Added to CMDS
boisy
parents:
diff changeset
144 tfr y,d
835a015e3f3b Added to CMDS
boisy
parents:
diff changeset
145 std <MD.MPDAT save pointer to DAT
835a015e3f3b Added to CMDS
boisy
parents:
diff changeset
146 lda MD$MPtr,x module pointer
835a015e3f3b Added to CMDS
boisy
parents:
diff changeset
147 lsra
835a015e3f3b Added to CMDS
boisy
parents:
diff changeset
148 lsra
835a015e3f3b Added to CMDS
boisy
parents:
diff changeset
149 lsra
835a015e3f3b Added to CMDS
boisy
parents:
diff changeset
150 lsra turn address into block offset
835a015e3f3b Added to CMDS
boisy
parents:
diff changeset
151 anda #$0E keep low bits only
835a015e3f3b Added to CMDS
boisy
parents:
diff changeset
152 inca DAT image is (junk),(block)
835a015e3f3b Added to CMDS
boisy
parents:
diff changeset
153 lda a,y get the starting block number
835a015e3f3b Added to CMDS
boisy
parents:
diff changeset
154 bsr L0165 dump it out
835a015e3f3b Added to CMDS
boisy
parents:
diff changeset
155 ldd MD$MPtr,x get real pointer
835a015e3f3b Added to CMDS
boisy
parents:
diff changeset
156 anda #$1F get offset inside block
835a015e3f3b Added to CMDS
boisy
parents:
diff changeset
157 bsr L0159 print it out
835a015e3f3b Added to CMDS
boisy
parents:
diff changeset
158 ldx MD$MPtr,x and get pointer again
835a015e3f3b Added to CMDS
boisy
parents:
diff changeset
159
835a015e3f3b Added to CMDS
boisy
parents:
diff changeset
160 pshs u save print buffer pointer
835a015e3f3b Added to CMDS
boisy
parents:
diff changeset
161 ldu #Buffer to a name buffer
835a015e3f3b Added to CMDS
boisy
parents:
diff changeset
162 ldy #$000A move first 10 bytes of the module?
835a015e3f3b Added to CMDS
boisy
parents:
diff changeset
163 ldd <MD.MPDAT
835a015e3f3b Added to CMDS
boisy
parents:
diff changeset
164 os9 F$CpyMem copy it over
835a015e3f3b Added to CMDS
boisy
parents:
diff changeset
165 puls u restore print buffer ptr
835a015e3f3b Added to CMDS
boisy
parents:
diff changeset
166 bcs Exit
835a015e3f3b Added to CMDS
boisy
parents:
diff changeset
167
835a015e3f3b Added to CMDS
boisy
parents:
diff changeset
168 ldd <Buffer+M$Size
835a015e3f3b Added to CMDS
boisy
parents:
diff changeset
169 bsr L0159 print out the size of the module
835a015e3f3b Added to CMDS
boisy
parents:
diff changeset
170 lda <Buffer+M$Type
835a015e3f3b Added to CMDS
boisy
parents:
diff changeset
171 bsr L0165 print out the Ty/Lg
835a015e3f3b Added to CMDS
boisy
parents:
diff changeset
172 lda <Buffer+M$Revs
835a015e3f3b Added to CMDS
boisy
parents:
diff changeset
173 bsr L0165 print out At/Rv
835a015e3f3b Added to CMDS
boisy
parents:
diff changeset
174 ldx <MD.Crnt get current module pointer
835a015e3f3b Added to CMDS
boisy
parents:
diff changeset
175 ldd MD$Link,x link count
835a015e3f3b Added to CMDS
boisy
parents:
diff changeset
176 bsr L0159
835a015e3f3b Added to CMDS
boisy
parents:
diff changeset
177 ldd <Buffer+M$Name
835a015e3f3b Added to CMDS
boisy
parents:
diff changeset
178 ldx <MD.Crnt
835a015e3f3b Added to CMDS
boisy
parents:
diff changeset
179 ldx MD$MPtr,x start address of the module
835a015e3f3b Added to CMDS
boisy
parents:
diff changeset
180 leax d,x point to the name
835a015e3f3b Added to CMDS
boisy
parents:
diff changeset
181
835a015e3f3b Added to CMDS
boisy
parents:
diff changeset
182 pshs u save print buffer ptr
835a015e3f3b Added to CMDS
boisy
parents:
diff changeset
183 ldu #Buffer to the buffer again
835a015e3f3b Added to CMDS
boisy
parents:
diff changeset
184 lda <Width
835a015e3f3b Added to CMDS
boisy
parents:
diff changeset
185 cmpa #Bound
835a015e3f3b Added to CMDS
boisy
parents:
diff changeset
186 bhi n.01
835a015e3f3b Added to CMDS
boisy
parents:
diff changeset
187 leau -6,u discount 6 spaces
835a015e3f3b Added to CMDS
boisy
parents:
diff changeset
188
835a015e3f3b Added to CMDS
boisy
parents:
diff changeset
189 n.01 ldd <MD.MPDAT
835a015e3f3b Added to CMDS
boisy
parents:
diff changeset
190 ldy #40 copy over 40 bytes of the name
835a015e3f3b Added to CMDS
boisy
parents:
diff changeset
191 os9 F$CpyMem
835a015e3f3b Added to CMDS
boisy
parents:
diff changeset
192 tfr u,x save copy of the start of the buffer
835a015e3f3b Added to CMDS
boisy
parents:
diff changeset
193 puls u restore print buffer ptr
835a015e3f3b Added to CMDS
boisy
parents:
diff changeset
194 lbcs Exit
835a015e3f3b Added to CMDS
boisy
parents:
diff changeset
195
835a015e3f3b Added to CMDS
boisy
parents:
diff changeset
196 ldb #39 maximum number of characters to check
835a015e3f3b Added to CMDS
boisy
parents:
diff changeset
197 L013F lda ,x+ get a character
835a015e3f3b Added to CMDS
boisy
parents:
diff changeset
198 bpl L013F if it's OK
835a015e3f3b Added to CMDS
boisy
parents:
diff changeset
199 anda #$7F force it to be printable
835a015e3f3b Added to CMDS
boisy
parents:
diff changeset
200 sta -1,x save it again
835a015e3f3b Added to CMDS
boisy
parents:
diff changeset
201 lda #C$CR drop a CR after the last character of the name
835a015e3f3b Added to CMDS
boisy
parents:
diff changeset
202
835a015e3f3b Added to CMDS
boisy
parents:
diff changeset
203 sta ,x save it
835a015e3f3b Added to CMDS
boisy
parents:
diff changeset
204 ldx #PBuffer point to the start of the buffer
835a015e3f3b Added to CMDS
boisy
parents:
diff changeset
205 ldy #64 64 characters
835a015e3f3b Added to CMDS
boisy
parents:
diff changeset
206 lda #$01
835a015e3f3b Added to CMDS
boisy
parents:
diff changeset
207 os9 I$WritLn print out the name
835a015e3f3b Added to CMDS
boisy
parents:
diff changeset
208 lbra L00AD start all over again
835a015e3f3b Added to CMDS
boisy
parents:
diff changeset
209
835a015e3f3b Added to CMDS
boisy
parents:
diff changeset
210 * Print out a 2-byte hex number in D
835a015e3f3b Added to CMDS
boisy
parents:
diff changeset
211 L0159 pshs b save low order character
835a015e3f3b Added to CMDS
boisy
parents:
diff changeset
212 ldb #3 3 digits to print out
835a015e3f3b Added to CMDS
boisy
parents:
diff changeset
213 bsr L0171 print out A
835a015e3f3b Added to CMDS
boisy
parents:
diff changeset
214 puls a restore low byte
835a015e3f3b Added to CMDS
boisy
parents:
diff changeset
215 bsr L0173 print it, too
835a015e3f3b Added to CMDS
boisy
parents:
diff changeset
216 bra L0167 and dump out 2 spaces
835a015e3f3b Added to CMDS
boisy
parents:
diff changeset
217
835a015e3f3b Added to CMDS
boisy
parents:
diff changeset
218 * print out a 1-digit hex number in A
835a015e3f3b Added to CMDS
boisy
parents:
diff changeset
219 L0165 bsr L016F
835a015e3f3b Added to CMDS
boisy
parents:
diff changeset
220 L0167 lda <Width check the width
835a015e3f3b Added to CMDS
boisy
parents:
diff changeset
221 cmpa #Bound
835a015e3f3b Added to CMDS
boisy
parents:
diff changeset
222 bls L016B if 40 columns or smaller, don't print extra space
835a015e3f3b Added to CMDS
boisy
parents:
diff changeset
223 lda #C$SPAC space
835a015e3f3b Added to CMDS
boisy
parents:
diff changeset
224 sta ,u+
835a015e3f3b Added to CMDS
boisy
parents:
diff changeset
225 L016B lda #C$SPAC and another space
835a015e3f3b Added to CMDS
boisy
parents:
diff changeset
226 sta ,u+
835a015e3f3b Added to CMDS
boisy
parents:
diff changeset
227 rts
835a015e3f3b Added to CMDS
boisy
parents:
diff changeset
228
835a015e3f3b Added to CMDS
boisy
parents:
diff changeset
229 L016F ldb #$01
835a015e3f3b Added to CMDS
boisy
parents:
diff changeset
230 L0171 stb <PntCnt
835a015e3f3b Added to CMDS
boisy
parents:
diff changeset
231 L0173 tfr a,b save a copy of the number in B
835a015e3f3b Added to CMDS
boisy
parents:
diff changeset
232 lsra
835a015e3f3b Added to CMDS
boisy
parents:
diff changeset
233 lsra
835a015e3f3b Added to CMDS
boisy
parents:
diff changeset
234 lsra
835a015e3f3b Added to CMDS
boisy
parents:
diff changeset
235 lsra move high nibble into the lower nibble
835a015e3f3b Added to CMDS
boisy
parents:
diff changeset
236 bsr L017D print out lower nibble of A as hex number
835a015e3f3b Added to CMDS
boisy
parents:
diff changeset
237 tfr b,a restore lower nibble
835a015e3f3b Added to CMDS
boisy
parents:
diff changeset
238
835a015e3f3b Added to CMDS
boisy
parents:
diff changeset
239 L017D anda #$0F make 0-15
835a015e3f3b Added to CMDS
boisy
parents:
diff changeset
240 beq L019C if zero, skip printing it out
835a015e3f3b Added to CMDS
boisy
parents:
diff changeset
241 clr <PntCnt
835a015e3f3b Added to CMDS
boisy
parents:
diff changeset
242 cmpa #$0A higher than A?
835a015e3f3b Added to CMDS
boisy
parents:
diff changeset
243 bcs L0189 no, add in ascii zero
835a015e3f3b Added to CMDS
boisy
parents:
diff changeset
244 adda #$07 yes, add difference between 9 and A
835a015e3f3b Added to CMDS
boisy
parents:
diff changeset
245 L0189 adda #'0 turn it into an ascii number
835a015e3f3b Added to CMDS
boisy
parents:
diff changeset
246
835a015e3f3b Added to CMDS
boisy
parents:
diff changeset
247 Print sta ,u+ save the character in the buffer
835a015e3f3b Added to CMDS
boisy
parents:
diff changeset
248 rts
835a015e3f3b Added to CMDS
boisy
parents:
diff changeset
249
835a015e3f3b Added to CMDS
boisy
parents:
diff changeset
250 L019C dec <PntCnt count down of number of characters to print
835a015e3f3b Added to CMDS
boisy
parents:
diff changeset
251 bmi L0189 if last one, print out a zero
835a015e3f3b Added to CMDS
boisy
parents:
diff changeset
252 bra L016B otherwise print out a space
835a015e3f3b Added to CMDS
boisy
parents:
diff changeset
253
835a015e3f3b Added to CMDS
boisy
parents:
diff changeset
254 emod
835a015e3f3b Added to CMDS
boisy
parents:
diff changeset
255 eom equ *
835a015e3f3b Added to CMDS
boisy
parents:
diff changeset
256 end