annotate level1/cmds/xmode.asm @ 1020:c1a5613ffe7b

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