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

changes
author boisy
date Thu, 06 Mar 2003 01:41:03 +0000
parents 7cecd837bcab
children 84ea83668304
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 nam dmode
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
2
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
3 * DMode by Kevin K. Darling
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
4 * Disk descriptor utility.
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 * This version will do desc file on disk also.
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
7 * 23 Sept 86, 1 Oct 86, 2 Oct 86
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
8
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
9 * Modified by Roger A. Krupski (HARDWAREHACK)
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
10 * Fixes "lower case bug", allows "$" prefix for hex
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
11 * Last updated: 08-24-89 RAK
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 * Oversized and kludgy, but works.
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
14 * Apologies for lack of comments.
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
15 ************************************************
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
16 * RBF descriptor utility similar to xmode.
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
17 * Use: dmode </devicename> [options]
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
18 * dmode -<filename> [options]
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
19 * (allows dmode use on a saved desc)
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
20 * (-filename will use data dir for default)
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
21 * dmode -? will give bit definitions
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
22 * If no options given, just returns desc info.
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
23 * All numbers must be in HEX.
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
24 * dmode
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
25 * dmode /h0 cyl=0200 sas=8 ilv=4
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
26 * dmode /d0
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
27 * dmode -?
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
28 * dmode -/d1/modules/d2.dd cyl=0028
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
29
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
30 ifp1
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
31 use defsfile use defsfile
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
32 use rbfdefs
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
33 endc
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
34
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
35 mod size,name,$11,$81,entry,msiz
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
36
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
37 org 0
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
38 desc rmb $40 dev desc copy
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
39 dsize rmb 2 desc size
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
40 path rmb 1 file path
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
41 parmptr rmb 2 next name dataptr
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
42 module rmb 2 desc address
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
43 dataptr rmb 2 current option ptr
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
44 buffptr rmb 2 buffer address
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
45 txtptr rmb 2 option name ptr
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
46 hexin rmb 2 2 byte hex number
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
47 hexcnt rmb 1 number of option bytes
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
48 buffer rmb 10 output buffer
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
49 stack rmb 200
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
50 params rmb 150
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
51 msiz equ .
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
52
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
53 ************************************************
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
54 name fcs "Dmode"
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
55 fcb 8 version
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
56
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
57 helpmsg
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
58 fcb C$CR,C$LF
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
59 fcc "drv Drive Number 0...n"
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
60 fcb C$CR,C$LF
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
61 fcc "stp Step Rate 0=30, 1=20, 2=12, 3=6ms"
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
62 fcb C$CR,C$LF
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
63 fcb C$CR,C$LF
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
64 fcc 'typ Device Type bit0- 0=5" 1=8"'
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
65 fcb C$CR,C$LF
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
66 fcc " $20 bit5- 0=non 1=coco"
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
67 fcb C$CR,C$LF
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
68 fcc " $40 bit6- 0=std 1=non"
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
69 fcb C$CR,C$LF
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
70 fcc " $80 bit7- 0=flop 1=hard"
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
71 fcb C$CR,C$LF
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
72 fcb C$CR,C$LF
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
73 fcc "dns Density bit0- 0=SD 1=DD"
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
74 fcb C$CR,C$LF
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
75 fcc " bit1- 0=48 1=96 tpi"
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
76 fcb C$CR,C$LF
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
77 fcb C$CR,C$LF
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
78 fcc "cyl Cylinders (tracks) (in hex)"
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
79 fcb C$CR,C$LF
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
80 fcc "sid Sides (heads) (in hex)"
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
81 fcb C$CR,C$LF
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
82 fcc "vfy Verify (0=yes)"
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
83 fcb C$CR,C$LF
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
84 fcc "sct Sectors/Track (in hex)"
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
85 fcb C$CR,C$LF
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
86 fcc "tos Sectors/Track on track 0 (in hex)"
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
87 fcb C$CR,C$LF
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
88 fcc "ilv Interleave (in hex)"
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
89 fcb C$CR,C$LF
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
90 fcc "sas Minimum segment allocation (in hex)"
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
91 fcb C$CR,C$LF
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
92 helplen equ *-helpmsg
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
93
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
94 errmsg
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
95 fcb C$CR,C$LF
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
96 fcc "Use Dmode /<dev_name> [options...]"
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
97 fcb C$CR,C$LF
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
98 fcc " or Dmode -<filename> [options...]"
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
99 fcb C$CR,C$LF
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
100 fcc " or Dmode -? for options help"
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
101 fcb C$CR,C$LF
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
102 fcb C$CR,C$LF
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
103 fcc " NOTE: specify options in hex."
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
104 cr fcb C$CR,C$LF
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
105 msglen equ *-errmsg
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
106
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
107 synmsg
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
108 fcb C$CR,C$LF
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
109 fcc "Syntax Error: "
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
110 synlen equ *-synmsg
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
111
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
112
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
113 muchhelp
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
114 leax helpmsg,pc
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
115 ldy #helplen
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
116 bra helpprnt
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
117
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
118 rbfmsg
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
119 fcb C$CR,C$LF
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
120 fcc "NOT an RBF descriptor!"
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
121 fcb C$CR,C$LF
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
122 rbflen equ *-rbfmsg
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
123
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
124 notrbf
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
125 leax rbfmsg,pc
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
126 ldy #rbflen
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
127 lda #2
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
128 os9 I$Write
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
129
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
130 help
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
131 leax errmsg,pc
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
132 ldy #msglen
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
133
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
134 helpprnt
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
135 lda #2
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
136 os9 I$Write
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
137 lbra okayend2
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
138
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
139 ************************************************
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
140 entry
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
141 ldd #0
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
142 std module zero mod flag
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
143 sta path zero file flag
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
144 ldd ,x+ check for device name
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
145 cmpa #'- file option?
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
146 bne link
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
147 cmpb #'? help option?
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
148 beq muchhelp
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
149
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
150 * Use Filename to Get Desc:
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
151 lda #UPDAT. open path to desc file
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
152 os9 I$Open
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
153 bcs error
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
154 stx parmptr
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
155 sta path save path number
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
156
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
157 ldy #$40 max size
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
158 leax desc,u desc buff
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
159 os9 I$Read get it
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
160 bcc use10
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
161 cmpb #E$EOF
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
162 bne error
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
163
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
164 use10
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
165 sty dsize save desc size
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
166 bra gotit
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
167
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
168 link
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
169 cmpa #PDELIM else must be /<devicename>
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
170 bne help
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
171 pshs u
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
172 lda #Devic
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
173 os9 F$Link link to descriptor
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
174 bcs error
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
175 stx parmptr update after name
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
176 tfr u,x
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
177 puls u
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
178 stx module
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
179 ldd M$Size,x get desc size
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
180 std dsize
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
181 leay desc,u
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
182
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
183 mloop
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
184 lda ,x+
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
185 sta ,y+
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
186 decb
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
187 bne mloop
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
188
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
189 gotit
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
190 leax desc,u
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
191 lda $12,x test device type
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
192 cmpa #1 RBF?
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
193 bne notrbf
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
194
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
195 leax $13,x point to drive #
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
196 stx dataptr save mod option ptr
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
197
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
198 ldx parmptr point to input parms
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
199
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
200 skip
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
201 lda ,x+
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
202 cmpa #$20 skip blanks
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
203 beq skip
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
204
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
205 leax -1,x
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
206 cmpa #$0D no options?
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
207 lbeq info ..yes, give info
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
208 lbra findtxt else find options
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
209
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
210 okayend
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
211 lbsr outcr
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
212 okayend2
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
213 clrb okay
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
214 error
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
215 pshs b,cc
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
216 ldu module
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
217 beq bye
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
218 os9 F$UnLink
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
219 bye
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
220 puls b,cc
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
221 os9 F$Exit end dmode.
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
222
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
223 table
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
224 fcc " drv" option name
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
225 fcb IT.DRV,1 option offset & byte count
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
226 fcc " stp"
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
227 fcb IT.STP,1
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
228 fcc " typ"
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
229 fcb IT.TYP,1
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
230 fcc " dns"
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
231 fcb IT.DNS,1
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
232 fcc " cyl"
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
233 fcb IT.CYL,2
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
234 fcc " sid"
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
235 fcb IT.SID,1
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
236 fcc " vfy"
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
237 fcb IT.VFY,1
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
238 fcc " sct"
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
239 fcb IT.SCT,2
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
240 fcc " tos"
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
241 fcb IT.T0S,2
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
242 fcc " ilv"
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
243 fcb IT.ILV,1
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
244 fcc " sas"
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
245 fcb IT.SAS,1
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
246 fcc " t0s" extra so it parses, but doesn't print!
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
247 fcb IT.T0S,2
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
248 fcb $80 end of table
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
249
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
250 info equ * Output Current Desc Info:
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
251 ldb #11 eleven entries (we won't print #12)
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
252 pshs b
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
253 leax table,pc point to text table
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
254 stx txtptr
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
255 ilup
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
256 bsr outtext print label and =
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
257 lbsr outnum print value
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
258 ldx txtptr
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
259 leax 6,x
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
260 stx txtptr
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
261 dec ,s
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
262 lbeq okayend ..end of info
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
263 ldb ,s
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
264 cmpb #5 <cr> after 6th option
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
265 bne ilup
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
266 bsr outcr <cr>
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
267 bra ilup ..loop
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
268
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
269 outcr equ * Print a <CR/LF>:
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
270 leax cr,pc
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
271 ldy #2 byte count
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
272
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
273 output equ * Print generic
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
274 lda #1 std out
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
275 os9 I$Write
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
276 bcc okay
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
277 leas 2,s purge return
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
278 lbra error error
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
279 okay rts
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
280
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
281
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 equal fcc "=$"
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
284 outtext equ * Print Option Name:
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
285 ldx txtptr
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
286 ldy #4
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
287 bsr output print option name
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
288 leax equal,pc
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
289 ldy #2
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
290 bsr output sorry, must be a bsr
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
291 rts return
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
292
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
293 * -----------------------
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
294 outnum equ * Print Hex Option Values:
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
295 ldx txtptr
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
296 ldb 5,x get # of digits
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
297 stb hexcnt
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
298 numlup
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
299 bsr outhex
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
300 dec hexcnt
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
301 bne numlup
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
302 rts
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
303
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
304 outhex equ * Print One Byte:
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
305 ldx dataptr
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
306 lda ,x+
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
307 stx dataptr
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
308 pshs a
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
309 lsra
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
310 lsra
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
311 lsra
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
312 lsra
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
313 bsr outone
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
314 puls a
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
315 anda #$0F
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
316
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
317 outone equ * Print 1/2 Byte Hex Char:
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
318 cmpa #10
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
319 bcs number
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
320 adda #$11-10 make alpha
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
321 number
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
322 adda #$30 make ASCII
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
323 sta buffer
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
324 leax buffer,u
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
325 ldy #1
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
326 lbra output
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
327
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
328 skipspc equ * Skip Spaces:
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
329 lda ,x+
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
330 cmpa #C$SPAC
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
331 beq skipspc
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
332 rts
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
333
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
334 ************************************************
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
335 * X=parmptr
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
336
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
337 findtxt equ * Find and Set Options:
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
338
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
339 flup10
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
340 bsr skipspc get next input param
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
341 stx parmptr save for syntax error use
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
342 cmpa #C$CR end?
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
343 lbeq verify ..yes, update desc CRC
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
344
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
345 ora #$20 force lower case first char
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
346 leay table-6,pc ready option table ptr
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
347 pshs d,u
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
348 ldd ,x++ get next two chars
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
349 ora #$20 force lower case
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
350 orb #$20 -ditto-
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
351 tfr d,u place two chars in U
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
352 puls d restore A&B (u is still pushed)
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
353
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
354 flup20
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
355 leay 6,y next option entry
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
356 tst ,y last entry?
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
357 lbmi syntax ..yes, bad option
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
358 cmpa 1,y
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
359 bne flup20 same name?
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
360 cmpu 2,y
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
361 bne flup20 ..no, loop
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
362
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
363 * Found Option
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
364 puls u
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
365 sty txtptr
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
366 lda ,x+ must be followed by "="
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
367 cmpa #'=
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
368 lbne syntax
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
369
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
370 bsr setnum set that option
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
371 bra flup10
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
372
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
373 * -------------
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
374 setnum equ * Get Hex Input and Set Option:
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
375 ldb 5,y get # of bytes
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
376 stb hexcnt
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
377 clr hexin zero hex input bytes
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
378 clr hexin+1
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
379
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
380 setloop
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
381 lda ,x+ get next #
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
382 cmpa #'$ optional hex $?
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
383 beq setloop yes, ignore
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
384 cmpa #C$SPAC end of number?
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
385 beq setnum2 ..yes, set option, rts
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
386 cmpa #C$CR end of line?
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
387 beq setnum1
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
388 bsr hexcnvt else, get next num
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
389 bra setloop ..loop
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
390
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
391 setnum1
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
392 leax -1,x reset so can find <cr>
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
393 setnum2
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
394 ldb 4,y get option offset
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
395 leay desc,u point to desc
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
396 leay b,y point to option
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
397 ldd hexin pick up hex input
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
398 dec hexcnt
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
399 beq setone
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
400 std ,y set two byte option
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
401 rts
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
402 setone
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
403 tsta
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
404 lbne syntax
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
405 stb ,y set one byte option
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
406 rts
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
407
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
408 hexcnvt equ * Convert ASCII Hex-->Byte:
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
409 suba #$30 make number from ASCII
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
410 lbmi syntax
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
411 cmpa #10 is it number?
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
412 bcs num
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
413 anda #$5F make uppercase
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
414 suba #$11-$0a make hex $A-$F
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
415 cmpa #$0A
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
416 lbcs syntax
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
417 cmpa #$10 not hex char?
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
418 lbcc syntax
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
419 num
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
420 ldb #16 fancy asl *4
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
421 mul
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
422 pshs b save top 4 bits
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
423 ldd hexin
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
424 rol ,s
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
425 rolb
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
426 rola
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
427 rol ,s
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
428 rolb
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
429 rola
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
430 rol ,s
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
431 rolb
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
432 rola
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
433 rol ,s
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
434 rolb
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
435 rola
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
436 std hexin
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
437 puls b,pc drop temp, rts.
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
438
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
439 verify equ * Update Descriptor CRC:
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
440 pshs u save data ptr
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
441 leau desc,u
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
442 tfr u,x X is mod address
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
443
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
444 ldy M$Size,x Y is mod size
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
445 leay -3,y beginning of chksum
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
446 tfr y,d Y is byte count
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
447 leau d,u set U to chksum
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
448
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
449 lda #$FF init chksum
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
450 sta ,u
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
451 sta 1,u
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
452 sta 2,u
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
453 pshs u
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
454 os9 F$CRC calc new crc
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
455 puls u
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
456 com ,u+ fix it up right
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
457 com ,u+
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
458 com ,u
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
459
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
460 lda path was it file?
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
461 beq memmod ..no, in memory
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
462 ldx #0
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
463 tfr x,u
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
464 os9 I$Seek go back to file begin
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
465 lbcs error
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
466 puls u
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
467 leax desc,u
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
468 ldy dsize
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
469 os9 I$Write update desc file
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
470 lbra okayend
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 memmod
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
473 puls u
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
474 leax desc,u
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
475 ldb dsize+1
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
476 ldy module
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
477
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
478 move
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
479 lda ,x+
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
480 sta ,y+
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
481 decb
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
482 bne move
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
483
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
484 lbra okayend2
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
485
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
486
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
487 syntax equ *
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
488 leax synmsg,pc
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
489 ldy #synlen
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
490 lda #2
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
491 os9 I$Write
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 ldx parmptr
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
494 leax -1,x
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
495 pshs x
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
496 ldy #0
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
497
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
498 slup
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
499 leay 1,y
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
500 lda ,x+
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
501 cmpa #C$CR
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
502 beq synsay
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
503 cmpa #C$SPAC
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
504 bne slup
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
505
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
506 synsay
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
507 puls x
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
508 lda #2
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
509 os9 I$Write output err
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
510 lbra okayend
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
511
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
512 emod
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
513 size equ *
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
514 end