annotate level1/cmds/dump.asm @ 740:c1f9a09898da

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