Mercurial > hg > Members > kono > nitros9-code
annotate level1/cmds/xmode.asm @ 1325:84ea83668304
Redid comments, reset all rev nibbles that weren't explictly set to 0
author | boisy |
---|---|
date | Thu, 04 Sep 2003 23:06:16 +0000 |
parents | 64a0273a846a |
children | 22c82cfcb1f5 |
rev | line source |
---|---|
963 | 1 ******************************************************************** |
2 * EXMode - Extended SCF device descriptor utility | |
3 * | |
4 * $Id$ | |
5 * | |
1325
84ea83668304
Redid comments, reset all rev nibbles that weren't explictly set to 0
boisy
parents:
1264
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:
1264
diff
changeset
|
7 * Comment |
963 | 8 * ------------------------------------------------------------------ |
1325
84ea83668304
Redid comments, reset all rev nibbles that weren't explictly set to 0
boisy
parents:
1264
diff
changeset
|
9 * 1 1989/06/21 Bruce Isted |
84ea83668304
Redid comments, reset all rev nibbles that weren't explictly set to 0
boisy
parents:
1264
diff
changeset
|
10 * Released to public domain. |
963 | 11 |
12 nam EXMode | |
13 ttl Extended SCF device descriptor utility | |
14 | |
15 ifp1 | |
16 use defsfile | |
17 endc | |
18 | |
19 BuffSize equ 10 max. CHAR string length | |
20 Edtn equ 1 | |
21 MaxSize equ $80 maximum module size | |
22 NameSize equ 4 maximum module name length | |
1325
84ea83668304
Redid comments, reset all rev nibbles that weren't explictly set to 0
boisy
parents:
1264
diff
changeset
|
23 rev equ 0 |
963 | 24 |
25 org 0 | |
26 Count rmb 1 number of option bytes | |
27 DataPtr rmb 2 current option ptr | |
28 HexIn rmb 2 2 byte hex number | |
29 ModAddr rmb 2 module address | |
30 ModSize rmb 2 module size | |
31 OptEnd rmb 2 option table end offset | |
32 ParmPtr rmb 2 next name DataPtr | |
33 PathNmbr rmb 1 file path | |
34 TxtPtr rmb 2 option name ptr | |
35 Buffer rmb BuffSize miscellaneous output buffer | |
36 ModBuff rmb MaxSize module work copy buffer | |
37 stack rmb $0200 stack and parameter space | |
38 MemSize equ . | |
39 | |
1325
84ea83668304
Redid comments, reset all rev nibbles that weren't explictly set to 0
boisy
parents:
1264
diff
changeset
|
40 mod Size,Name,Prgrm+Objct,ReEnt+rev,Entry,MemSize |
963 | 41 |
42 Name fcs "EXMode" | |
43 fcb Edtn edition number | |
44 | |
45 OptTable | |
46 fcc " nam" option name | |
47 fcb Sign+M$Name,NameSize offset to string offset & max. byte count to change | |
48 fcc " mgr" | |
49 fcb Sign+M$FMgr,0 offset to string offset & no changes allowed | |
50 fcc " ddr" | |
51 fcb Sign+M$PDev,0 | |
52 fcc " hpn" | |
53 fcb M$Port,1 option offset & byte count | |
54 fcc " hpa" | |
55 fcb M$Port+1,2 | |
56 fcc " upc" | |
57 fcb IT.UPC,1 | |
58 fcc " bso" | |
59 fcb IT.BSO,1 | |
60 fcc " dlo" | |
61 fcb IT.DLO,1 | |
62 fcc " eko" | |
63 fcb IT.EKO,1 | |
64 fcc " alf" | |
65 fcb IT.ALF,1 | |
66 fcc " nul" | |
67 fcb IT.NUL,1 | |
68 fcc " pau" | |
69 fcb IT.PAU,1 | |
70 fcc " pag" | |
71 fcb IT.PAG,1 | |
72 fcc " bsp" | |
73 fcb IT.BSP,1 | |
74 fcc " del" | |
75 fcb IT.DEL,1 | |
76 fcc " eor" | |
77 fcb IT.EOR,1 | |
78 fcc " eof" | |
79 fcb IT.EOF,1 | |
80 fcc " rpr" | |
81 fcb IT.RPR,1 | |
82 fcc " dup" | |
83 fcb IT.DUP,1 | |
84 fcc " psc" | |
85 fcb IT.PSC,1 | |
86 fcc " int" | |
87 fcb IT.INT,1 | |
88 fcc " qut" | |
89 fcb IT.QUT,1 | |
90 fcc " bse" | |
91 fcb IT.BSE,1 | |
92 fcc " ovf" | |
93 fcb IT.OVF,1 | |
94 fcc " par" | |
95 fcb IT.PAR,1 | |
96 fcc " bau" | |
97 fcb IT.BAU,1 | |
98 fcc " xon" | |
99 fcb IT.XON,1 | |
100 fcc " xof" | |
101 fcb IT.XOFF,1 | |
102 fcc " col" | |
103 fcb IT.COL,1 | |
104 fcc " row" | |
105 fcb IT.ROW,1 | |
106 IFGT Level-1 | |
107 fcc " xtp" | |
108 fcb IT.XTYP,1 | |
109 fcc " wnd" | |
110 fcb IT.WND,1 | |
111 fcc " val" | |
112 fcb IT.VAL,1 | |
113 fcc " sty" | |
114 fcb IT.STY,1 | |
115 fcc " cpx" | |
116 fcb IT.CPX,1 | |
117 fcc " cpy" | |
118 fcb IT.CPY,1 | |
119 fcc " fgc" | |
120 fcb IT.FGC,1 | |
121 fcc " bgc" | |
122 fcb IT.BGC,1 | |
123 fcc " bdc" | |
124 fcb IT.BDC,1 | |
125 ENDC | |
126 TablOpts equ (*-OptTable)/6 number of table entries | |
127 fcb $80 end of option table | |
128 | |
129 UseMsg | |
130 fcb C$LF | |
131 fcc "Usage: EXMode [/<device> || -<pathlist> || -?] [option] [option] [...]" | |
132 fcb C$LF,C$LF | |
133 fcc "Purpose: To report or alter current option settings of SCF device" | |
134 fcb C$LF | |
135 fcc " descriptors in memory or on disk in single module files." | |
136 fcb C$LF,C$LF | |
137 fcc "Options: nam, mgr, ddr, hpn, hpa, upc, bso, dlo, eko, alf, nul, pau," | |
138 fcb C$LF | |
139 fcc " pag, bsp, del, eor, eof, rpr, dup, psc, int, qut, bse, ovf," | |
140 fcb C$LF | |
141 fcc " par, bau, xon, xof, col, row, xtp, wnd, val, sty, cpx, cpy," | |
142 fcb C$LF | |
143 fcc " fgc, bgc, bdc" | |
144 fcb C$LF,C$LF | |
145 fcc "Examples: exmode /t2" | |
146 fcb C$LF | |
147 fcc " Prints the current option settings of the /T2 descriptor" | |
148 fcb C$LF | |
149 fcc " in memory." | |
150 fcb C$LF | |
151 fcc " exmode -modules/t4.dd nam=T2 bau=6 hpa=ff6c eof=1B" | |
152 fcb C$LF | |
153 fcc " Changes the module name in the MODULES/T4.dd file to T2," | |
154 fcb C$LF | |
155 fcc " sets the baud rate code to 6, the hardware port address" | |
156 fcb C$LF | |
157 fcc " to $FF6C, and the end of file character to $1B." | |
158 fcb C$LF | |
159 fcc " exmode -?" | |
160 fcb C$LF | |
161 fcc " Prints more complete information on all of the options." | |
162 fcb C$CR | |
163 UseLen equ *-UseMsg | |
164 | |
165 HelpMsg | |
166 fcb C$LF | |
167 fcc "The NAM option accepts only a legal OS-9 module name with a maximum of" | |
168 fcb C$LF | |
169 fcc "4 characters. It is up to the user to ensure that there is adequate" | |
170 fcb C$LF | |
171 fcc "room for the module name, and if required to rename the disk file to" | |
172 fcb C$LF | |
173 fcc "suit the new module name. The MGR and DDR options can't be changed." | |
174 fcb C$LF | |
175 fcc "All other options require hexadecimal numbers (0 through FFFF). XTP is" | |
176 fcb C$LF | |
177 fcc "for certain ACIA descriptors only. WND, VAL, STY, CPX, CPY, FGC, BGC," | |
178 fcb C$LF | |
179 fcc "and BDC are for window descriptors only." | |
180 fcb C$LF,C$LF | |
181 fcc "nam Device Name mgr File Manager Name ddr Device Driver Name" | |
182 fcb C$LF | |
183 fcc "hpn H'ware Page Number hpa H'ware Port Address upc Case Lock Flag" | |
184 fcb C$LF | |
185 fcc "bso Backspace Method dlo Delete Line Method eko Screen Echo Flag" | |
186 fcb C$LF | |
187 fcc "alf Auto Linefeed Flag nul End Of Line Nulls pau Page Pause Flag" | |
188 fcb C$LF | |
189 fcc "pag Page Length bsp Backspace Character del Delete Line Char" | |
190 fcb C$LF | |
191 fcc "eor End Of Record Char eof End Of File Char rpr Reprint Line Char" | |
192 fcb C$LF | |
193 fcc "dup Duplicate Line Char psc Pause Character int Interrupt Character" | |
194 fcb C$LF | |
195 fcc "qut Quit Character bse Backspace Echo Char ovf Overflow Character" | |
196 fcb C$LF | |
197 fcc "par Type (Parity) Code bau Baud Rate Code xon XON Character" | |
198 fcb C$LF | |
199 fcc "xof XOFF Character col Display Columns row Display Rows" | |
200 fcb C$LF | |
201 fcc "xtp Extended Type Code wnd Window Number val Valid Window Flag" | |
202 fcb C$LF | |
203 fcc "sty Window Screen Type cpx X Corner Position cpy Y Corner Position" | |
204 fcb C$LF | |
205 fcc "fgc Foreground Colour bgc Background Colour bdc Border Colour" | |
206 fcb C$CR | |
207 HelpLen equ *-HelpMsg | |
208 | |
209 Equal fcc "=" | |
210 | |
211 TypeMsg | |
212 fcb C$LF | |
213 fcc "Not an SCF descriptor!" | |
214 CR fcb C$CR | |
215 TypeLen equ *-TypeMsg | |
216 | |
217 Sizemsg | |
218 fcb C$LF | |
219 fcc "Module size out of range!" | |
220 fcb C$CR | |
221 Sizelen equ *-Sizemsg | |
222 | |
223 SynMsg | |
224 fcb C$LF | |
225 fcc "Syntax error: " | |
226 SynLen equ *-SynMsg | |
227 | |
228 **************** | |
229 * miscellaneous error and help routines | |
230 | |
231 MuchHelp | |
232 leax HelpMsg,pc | |
233 ldy #HelpLen | |
234 bra Helpprnt | |
235 | |
236 BadSize | |
237 leax Sizemsg,pc | |
238 ldy #Sizelen | |
239 bra AddHelp | |
240 | |
241 BadType | |
242 leax TypeMsg,pc | |
243 ldy #TypeLen | |
244 AddHelp | |
245 lda #2 | |
246 os9 I$WritLn | |
247 Help | |
248 leax UseMsg,pc | |
249 ldy #UseLen | |
250 Helpprnt | |
251 lda #2 | |
252 os9 I$WritLn | |
253 lbra OkayEnd2 | |
254 | |
255 **************** | |
256 Entry | |
257 ldd #0 | |
258 std <ModAddr zero mod flag | |
259 sta <PathNmbr zero file flag | |
260 ldd ,x+ check for device name | |
261 cmpa #'- file option? | |
262 bne Link | |
263 cmpb #'? help option? | |
264 beq MuchHelp | |
265 * Use Filename to Get Desc: | |
1264 | 266 lda #UPDAT. open path to module file |
963 | 267 os9 I$Open |
268 bcs Help | |
269 stx <ParmPtr | |
270 sta <PathNmbr save path number | |
271 ldy #MaxSize max size | |
272 leax ModBuff,u module buff | |
273 os9 I$Read get it | |
274 lbcs Error | |
275 ldb M$Opt,x | |
276 clra [D] = option table size | |
277 addd #M$DTyp add options start offset | |
278 std <OptEnd save options end offset | |
279 ldd M$Size,x get module size | |
280 cmpd #MaxSize module size OK? | |
281 bhi BadSize no, go return error... | |
282 std <ModSize | |
283 bra GotIt | |
284 | |
285 Link | |
286 cmpa #'/ else must be /<devicename> | |
287 bne Help | |
288 pshs u | |
289 lda #Devic | |
290 os9 F$Link link to module | |
291 bcs Help | |
292 stx <ParmPtr update after name | |
293 tfr u,x | |
294 puls u | |
295 stx <ModAddr | |
296 ldb M$Opt,x | |
297 clra [D] = option table size | |
298 addd #M$DTyp add options start offset | |
299 std <OptEnd save options end offset | |
300 ldd M$Size,x get module size | |
301 cmpd #MaxSize module size OK? | |
302 lbhi BadSize no, go report error... | |
303 std <ModSize | |
304 tfr d,y copy module size... | |
305 pshs u save data area pointer | |
306 leau ModBuff,u | |
307 | |
308 GetModLp | |
309 lda ,x+ | |
310 sta ,u+ | |
311 leay -1,y | |
312 bne GetModLp | |
313 puls u recover data area pointer | |
314 | |
315 GotIt | |
316 ldd <OptEnd get option table end offset | |
317 cmpd <ModSize is option table size OK? | |
318 lbhs BadSize no, go report error... | |
319 leax ModBuff,u | |
320 lda M$DTyp,x get device type | |
321 lbne BadType SCF = $00 | |
322 ldx <ParmPtr point to input parms | |
323 lbsr SkipSpac go skip leading spaces... | |
324 cmpa #C$CR no options? | |
325 lbeq Info ..yes, give info | |
326 leax -1,x | |
327 | |
328 **************** | |
329 * X=ParmPtr | |
330 * Find and Set Options: | |
331 | |
332 FindLp10 | |
333 lbsr SkipSpac get next input param | |
334 stx <ParmPtr save for syntax error use | |
335 cmpa #C$CR end? | |
336 lbeq Verify ..yes, update module CRC | |
337 leay OptTable-6,pc ready option table ptr | |
338 pshs u | |
339 ldu ,x++ get next two chars | |
340 ora #$20 convert 1st param char to lower case | |
341 exg d,u move [U] where we can convert param chars | |
342 ora #$20 convert 2nd param char... | |
343 orb #$20 convert 3rd... | |
344 exg d,u move back again | |
345 | |
346 FindLp20 | |
347 leay 6,y next option entry | |
348 tst ,y last entry? | |
349 bmi Syntax ..yes, bad option | |
350 cmpa 1,y | |
351 bne FindLp20 same name? | |
352 cmpu 2,y | |
353 bne FindLp20 ..no, loop | |
354 * Found Option | |
355 puls u | |
356 sty <TxtPtr | |
357 ldd ,x+ must be followed by "=", leave [X] pointing at char after "=" | |
358 cmpa #'= | |
359 bne Syntax | |
360 cmpb #C$CR rest of option missing? | |
361 beq Syntax yes, go report error | |
362 cmpb #C$SPAC rest of option missing? | |
363 beq Syntax yes, go report error | |
364 ldb 5,y get # of bytes | |
365 beq Syntax 0 bytes, not allowed to change this option | |
366 stb <Count | |
367 ldb 4,y get option offset or offset to option offset | |
368 bpl NumOpt option offset, go set hexadecimal option | |
369 * Get CHAR input and set option: | |
370 andb #^Sign clear sign bit of offset to string offset | |
371 clra [D] = offset to string offset within module | |
372 cmpd <ModSize is it OK? | |
373 bhs Syntax no, go report error... | |
374 leay ModBuff,u point to module | |
375 ldd b,y get offset to string | |
376 cmpd <ModSize is it OK? | |
377 bhs Syntax no, go report error... | |
378 leay d,y point to option | |
379 pshs y save option pointer | |
380 os9 F$PrsNam valid OS-9 name? | |
381 puls y recover option pointer (end of name pointer lost) | |
382 bcs Syntax no, go report error | |
383 cmpa #C$SPAC space delimiter char? | |
384 beq ChkLen yes, go check name length... | |
385 cmpa #C$CR <CR> delimiter char? | |
386 bne Syntax no, go report error | |
387 | |
388 ChkLen | |
389 cmpb <Count name length OK? | |
390 bhi Syntax no, go report error... | |
391 | |
392 SetChrLp | |
393 lda ,x+ get character | |
394 sta ,y+ save it to module copy | |
395 decb done yet? | |
396 bne SetChrLp no, go copy another char... | |
397 lda -1,y get last char | |
398 ora #Sign set sign bit | |
399 sta -1,y save last char | |
400 lbra FindLp10 go do next... | |
401 | |
402 * Syntax Error: | |
403 Syntax | |
404 leax SynMsg,pc | |
405 ldy #SynLen | |
406 lda #2 | |
407 os9 I$Write | |
408 ldx <ParmPtr | |
409 leax -1,x | |
410 pshs x | |
411 ldy #0 | |
412 | |
413 CntLoop | |
414 leay 1,y | |
415 lda ,x+ | |
416 cmpa #C$CR | |
417 beq SynSay | |
418 cmpa #C$SPAC | |
419 bne CntLoop | |
420 | |
421 SynSay | |
422 puls x | |
423 lda #2 | |
424 os9 I$Write output err | |
425 lbra OkayEnd | |
426 | |
427 * Get Hex Input and Set Option: | |
428 NumOpt | |
429 clra [D] = option offset within module | |
430 cmpd <OptEnd is it OK? | |
431 bhs Syntax no, go report error... | |
432 clr <HexIn zero hex input bytes | |
433 clr <HexIn+1 | |
434 | |
435 SetNumLp | |
436 lda ,x+ get next # | |
437 cmpa #C$SPAC end of number? | |
438 beq SetNum2 ..yes, set option | |
439 cmpa #C$CR end of line? | |
440 beq SetNum1 ..yes, set option | |
441 * Convert ASCII Hex-->Byte: | |
442 suba #$30 make number from ASCII | |
443 bmi Syntax | |
444 cmpa #10 is it number? | |
445 bcs Num | |
446 anda #$5F make uppercase | |
447 suba #$11-$0A make hex $A-$F | |
448 cmpa #$0A | |
449 bcs Syntax | |
450 cmpa #$10 not hex char? | |
451 bcc Syntax | |
452 | |
453 Num | |
454 ldb #16 fancy asl *4 | |
455 mul | |
456 pshs b save top 4 bits | |
457 ldd <HexIn | |
458 rol ,s | |
459 rolb | |
460 rola | |
461 rol ,s | |
462 rolb | |
463 rola | |
464 rol ,s | |
465 rolb | |
466 rola | |
467 rol ,s | |
468 rolb | |
469 rola | |
470 std <HexIn | |
471 puls b drop temp | |
472 bra SetNumLp ..loop | |
473 | |
474 SetNum1 | |
475 leax -1,x reset so can find <CR> | |
476 | |
477 SetNum2 | |
478 ldb 4,y get option offset | |
479 leay ModBuff,u point to module | |
480 leay b,y point to option | |
481 ldd <HexIn pick up hex input | |
482 dec <Count | |
483 beq SetOne | |
484 std ,y set two byte option | |
485 lbra FindLp10 | |
486 | |
487 SetOne | |
488 tsta | |
489 lbne Syntax | |
490 stb ,y set one byte option | |
491 | |
492 SetNDone | |
493 lbra FindLp10 | |
494 | |
495 * -------------- | |
496 * Skip Spaces: | |
497 SkipSpac | |
498 lda ,x+ | |
499 cmpa #C$SPAC | |
500 beq SkipSpac | |
501 rts | |
502 | |
503 * -------------- | |
504 * Update Module CRC: | |
505 Verify | |
506 pshs u save data ptr | |
507 leau ModBuff,u | |
508 tfr u,x X is mod address | |
509 ldy M$Size,x Y is mod size | |
510 leay -3,y beginning of chksum | |
511 tfr y,d Y is byte count | |
512 leau d,u set U to chksum | |
513 lda #$FF init chksum | |
514 sta ,u | |
515 sta 1,u | |
516 sta 2,u | |
517 pshs u | |
518 os9 F$CRC calc new crc | |
519 puls u | |
520 com ,u+ fix it up right | |
521 com ,u+ | |
522 com ,u | |
523 lda <PathNmbr was it file? | |
524 beq MemMod ..no, in memory | |
525 ldx #0 | |
526 tfr x,u | |
527 os9 I$Seek go back to file begin | |
528 bcs Error | |
529 puls u | |
530 leax ModBuff,u | |
531 ldy <ModSize | |
532 os9 I$Write update module file | |
533 bra OkayEnd | |
534 | |
535 MemMod | |
536 ldu ,s get data area pointer | |
537 leax ModBuff,u | |
538 ldy <ModSize | |
539 ldu <ModAddr | |
540 | |
541 PutModLp | |
542 lda ,x+ | |
543 sta ,u+ | |
544 leay -1,y | |
545 bne PutModLp | |
546 puls u recover data area pointer | |
547 bra OkayEnd2 | |
548 | |
549 OkayEnd | |
550 bsr OutCR | |
551 | |
552 OkayEnd2 | |
553 clrb okay | |
554 | |
555 Error | |
556 pshs b,cc | |
557 ldu <ModAddr | |
558 beq Bye | |
559 os9 F$UnLink | |
560 | |
561 Bye | |
562 puls b,cc | |
563 os9 F$Exit we're done... | |
564 | |
565 * -------------- | |
566 * Print a <CR>: | |
567 OutCR | |
568 leax CR,pc | |
569 ldy #1 | |
570 lda #1 | |
571 os9 I$WritLn | |
572 rts | |
573 | |
574 **************** | |
575 * Output Current Desc Info: | |
576 Info | |
577 bsr OutCR do a <CR> | |
578 ldb #TablOpts number of table entries | |
579 pshs b save counter | |
580 leax OptTable,pc point to text table | |
581 stx <TxtPtr | |
582 | |
583 InfoLoop | |
584 ldx <TxtPtr | |
585 ldy #4 | |
586 lbsr OutPut print option name | |
587 leax Equal,pc | |
588 ldy #1 | |
589 lbsr OutPut print = | |
590 ldx <TxtPtr | |
591 ldb 4,x get offset to HEX option; if minus, offset to option offset | |
592 bpl PrintHex go do simple offset to HEX option | |
593 andb #^Sign clear sign bit | |
594 clra [D] = offset to string offset within module | |
595 cmpd <ModSize is it OK? | |
596 bhs MovePtr no, skip this option... | |
597 leay ModBuff,u point [Y] to module work copy | |
598 ldd b,y get string offset within module | |
599 cmpd <ModSize is string offset OK? | |
600 bhs MovePtr no, skip this option... | |
601 leay d,y point [Y] to CHAR string | |
602 lda #BuffSize get max. chars to print | |
603 leax Buffer,u point [X] to CHAR string buffer | |
604 clr <Count init counter | |
605 | |
606 CharCopy ldb ,y+ get char | |
607 bpl NotLast sign bit clear so not last, go on... | |
608 andb #^Sign clear sign bit | |
609 lda #1 set up as last char | |
610 | |
611 NotLast stb ,x+ | |
612 inc <Count count chars in string | |
613 deca done yet? | |
614 bne CharCopy no, go do another char... | |
615 ldb <Count get chars in string ([A]=0, so [D]=char count) | |
616 tfr d,y module name length into [Y] | |
617 leax Buffer,u point [X] to CHAR string copy | |
618 bsr OutPut print CHAR string | |
619 bra MovePtr skip HEX output routine | |
620 | |
621 * Print Hex Option Values: | |
622 PrintHex | |
623 ldx <TxtPtr | |
624 ldb 5,x get # of digits | |
625 stb <Count | |
626 ldb 4,x get option offset in module | |
627 clra [D] = option offset within module | |
628 cmpd <OptEnd is option offset OK? | |
629 bhs MovePtr no, skip this option... | |
630 leax ModBuff,u point [X] to module work copy | |
631 abx point [X] to option | |
632 stx <DataPtr | |
633 | |
634 * Print One Byte: | |
635 NumLoop | |
636 ldx <DataPtr | |
637 lda ,x+ | |
638 stx <DataPtr | |
639 pshs a | |
640 lsra | |
641 lsra | |
642 lsra | |
643 lsra | |
644 bsr OutOne | |
645 puls a | |
646 anda #$0F | |
647 bsr OutOne | |
648 dec <Count | |
649 bne NumLoop | |
650 | |
651 MovePtr | |
652 ldx <TxtPtr | |
653 leax 6,x | |
654 stx <TxtPtr | |
655 dec ,s | |
656 lbeq OkayEnd done... | |
657 ldb ,s | |
658 bitb #$07 # of options remaining evenly divisible by eight? | |
659 lbne InfoLoop no, go print next option on same line | |
660 lbsr OutCR <CR> after every 8th option | |
661 lbra InfoLoop ..loop | |
662 | |
663 * -------------- | |
664 * Print 1/2 Byte Hex Char: | |
665 OutOne | |
666 cmpa #10 | |
667 bcs Number | |
668 adda #$11-10 make alpha | |
669 | |
670 Number | |
671 adda #$30 make ASCII | |
672 sta <Buffer | |
673 leax Buffer,u | |
674 ldy #1 | |
675 | |
676 OutPut | |
677 lda #1 std out | |
678 os9 I$Write | |
679 lbcs Error | |
680 rts | |
681 | |
682 emod | |
683 Size equ * | |
684 end | |
685 |