annotate level1/cmds/dump.asm @ 1211:f54f04a78c54

Rodney Hamilton fixes
author boisy
date Mon, 23 Jun 2003 17:45:27 +0000
parents b8608857a4a2
children 84ea83668304
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1 ********************************************************************
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
2 * Dump - Show file contents in hex
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
3 *
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
4 * $Id$
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
5 *
945
707940712718 Fixed small screen output problems
boisy
parents: 921
diff changeset
6 * Dump follows the function of the original Microware version but now
707940712718 Fixed small screen output problems
boisy
parents: 921
diff changeset
7 * supports large files over 64K, and is free from the problems of garbage
707940712718 Fixed small screen output problems
boisy
parents: 921
diff changeset
8 * in wide listings.
707940712718 Fixed small screen output problems
boisy
parents: 921
diff changeset
9 *
707940712718 Fixed small screen output problems
boisy
parents: 921
diff changeset
10 * In addition it now allows dumping of memory modules and command modules
707940712718 Fixed small screen output problems
boisy
parents: 921
diff changeset
11 * in the execution directory.
707940712718 Fixed small screen output problems
boisy
parents: 921
diff changeset
12 *
1211
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
13 * Ed. Comments Who YY/MM/DD
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
14 * ------------------------------------------------------------------
1211
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
15 * 5 From Tandy OS-9 Level One VR 02.00.00
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
16 * 6 Incorporated R. Telkman's additions from 1987, BGP 02/12/23
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
17 * added -d option, added defs to conditionally
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
18 * assemble without help or screen size check
660
a4d2474884b4 Edition 6 now supports -d, -m, -h and -x options, more robust command line
boisy
parents: 200
diff changeset
19 *
1211
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
20 * Removed -d option BGP 03/01/17
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
21 * Narrow screen now shows properly, only dumps BGP 03/01/21
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
22 * 16 bits worth of address data to make room.
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
23 * Fixed bug where header would be shown even if BGP 03/03/03
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
24 * there was no data in a file.
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
25 * 7 Restored Rubout processing for terminals RVH 03/06/06
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
26
1211
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
27 nam Dump
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
28 ttl Show file contents in hex
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
29
1211
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
30 ifp1
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
31 use defsfile
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
32 endc
660
a4d2474884b4 Edition 6 now supports -d, -m, -h and -x options, more robust command line
boisy
parents: 200
diff changeset
33
a4d2474884b4 Edition 6 now supports -d, -m, -h and -x options, more robust command line
boisy
parents: 200
diff changeset
34 * Tweakable options
1211
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
35 DOSCSIZ set 1 1 = include SS.ScSiz code, 0 = leave out
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
36 DOHELP set 0 1 = include help message, 0 = leave out
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
37 BUFSZ set 80
660
a4d2474884b4 Edition 6 now supports -d, -m, -h and -x options, more robust command line
boisy
parents: 200
diff changeset
38
1211
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
39 tylg set Prgrm+Objct
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
40 atrv set ReEnt+rev
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
41 rev set 1
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
42 edition set 7
660
a4d2474884b4 Edition 6 now supports -d, -m, -h and -x options, more robust command line
boisy
parents: 200
diff changeset
43
1211
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
44 org 0
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
45 nonopts rmb 1
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
46 D.Prm rmb 2
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
47 D.Hdr rmb 1
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
48 D.Mem rmb 1
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
49 IFNE DOSCSIZ
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
50 narrow rmb 1
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
51 ENDC
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
52 Mode rmb 1
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
53 D.Opn rmb 1
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
54 D.Beg rmb 2
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
55 D.End rmb 2
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
56 D.Adr rmb 4
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
57 D.Len rmb 2
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
58 D.Ptr rmb 2
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
59 D.Txt rmb 2
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
60 Datbuf rmb 16
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
61 Txtbuf rmb BUFSZ
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
62 rmb 128
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
63 datsz equ .
660
a4d2474884b4 Edition 6 now supports -d, -m, -h and -x options, more robust command line
boisy
parents: 200
diff changeset
64
1211
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
65 mod length,name,tylg,atrv,start,datsz
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
66
1211
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
67 name fcs /Dump/
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
68 fcb edition
660
a4d2474884b4 Edition 6 now supports -d, -m, -h and -x options, more robust command line
boisy
parents: 200
diff changeset
69
1211
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
70 title fcc /Address 0 1 2 3 4 5 6 7 8 9 A B C D E F 0 2 4 6 8 A C E/
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
71 titlelen equ *-title
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
72 caret fcb C$CR
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
73 flund fcc /-------- ---- ---- ---- ---- ---- ---- ---- ---- ----------------/
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
74 fcb C$CR
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
75 IFNE DOSCSIZ
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
76 short fcc / 0 1 2 3 4 5 6 7 0 2 4 6/
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
77 fcb C$LF
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
78 fcc /Addr 8 9 A B C D E F 8 A C E/
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
79 fcb C$CR
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
80 shund fcc /==== +-+-+-+-+-+-+-+- +-+-+-+-/
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
81 fcb C$CR
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
82 ENDC
660
a4d2474884b4 Edition 6 now supports -d, -m, -h and -x options, more robust command line
boisy
parents: 200
diff changeset
83
1211
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
84 start stx <D.Prm
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
85 clra
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
86 sta <D.Hdr
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
87 sta <D.Mem
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
88 sta <nonopts assume no non-opts
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
89 inca
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
90 sta <Mode READ.
660
a4d2474884b4 Edition 6 now supports -d, -m, -h and -x options, more robust command line
boisy
parents: 200
diff changeset
91
1211
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
92 IFNE DOSCSIZ
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
93 clr <narrow assume wide
660
a4d2474884b4 Edition 6 now supports -d, -m, -h and -x options, more robust command line
boisy
parents: 200
diff changeset
94
a4d2474884b4 Edition 6 now supports -d, -m, -h and -x options, more robust command line
boisy
parents: 200
diff changeset
95 * Check screen size
1211
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
96 ldb #SS.ScSiz
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
97 os9 I$GetStt
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
98 bcs Pass1
660
a4d2474884b4 Edition 6 now supports -d, -m, -h and -x options, more robust command line
boisy
parents: 200
diff changeset
99
1211
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
100 cmpx #titlelen+1
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
101 bge PrePass
660
a4d2474884b4 Edition 6 now supports -d, -m, -h and -x options, more robust command line
boisy
parents: 200
diff changeset
102
1211
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
103 sta <narrow
660
a4d2474884b4 Edition 6 now supports -d, -m, -h and -x options, more robust command line
boisy
parents: 200
diff changeset
104
1211
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
105 PrePass ldx <D.Prm
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
106 ENDC
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
107
660
a4d2474884b4 Edition 6 now supports -d, -m, -h and -x options, more robust command line
boisy
parents: 200
diff changeset
108 * Pass1 - process any options
a4d2474884b4 Edition 6 now supports -d, -m, -h and -x options, more robust command line
boisy
parents: 200
diff changeset
109 * Entry: X = ptr to cmd line
a4d2474884b4 Edition 6 now supports -d, -m, -h and -x options, more robust command line
boisy
parents: 200
diff changeset
110 Pass1
a4d2474884b4 Edition 6 now supports -d, -m, -h and -x options, more robust command line
boisy
parents: 200
diff changeset
111 * Skip over spaces
1211
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
112 lda ,x+
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
113 cmpa #C$SPAC
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
114 beq Pass1
660
a4d2474884b4 Edition 6 now supports -d, -m, -h and -x options, more robust command line
boisy
parents: 200
diff changeset
115
a4d2474884b4 Edition 6 now supports -d, -m, -h and -x options, more robust command line
boisy
parents: 200
diff changeset
116 * Check for EOL
1211
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
117 cmpa #C$CR
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
118 beq Pass2
660
a4d2474884b4 Edition 6 now supports -d, -m, -h and -x options, more robust command line
boisy
parents: 200
diff changeset
119
a4d2474884b4 Edition 6 now supports -d, -m, -h and -x options, more robust command line
boisy
parents: 200
diff changeset
120 * Check for option
1211
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
121 cmpa #'-
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
122 bne Pass1
660
a4d2474884b4 Edition 6 now supports -d, -m, -h and -x options, more robust command line
boisy
parents: 200
diff changeset
123
a4d2474884b4 Edition 6 now supports -d, -m, -h and -x options, more robust command line
boisy
parents: 200
diff changeset
124 * Here, X points to an option char
1211
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
125 OptPass lda ,x+
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
126 cmpa #C$SPAC
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
127 beq Pass1
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
128 cmpa #C$CR
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
129 beq Pass2
660
a4d2474884b4 Edition 6 now supports -d, -m, -h and -x options, more robust command line
boisy
parents: 200
diff changeset
130
1211
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
131 anda #$DF
660
a4d2474884b4 Edition 6 now supports -d, -m, -h and -x options, more robust command line
boisy
parents: 200
diff changeset
132
1211
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
133 IsItH cmpa #'H
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
134 bne IsItM
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
135
660
a4d2474884b4 Edition 6 now supports -d, -m, -h and -x options, more robust command line
boisy
parents: 200
diff changeset
136 * Process H here
1211
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
137 sta <D.Hdr
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
138 bra OptPass
660
a4d2474884b4 Edition 6 now supports -d, -m, -h and -x options, more robust command line
boisy
parents: 200
diff changeset
139
1211
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
140 IsItM cmpa #'M
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
141 bne IsItX
660
a4d2474884b4 Edition 6 now supports -d, -m, -h and -x options, more robust command line
boisy
parents: 200
diff changeset
142
1211
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
143 * Process M here
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
144 sta <D.Mem
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
145 bra OptPass
660
a4d2474884b4 Edition 6 now supports -d, -m, -h and -x options, more robust command line
boisy
parents: 200
diff changeset
146
1211
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
147 IsItX cmpa #'X
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
148 bne ShowHelp
660
a4d2474884b4 Edition 6 now supports -d, -m, -h and -x options, more robust command line
boisy
parents: 200
diff changeset
149
a4d2474884b4 Edition 6 now supports -d, -m, -h and -x options, more robust command line
boisy
parents: 200
diff changeset
150 * Process X here
1211
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
151 lda <Mode
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
152 ora #EXEC.
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
153 sta <Mode
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
154 bra OptPass
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
155
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
156 IFNE DOHELP
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
157 ShowHelp leax HelpMsg,pcr
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
158 lda #2
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
159 ldy #HelpLen
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
160 os9 I$Write
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
161 bra ExitOk
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
162 ENDC
660
a4d2474884b4 Edition 6 now supports -d, -m, -h and -x options, more robust command line
boisy
parents: 200
diff changeset
163
a4d2474884b4 Edition 6 now supports -d, -m, -h and -x options, more robust command line
boisy
parents: 200
diff changeset
164 * Pass2 - process any non-options
a4d2474884b4 Edition 6 now supports -d, -m, -h and -x options, more robust command line
boisy
parents: 200
diff changeset
165 * Entry: X = ptr to cmd line
a4d2474884b4 Edition 6 now supports -d, -m, -h and -x options, more robust command line
boisy
parents: 200
diff changeset
166 Pass2
1211
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
167 ldx <D.Prm
660
a4d2474884b4 Edition 6 now supports -d, -m, -h and -x options, more robust command line
boisy
parents: 200
diff changeset
168 Pass21
a4d2474884b4 Edition 6 now supports -d, -m, -h and -x options, more robust command line
boisy
parents: 200
diff changeset
169 * Skip over spaces
1211
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
170 lda ,x+
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
171 cmpa #C$SPAC
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
172 beq Pass21
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
173 cmpa #'-
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
174 bne Pass22
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
175
1211
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
176 EatOpts lda ,x+
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
177 cmpa #C$SPAC
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
178 beq Pass21
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
179 cmpa #C$CR
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
180 bne EatOpts
660
a4d2474884b4 Edition 6 now supports -d, -m, -h and -x options, more robust command line
boisy
parents: 200
diff changeset
181
a4d2474884b4 Edition 6 now supports -d, -m, -h and -x options, more robust command line
boisy
parents: 200
diff changeset
182 * Check for EOL
1211
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
183 Pass22 cmpa #C$CR
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
184 beq EndOfL
660
a4d2474884b4 Edition 6 now supports -d, -m, -h and -x options, more robust command line
boisy
parents: 200
diff changeset
185
1211
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
186 Call leax -1,x
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
187 sta nonopts,u
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
188 bsr DumpFile
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
189 bra Pass21
660
a4d2474884b4 Edition 6 now supports -d, -m, -h and -x options, more robust command line
boisy
parents: 200
diff changeset
190
1211
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
191 EndOfL tst <nonopts any non-options on cmd line?
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
192 bne ExitOk
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
193 tst <D.Mem memory option specified?
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
194 bne ShowHelp yes, no module specified, show help
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
195 clra stdin
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
196 bsr DumpIn
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
197 IFEQ DOHELP
660
a4d2474884b4 Edition 6 now supports -d, -m, -h and -x options, more robust command line
boisy
parents: 200
diff changeset
198 ShowHelp
1211
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
199 ENDC
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
200 ExitOk clrb
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
201 DoExit os9 F$Exit
660
a4d2474884b4 Edition 6 now supports -d, -m, -h and -x options, more robust command line
boisy
parents: 200
diff changeset
202
1211
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
203 mlink clra
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
204 pshs u
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
205 os9 F$Link
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
206 stu <D.Beg
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
207 puls u
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
208 bcc DumpIn
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
209 bra DoExit
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
210
1211
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
211 DumpFile tst <D.Mem
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
212 bne mlink
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
213 lda <Mode
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
214 opath tfr x,y
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
215 os9 I$Open
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
216 bcc DumpIn
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
217 tfr y,x
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
218 ora #DIR. try directory mode
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
219 os9 I$Open open it
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
220 bcs DoExit branch if error
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
221 DumpIn stx <D.Prm
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
222 sta <D.Opn
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
223 ldx <D.Beg
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
224 ldd M$Size,x
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
225 leax d,x
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
226 stx <D.End
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
227 clra
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
228 clrb
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
229 tfr d,x
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
230 onpas std <D.Adr+2
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
231 bcc notbg
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
232 leax 1,x
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
233 notbg stx <D.Adr
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
234 tst <D.Hdr
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
235 bne nohed
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
236 IFNE DOSCSIZ
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
237 tst <narrow
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
238 beq flpag
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
239 aslb
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
240 ENDC
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
241 flpag tstb
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
242 bne nohed
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
243 lbsr iseof
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
244 bcc flpag2
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
245 ldx <D.Prm
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
246 rts
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
247 flpag2 leax caret,pcr
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
248 lbsr print
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
249 ldb #16
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
250 leax title,pcr
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
251 leay flund,pcr
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
252 IFNE DOSCSIZ
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
253 tst <narrow
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
254 beq doprt
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
255 ldb #8
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
256 leax short,pcr
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
257 leay shund,pcr
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
258 ENDC
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
259 doprt pshs y
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
260 clra
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
261 std <D.Len
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
262 bsr print
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
263 puls x
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
264 bsr print
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
265 nohed leax Txtbuf,u
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
266 stx <D.Ptr
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
267 ldb <D.Len+1
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
268 lda #3
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
269 mul
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
270 addd #2
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
271 IFNE DOSCSIZ
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
272 tst <narrow
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
273 beq leayit
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
274 subd #4
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
275 ENDC
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
276 leayit leay d,x
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
277 sty <D.Txt
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
278 lda #C$SPAC
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
279 ldb #BUFSZ-1
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
280 clbuf sta b,x
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
281 decb
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
282 bpl clbuf
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
283 ldb #D.Adr
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
284 IFNE DOSCSIZ
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
285 tst <narrow
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
286 beq adlop
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
287 incb we skip first two bytes ...
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
288 incb ... if on a narrow screen
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
289 ENDC
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
290 adlop lda b,u
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
291 lbsr onbyt
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
292 incb
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
293 cmpb #D.Adr+4
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
294 bne adlop
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
295 ldx <D.Ptr
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
296 leax 1,x
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
297 stx <D.Ptr
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
298 bsr readi
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
299 bcs eofck
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
300 onlin lbsr onchr
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
301 decb
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
302 ble enlin
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
303 lbsr onchr
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
304 decb
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
305 ble enlin
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
306 IFNE DOSCSIZ
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
307 tst <narrow
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
308 bne onlin
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
309 ENDC
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
310 lda #C$SPAC
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
311 lbsr savec
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
312 bra onlin
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
313 enlin lda #C$CR
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
314 ldx <D.Txt
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
315 sta ,x
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
316 leax Txtbuf,u
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
317 bsr print
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
318 ldd <D.Adr+2
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
319 ldx <D.Adr
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
320 addd <D.Len
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
321 lbra onpas
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
322 print ldy #BUFSZ
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
323 lda #1
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
324 os9 I$WritLn
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
325 lbcs DoExit
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
326 rts
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
327 readi ldy <D.Len
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
328 clrb
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
329 tst <D.Mem
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
330 bne redad
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
331 leax Datbuf,u
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
332 lda <D.Opn
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
333 os9 I$Read
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
334 bcs reded
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
335 tfr y,d
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
336 reded rts
1002
b8608857a4a2 Fixed header problem
boisy
parents: 945
diff changeset
337
1211
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
338 redad bsr iseofm
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
339 bcc setct
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
340 rts
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
341 setct subd <D.Len
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
342 bcs redof
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
343 clra
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
344 clrb
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
345 redof addd <D.Len
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
346 clr -1,s
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
347 leay d,x
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
348 sty <D.Beg
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
349 rts
1002
b8608857a4a2 Fixed header problem
boisy
parents: 945
diff changeset
350
1211
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
351 eofck cmpb #E$EOF
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
352 orcc #Carry
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
353 lbne DoExit
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
354 clrb
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
355 ldx <D.Prm
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
356 rts
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
357
1211
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
358 iseof tst <D.Mem
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
359 bne iseofm
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
360 lda <D.Opn
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
361 ldb #SS.EOF
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
362 os9 I$GetStt
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
363 cmpb #E$EOF
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
364 beq iseofex
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
365 clrb
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
366 iseofok rts
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
367 iseofex orcc #Carry
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
368 ldb #E$EOF
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
369 rts
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
370 iseofm ldd <D.End
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
371 ldx <D.Beg
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
372 subd <D.Beg
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
373 beq iseofex
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
374 andcc #^Carry
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
375 rts
1002
b8608857a4a2 Fixed header problem
boisy
parents: 945
diff changeset
376
1211
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
377 onibl anda #$0F
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
378 cmpa #9
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
379 bls nocom
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
380 adda #7
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
381 nocom adda #'0
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
382 savec pshs x
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
383 ldx <D.Ptr
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
384 sta ,x+
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
385 stx <D.Ptr
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
386 puls x,pc
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
387 onchr lda ,x+
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
388 bsr onbyt
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
389 pshs x,a
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
390 anda #$7F
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
391 cmpa #C$SPAC control char?
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
392 blo cntrl
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
393 cmpa #$7F rubout?
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
394 blo savet
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
395 cntrl lda #'. make printable
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
396 savet ldx <D.Txt
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
397 sta ,x+
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
398 stx <D.Txt
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
399 puls a,x,pc
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
400 onbyt pshs a
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
401 lsra
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
402 lsra
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
403 lsra
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
404 lsra
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
405 bsr onibl
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
406 lda ,s
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
407 bsr onibl
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
408 puls a,pc
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
409
1211
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
410 IFNE DOHELP
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
411 HelpMsg fcc "Use: Dump [opts] [<path>] [opts]"
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
412 fcb C$CR,C$LF
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
413 fcc " -h = no header"
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
414 fcb C$CR,C$LF
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
415 fcc " -m = module in memory"
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
416 fcb C$CR,C$LF
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
417 fcc " -x = file in exec dir"
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
418 fcb C$CR,C$LF
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
419 HelpLen equ *-HelpMsg
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
420 ENDC
660
a4d2474884b4 Edition 6 now supports -d, -m, -h and -x options, more robust command line
boisy
parents: 200
diff changeset
421
1211
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
422 emod
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
423 length equ *
f54f04a78c54 Rodney Hamilton fixes
boisy
parents: 1002
diff changeset
424 end