annotate level1/cmds/dump.asm @ 1325:84ea83668304

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