annotate level1/cmds/dump.asm @ 886:6393d53ce3c7

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