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

changes
author boisy
date Thu, 06 Mar 2003 01:41:03 +0000
parents b8608857a4a2
children f54f04a78c54
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1 ********************************************************************
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
2 * Dump - Show file contents in hex
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
3 *
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
4 * $Id$
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
5 *
945
707940712718 Fixed small screen output problems
boisy
parents: 921
diff changeset
6 * Dump follows the function of the original Microware version but now
707940712718 Fixed small screen output problems
boisy
parents: 921
diff changeset
7 * supports large files over 64K, and is free from the problems of garbage
707940712718 Fixed small screen output problems
boisy
parents: 921
diff changeset
8 * in wide listings.
707940712718 Fixed small screen output problems
boisy
parents: 921
diff changeset
9 *
707940712718 Fixed small screen output problems
boisy
parents: 921
diff changeset
10 * In addition it now allows dumping of memory modules and command modules
707940712718 Fixed small screen output problems
boisy
parents: 921
diff changeset
11 * in the execution directory.
707940712718 Fixed small screen output problems
boisy
parents: 921
diff changeset
12 *
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
13 * Ed. Comments Who YY/MM/DD
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
14 * ------------------------------------------------------------------
200
e9ce43cc215e Made major changes to headers for consistency and identification
boisy
parents: 21
diff changeset
15 * 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
16 * 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
17 * 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
18 * 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
19 *
901
8786f4894882 Removed -d option
boisy
parents: 886
diff changeset
20 * Removed -d option BGP 03/01/17
945
707940712718 Fixed small screen output problems
boisy
parents: 921
diff changeset
21 * Narrow screen now shows properly, only dumps BGP 03/01/21
707940712718 Fixed small screen output problems
boisy
parents: 921
diff changeset
22 * 16 bits worth of address data to make room.
1002
b8608857a4a2 Fixed header problem
boisy
parents: 945
diff changeset
23 * Fixed bug where header would be shown even if BGP 03/03/03
b8608857a4a2 Fixed header problem
boisy
parents: 945
diff changeset
24 * there was no data in a file.
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
25
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
26 nam Dump
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
27 ttl Show file contents in hex
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
28
785
e6502ece382b put ifp1/endc wrappers around use
boisy
parents: 740
diff changeset
29 ifp1
660
a4d2474884b4 Edition 6 now supports -d, -m, -h and -x options, more robust command line
boisy
parents: 200
diff changeset
30 use defsfile
785
e6502ece382b put ifp1/endc wrappers around use
boisy
parents: 740
diff changeset
31 endc
660
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 * Tweakable options
740
c1f9a09898da Reset help and scsize flags to 1
boisy
parents: 660
diff changeset
34 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
35 DOHELP set 0 1 = include help message, 0 = leave out
1002
b8608857a4a2 Fixed header problem
boisy
parents: 945
diff changeset
36 BUFSZ set 80
660
a4d2474884b4 Edition 6 now supports -d, -m, -h and -x options, more robust command line
boisy
parents: 200
diff changeset
37
921
617c1b90e623 Added DOHELP conditionals, set all to zero to eliminate help from commands
boisy
parents: 901
diff changeset
38 tylg set Prgrm+Objct
617c1b90e623 Added DOHELP conditionals, set all to zero to eliminate help from commands
boisy
parents: 901
diff changeset
39 atrv set ReEnt+rev
617c1b90e623 Added DOHELP conditionals, set all to zero to eliminate help from commands
boisy
parents: 901
diff changeset
40 rev set 1
617c1b90e623 Added DOHELP conditionals, set all to zero to eliminate help from commands
boisy
parents: 901
diff changeset
41 edition set 6
660
a4d2474884b4 Edition 6 now supports -d, -m, -h and -x options, more robust command line
boisy
parents: 200
diff changeset
42
a4d2474884b4 Edition 6 now supports -d, -m, -h and -x options, more robust command line
boisy
parents: 200
diff changeset
43 org 0
a4d2474884b4 Edition 6 now supports -d, -m, -h and -x options, more robust command line
boisy
parents: 200
diff changeset
44 nonopts rmb 1
a4d2474884b4 Edition 6 now supports -d, -m, -h and -x options, more robust command line
boisy
parents: 200
diff changeset
45 D.Prm rmb 2
a4d2474884b4 Edition 6 now supports -d, -m, -h and -x options, more robust command line
boisy
parents: 200
diff changeset
46 D.Hdr rmb 1
a4d2474884b4 Edition 6 now supports -d, -m, -h and -x options, more robust command line
boisy
parents: 200
diff changeset
47 D.Mem rmb 1
a4d2474884b4 Edition 6 now supports -d, -m, -h and -x options, more robust command line
boisy
parents: 200
diff changeset
48 IFNE DOSCSIZ
945
707940712718 Fixed small screen output problems
boisy
parents: 921
diff changeset
49 narrow rmb 1
660
a4d2474884b4 Edition 6 now supports -d, -m, -h and -x options, more robust command line
boisy
parents: 200
diff changeset
50 ENDC
a4d2474884b4 Edition 6 now supports -d, -m, -h and -x options, more robust command line
boisy
parents: 200
diff changeset
51 Mode rmb 1
a4d2474884b4 Edition 6 now supports -d, -m, -h and -x options, more robust command line
boisy
parents: 200
diff changeset
52 D.Opn rmb 1
a4d2474884b4 Edition 6 now supports -d, -m, -h and -x options, more robust command line
boisy
parents: 200
diff changeset
53 D.Beg rmb 2
a4d2474884b4 Edition 6 now supports -d, -m, -h and -x options, more robust command line
boisy
parents: 200
diff changeset
54 D.End rmb 2
a4d2474884b4 Edition 6 now supports -d, -m, -h and -x options, more robust command line
boisy
parents: 200
diff changeset
55 D.Adr rmb 4
a4d2474884b4 Edition 6 now supports -d, -m, -h and -x options, more robust command line
boisy
parents: 200
diff changeset
56 D.Len rmb 2
a4d2474884b4 Edition 6 now supports -d, -m, -h and -x options, more robust command line
boisy
parents: 200
diff changeset
57 D.Ptr rmb 2
a4d2474884b4 Edition 6 now supports -d, -m, -h and -x options, more robust command line
boisy
parents: 200
diff changeset
58 D.Txt rmb 2
a4d2474884b4 Edition 6 now supports -d, -m, -h and -x options, more robust command line
boisy
parents: 200
diff changeset
59 Datbuf rmb 16
a4d2474884b4 Edition 6 now supports -d, -m, -h and -x options, more robust command line
boisy
parents: 200
diff changeset
60 Txtbuf rmb BUFSZ
a4d2474884b4 Edition 6 now supports -d, -m, -h and -x options, more robust command line
boisy
parents: 200
diff changeset
61 rmb 128
a4d2474884b4 Edition 6 now supports -d, -m, -h and -x options, more robust command line
boisy
parents: 200
diff changeset
62 datsz equ .
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
921
617c1b90e623 Added DOHELP conditionals, set all to zero to eliminate help from commands
boisy
parents: 901
diff changeset
65 mod length,name,tylg,atrv,start,datsz
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
66
660
a4d2474884b4 Edition 6 now supports -d, -m, -h and -x options, more robust command line
boisy
parents: 200
diff changeset
67 name fcs /Dump/
921
617c1b90e623 Added DOHELP conditionals, set all to zero to eliminate help from commands
boisy
parents: 901
diff changeset
68 fcb edition
660
a4d2474884b4 Edition 6 now supports -d, -m, -h and -x options, more robust command line
boisy
parents: 200
diff changeset
69
a4d2474884b4 Edition 6 now supports -d, -m, -h and -x options, more robust command line
boisy
parents: 200
diff changeset
70 title fcc /Address 0 1 2 3 4 5 6 7 8 9 A B C D E F 0 2 4 6 8 A C E/
945
707940712718 Fixed small screen output problems
boisy
parents: 921
diff changeset
71 titlelen equ *-title
660
a4d2474884b4 Edition 6 now supports -d, -m, -h and -x options, more robust command line
boisy
parents: 200
diff changeset
72 caret fcb C$CR
a4d2474884b4 Edition 6 now supports -d, -m, -h and -x options, more robust command line
boisy
parents: 200
diff changeset
73 flund 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 IFNE DOSCSIZ
945
707940712718 Fixed small screen output problems
boisy
parents: 921
diff changeset
76 short fcc / 0 1 2 3 4 5 6 7 0 2 4 6/
660
a4d2474884b4 Edition 6 now supports -d, -m, -h and -x options, more robust command line
boisy
parents: 200
diff changeset
77 fcb C$LF
945
707940712718 Fixed small screen output problems
boisy
parents: 921
diff changeset
78 fcc /Addr 8 9 A B C D E F 8 A C E/
660
a4d2474884b4 Edition 6 now supports -d, -m, -h and -x options, more robust command line
boisy
parents: 200
diff changeset
79 fcb C$CR
945
707940712718 Fixed small screen output problems
boisy
parents: 921
diff changeset
80 shund fcc /==== +-+-+-+-+-+-+-+- +-+-+-+-/
660
a4d2474884b4 Edition 6 now supports -d, -m, -h and -x options, more robust command line
boisy
parents: 200
diff changeset
81 fcb C$CR
a4d2474884b4 Edition 6 now supports -d, -m, -h and -x options, more robust command line
boisy
parents: 200
diff changeset
82 ENDC
a4d2474884b4 Edition 6 now supports -d, -m, -h and -x options, more robust command line
boisy
parents: 200
diff changeset
83
921
617c1b90e623 Added DOHELP conditionals, set all to zero to eliminate help from commands
boisy
parents: 901
diff changeset
84 start stx <D.Prm
660
a4d2474884b4 Edition 6 now supports -d, -m, -h and -x options, more robust command line
boisy
parents: 200
diff changeset
85 clra
a4d2474884b4 Edition 6 now supports -d, -m, -h and -x options, more robust command line
boisy
parents: 200
diff changeset
86 sta <D.Hdr
a4d2474884b4 Edition 6 now supports -d, -m, -h and -x options, more robust command line
boisy
parents: 200
diff changeset
87 sta <D.Mem
a4d2474884b4 Edition 6 now supports -d, -m, -h and -x options, more robust command line
boisy
parents: 200
diff changeset
88 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
89 inca
a4d2474884b4 Edition 6 now supports -d, -m, -h and -x options, more robust command line
boisy
parents: 200
diff changeset
90 sta <Mode READ.
a4d2474884b4 Edition 6 now supports -d, -m, -h and -x options, more robust command line
boisy
parents: 200
diff changeset
91
a4d2474884b4 Edition 6 now supports -d, -m, -h and -x options, more robust command line
boisy
parents: 200
diff changeset
92 IFNE DOSCSIZ
945
707940712718 Fixed small screen output problems
boisy
parents: 921
diff changeset
93 clr <narrow assume wide
660
a4d2474884b4 Edition 6 now supports -d, -m, -h and -x options, more robust command line
boisy
parents: 200
diff changeset
94
a4d2474884b4 Edition 6 now supports -d, -m, -h and -x options, more robust command line
boisy
parents: 200
diff changeset
95 * Check screen size
a4d2474884b4 Edition 6 now supports -d, -m, -h and -x options, more robust command line
boisy
parents: 200
diff changeset
96 ldb #SS.ScSiz
a4d2474884b4 Edition 6 now supports -d, -m, -h and -x options, more robust command line
boisy
parents: 200
diff changeset
97 os9 I$GetStt
a4d2474884b4 Edition 6 now supports -d, -m, -h and -x options, more robust command line
boisy
parents: 200
diff changeset
98 bcs Pass1
a4d2474884b4 Edition 6 now supports -d, -m, -h and -x options, more robust command line
boisy
parents: 200
diff changeset
99
945
707940712718 Fixed small screen output problems
boisy
parents: 921
diff changeset
100 cmpx #titlelen+1
660
a4d2474884b4 Edition 6 now supports -d, -m, -h and -x options, more robust command line
boisy
parents: 200
diff changeset
101 bge PrePass
a4d2474884b4 Edition 6 now supports -d, -m, -h and -x options, more robust command line
boisy
parents: 200
diff changeset
102
945
707940712718 Fixed small screen output problems
boisy
parents: 921
diff changeset
103 sta <narrow
660
a4d2474884b4 Edition 6 now supports -d, -m, -h and -x options, more robust command line
boisy
parents: 200
diff changeset
104
a4d2474884b4 Edition 6 now supports -d, -m, -h and -x options, more robust command line
boisy
parents: 200
diff changeset
105 PrePass ldx <D.Prm
a4d2474884b4 Edition 6 now supports -d, -m, -h and -x options, more robust command line
boisy
parents: 200
diff changeset
106 ENDC
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
107
660
a4d2474884b4 Edition 6 now supports -d, -m, -h and -x options, more robust command line
boisy
parents: 200
diff changeset
108 * Pass1 - process any options
a4d2474884b4 Edition 6 now supports -d, -m, -h and -x options, more robust command line
boisy
parents: 200
diff changeset
109 * Entry: X = ptr to cmd line
a4d2474884b4 Edition 6 now supports -d, -m, -h and -x options, more robust command line
boisy
parents: 200
diff changeset
110 Pass1
a4d2474884b4 Edition 6 now supports -d, -m, -h and -x options, more robust command line
boisy
parents: 200
diff changeset
111 * Skip over spaces
a4d2474884b4 Edition 6 now supports -d, -m, -h and -x options, more robust command line
boisy
parents: 200
diff changeset
112 lda ,x+
a4d2474884b4 Edition 6 now supports -d, -m, -h and -x options, more robust command line
boisy
parents: 200
diff changeset
113 cmpa #C$SPAC
a4d2474884b4 Edition 6 now supports -d, -m, -h and -x options, more robust command line
boisy
parents: 200
diff changeset
114 beq Pass1
a4d2474884b4 Edition 6 now supports -d, -m, -h and -x options, more robust command line
boisy
parents: 200
diff changeset
115
a4d2474884b4 Edition 6 now supports -d, -m, -h and -x options, more robust command line
boisy
parents: 200
diff changeset
116 * Check for EOL
a4d2474884b4 Edition 6 now supports -d, -m, -h and -x options, more robust command line
boisy
parents: 200
diff changeset
117 cmpa #C$CR
a4d2474884b4 Edition 6 now supports -d, -m, -h and -x options, more robust command line
boisy
parents: 200
diff changeset
118 beq Pass2
a4d2474884b4 Edition 6 now supports -d, -m, -h and -x options, more robust command line
boisy
parents: 200
diff changeset
119
a4d2474884b4 Edition 6 now supports -d, -m, -h and -x options, more robust command line
boisy
parents: 200
diff changeset
120 * Check for option
a4d2474884b4 Edition 6 now supports -d, -m, -h and -x options, more robust command line
boisy
parents: 200
diff changeset
121 cmpa #'-
a4d2474884b4 Edition 6 now supports -d, -m, -h and -x options, more robust command line
boisy
parents: 200
diff changeset
122 bne Pass1
a4d2474884b4 Edition 6 now supports -d, -m, -h and -x options, more robust command line
boisy
parents: 200
diff changeset
123
a4d2474884b4 Edition 6 now supports -d, -m, -h and -x options, more robust command line
boisy
parents: 200
diff changeset
124 * Here, X points to an option char
a4d2474884b4 Edition 6 now supports -d, -m, -h and -x options, more robust command line
boisy
parents: 200
diff changeset
125 OptPass lda ,x+
a4d2474884b4 Edition 6 now supports -d, -m, -h and -x options, more robust command line
boisy
parents: 200
diff changeset
126 cmpa #C$SPAC
a4d2474884b4 Edition 6 now supports -d, -m, -h and -x options, more robust command line
boisy
parents: 200
diff changeset
127 beq Pass1
a4d2474884b4 Edition 6 now supports -d, -m, -h and -x options, more robust command line
boisy
parents: 200
diff changeset
128 cmpa #C$CR
a4d2474884b4 Edition 6 now supports -d, -m, -h and -x options, more robust command line
boisy
parents: 200
diff changeset
129 beq Pass2
a4d2474884b4 Edition 6 now supports -d, -m, -h and -x options, more robust command line
boisy
parents: 200
diff changeset
130
a4d2474884b4 Edition 6 now supports -d, -m, -h and -x options, more robust command line
boisy
parents: 200
diff changeset
131 anda #$DF
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
945
707940712718 Fixed small screen output problems
boisy
parents: 921
diff changeset
211 DumpFile tst <D.Mem
660
a4d2474884b4 Edition 6 now supports -d, -m, -h and -x options, more robust command line
boisy
parents: 200
diff changeset
212 bne mlink
a4d2474884b4 Edition 6 now supports -d, -m, -h and -x options, more robust command line
boisy
parents: 200
diff changeset
213 lda <Mode
945
707940712718 Fixed small screen output problems
boisy
parents: 921
diff changeset
214 opath tfr x,y
707940712718 Fixed small screen output problems
boisy
parents: 921
diff changeset
215 os9 I$Open
901
8786f4894882 Removed -d option
boisy
parents: 886
diff changeset
216 bcc DumpIn
945
707940712718 Fixed small screen output problems
boisy
parents: 921
diff changeset
217 tfr y,x
901
8786f4894882 Removed -d option
boisy
parents: 886
diff changeset
218 ora #DIR. try directory mode
8786f4894882 Removed -d option
boisy
parents: 886
diff changeset
219 os9 I$Open open it
8786f4894882 Removed -d option
boisy
parents: 886
diff changeset
220 bcs DoExit branch if error
660
a4d2474884b4 Edition 6 now supports -d, -m, -h and -x options, more robust command line
boisy
parents: 200
diff changeset
221 DumpIn stx <D.Prm
a4d2474884b4 Edition 6 now supports -d, -m, -h and -x options, more robust command line
boisy
parents: 200
diff changeset
222 sta <D.Opn
a4d2474884b4 Edition 6 now supports -d, -m, -h and -x options, more robust command line
boisy
parents: 200
diff changeset
223 ldx <D.Beg
a4d2474884b4 Edition 6 now supports -d, -m, -h and -x options, more robust command line
boisy
parents: 200
diff changeset
224 ldd M$Size,x
a4d2474884b4 Edition 6 now supports -d, -m, -h and -x options, more robust command line
boisy
parents: 200
diff changeset
225 leax d,x
a4d2474884b4 Edition 6 now supports -d, -m, -h and -x options, more robust command line
boisy
parents: 200
diff changeset
226 stx <D.End
a4d2474884b4 Edition 6 now supports -d, -m, -h and -x options, more robust command line
boisy
parents: 200
diff changeset
227 clra
a4d2474884b4 Edition 6 now supports -d, -m, -h and -x options, more robust command line
boisy
parents: 200
diff changeset
228 clrb
a4d2474884b4 Edition 6 now supports -d, -m, -h and -x options, more robust command line
boisy
parents: 200
diff changeset
229 tfr d,x
a4d2474884b4 Edition 6 now supports -d, -m, -h and -x options, more robust command line
boisy
parents: 200
diff changeset
230 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
231 bcc notbg
a4d2474884b4 Edition 6 now supports -d, -m, -h and -x options, more robust command line
boisy
parents: 200
diff changeset
232 leax 1,x
a4d2474884b4 Edition 6 now supports -d, -m, -h and -x options, more robust command line
boisy
parents: 200
diff changeset
233 notbg stx <D.Adr
a4d2474884b4 Edition 6 now supports -d, -m, -h and -x options, more robust command line
boisy
parents: 200
diff changeset
234 tst <D.Hdr
a4d2474884b4 Edition 6 now supports -d, -m, -h and -x options, more robust command line
boisy
parents: 200
diff changeset
235 bne nohed
a4d2474884b4 Edition 6 now supports -d, -m, -h and -x options, more robust command line
boisy
parents: 200
diff changeset
236 IFNE DOSCSIZ
945
707940712718 Fixed small screen output problems
boisy
parents: 921
diff changeset
237 tst <narrow
707940712718 Fixed small screen output problems
boisy
parents: 921
diff changeset
238 beq flpag
660
a4d2474884b4 Edition 6 now supports -d, -m, -h and -x options, more robust command line
boisy
parents: 200
diff changeset
239 aslb
a4d2474884b4 Edition 6 now supports -d, -m, -h and -x options, more robust command line
boisy
parents: 200
diff changeset
240 ENDC
a4d2474884b4 Edition 6 now supports -d, -m, -h and -x options, more robust command line
boisy
parents: 200
diff changeset
241 flpag tstb
a4d2474884b4 Edition 6 now supports -d, -m, -h and -x options, more robust command line
boisy
parents: 200
diff changeset
242 bne nohed
1002
b8608857a4a2 Fixed header problem
boisy
parents: 945
diff changeset
243 lbsr iseof
b8608857a4a2 Fixed header problem
boisy
parents: 945
diff changeset
244 bcc flpag2
b8608857a4a2 Fixed header problem
boisy
parents: 945
diff changeset
245 ldx <D.Prm
b8608857a4a2 Fixed header problem
boisy
parents: 945
diff changeset
246 rts
b8608857a4a2 Fixed header problem
boisy
parents: 945
diff changeset
247 flpag2 leax caret,pcr
660
a4d2474884b4 Edition 6 now supports -d, -m, -h and -x options, more robust command line
boisy
parents: 200
diff changeset
248 lbsr print
a4d2474884b4 Edition 6 now supports -d, -m, -h and -x options, more robust command line
boisy
parents: 200
diff changeset
249 ldb #16
a4d2474884b4 Edition 6 now supports -d, -m, -h and -x options, more robust command line
boisy
parents: 200
diff changeset
250 leax title,pcr
a4d2474884b4 Edition 6 now supports -d, -m, -h and -x options, more robust command line
boisy
parents: 200
diff changeset
251 leay flund,pcr
a4d2474884b4 Edition 6 now supports -d, -m, -h and -x options, more robust command line
boisy
parents: 200
diff changeset
252 IFNE DOSCSIZ
945
707940712718 Fixed small screen output problems
boisy
parents: 921
diff changeset
253 tst <narrow
707940712718 Fixed small screen output problems
boisy
parents: 921
diff changeset
254 beq doprt
660
a4d2474884b4 Edition 6 now supports -d, -m, -h and -x options, more robust command line
boisy
parents: 200
diff changeset
255 ldb #8
a4d2474884b4 Edition 6 now supports -d, -m, -h and -x options, more robust command line
boisy
parents: 200
diff changeset
256 leax short,pcr
a4d2474884b4 Edition 6 now supports -d, -m, -h and -x options, more robust command line
boisy
parents: 200
diff changeset
257 leay shund,pcr
a4d2474884b4 Edition 6 now supports -d, -m, -h and -x options, more robust command line
boisy
parents: 200
diff changeset
258 ENDC
a4d2474884b4 Edition 6 now supports -d, -m, -h and -x options, more robust command line
boisy
parents: 200
diff changeset
259 doprt pshs y
a4d2474884b4 Edition 6 now supports -d, -m, -h and -x options, more robust command line
boisy
parents: 200
diff changeset
260 clra
a4d2474884b4 Edition 6 now supports -d, -m, -h and -x options, more robust command line
boisy
parents: 200
diff changeset
261 std <D.Len
a4d2474884b4 Edition 6 now supports -d, -m, -h and -x options, more robust command line
boisy
parents: 200
diff changeset
262 bsr print
a4d2474884b4 Edition 6 now supports -d, -m, -h and -x options, more robust command line
boisy
parents: 200
diff changeset
263 puls x
a4d2474884b4 Edition 6 now supports -d, -m, -h and -x options, more robust command line
boisy
parents: 200
diff changeset
264 bsr print
a4d2474884b4 Edition 6 now supports -d, -m, -h and -x options, more robust command line
boisy
parents: 200
diff changeset
265 nohed leax Txtbuf,u
a4d2474884b4 Edition 6 now supports -d, -m, -h and -x options, more robust command line
boisy
parents: 200
diff changeset
266 stx <D.Ptr
a4d2474884b4 Edition 6 now supports -d, -m, -h and -x options, more robust command line
boisy
parents: 200
diff changeset
267 ldb <D.Len+1
a4d2474884b4 Edition 6 now supports -d, -m, -h and -x options, more robust command line
boisy
parents: 200
diff changeset
268 lda #3
a4d2474884b4 Edition 6 now supports -d, -m, -h and -x options, more robust command line
boisy
parents: 200
diff changeset
269 mul
a4d2474884b4 Edition 6 now supports -d, -m, -h and -x options, more robust command line
boisy
parents: 200
diff changeset
270 addd #2
1002
b8608857a4a2 Fixed header problem
boisy
parents: 945
diff changeset
271 IFNE DOSCSIZ
945
707940712718 Fixed small screen output problems
boisy
parents: 921
diff changeset
272 tst <narrow
707940712718 Fixed small screen output problems
boisy
parents: 921
diff changeset
273 beq leayit
707940712718 Fixed small screen output problems
boisy
parents: 921
diff changeset
274 subd #4
1002
b8608857a4a2 Fixed header problem
boisy
parents: 945
diff changeset
275 ENDC
945
707940712718 Fixed small screen output problems
boisy
parents: 921
diff changeset
276 leayit leay d,x
660
a4d2474884b4 Edition 6 now supports -d, -m, -h and -x options, more robust command line
boisy
parents: 200
diff changeset
277 sty <D.Txt
a4d2474884b4 Edition 6 now supports -d, -m, -h and -x options, more robust command line
boisy
parents: 200
diff changeset
278 lda #C$SPAC
a4d2474884b4 Edition 6 now supports -d, -m, -h and -x options, more robust command line
boisy
parents: 200
diff changeset
279 ldb #BUFSZ-1
a4d2474884b4 Edition 6 now supports -d, -m, -h and -x options, more robust command line
boisy
parents: 200
diff changeset
280 clbuf sta b,x
a4d2474884b4 Edition 6 now supports -d, -m, -h and -x options, more robust command line
boisy
parents: 200
diff changeset
281 decb
a4d2474884b4 Edition 6 now supports -d, -m, -h and -x options, more robust command line
boisy
parents: 200
diff changeset
282 bpl clbuf
a4d2474884b4 Edition 6 now supports -d, -m, -h and -x options, more robust command line
boisy
parents: 200
diff changeset
283 ldb #D.Adr
1002
b8608857a4a2 Fixed header problem
boisy
parents: 945
diff changeset
284 IFNE DOSCSIZ
945
707940712718 Fixed small screen output problems
boisy
parents: 921
diff changeset
285 tst <narrow
707940712718 Fixed small screen output problems
boisy
parents: 921
diff changeset
286 beq adlop
707940712718 Fixed small screen output problems
boisy
parents: 921
diff changeset
287 incb we skip first two bytes ...
707940712718 Fixed small screen output problems
boisy
parents: 921
diff changeset
288 incb ... if on a narrow screen
1002
b8608857a4a2 Fixed header problem
boisy
parents: 945
diff changeset
289 ENDC
660
a4d2474884b4 Edition 6 now supports -d, -m, -h and -x options, more robust command line
boisy
parents: 200
diff changeset
290 adlop lda b,u
a4d2474884b4 Edition 6 now supports -d, -m, -h and -x options, more robust command line
boisy
parents: 200
diff changeset
291 lbsr onbyt
a4d2474884b4 Edition 6 now supports -d, -m, -h and -x options, more robust command line
boisy
parents: 200
diff changeset
292 incb
a4d2474884b4 Edition 6 now supports -d, -m, -h and -x options, more robust command line
boisy
parents: 200
diff changeset
293 cmpb #D.Adr+4
a4d2474884b4 Edition 6 now supports -d, -m, -h and -x options, more robust command line
boisy
parents: 200
diff changeset
294 bne adlop
a4d2474884b4 Edition 6 now supports -d, -m, -h and -x options, more robust command line
boisy
parents: 200
diff changeset
295 ldx <D.Ptr
a4d2474884b4 Edition 6 now supports -d, -m, -h and -x options, more robust command line
boisy
parents: 200
diff changeset
296 leax 1,x
a4d2474884b4 Edition 6 now supports -d, -m, -h and -x options, more robust command line
boisy
parents: 200
diff changeset
297 stx <D.Ptr
a4d2474884b4 Edition 6 now supports -d, -m, -h and -x options, more robust command line
boisy
parents: 200
diff changeset
298 bsr readi
a4d2474884b4 Edition 6 now supports -d, -m, -h and -x options, more robust command line
boisy
parents: 200
diff changeset
299 bcs eofck
a4d2474884b4 Edition 6 now supports -d, -m, -h and -x options, more robust command line
boisy
parents: 200
diff changeset
300 onlin lbsr onchr
a4d2474884b4 Edition 6 now supports -d, -m, -h and -x options, more robust command line
boisy
parents: 200
diff changeset
301 decb
a4d2474884b4 Edition 6 now supports -d, -m, -h and -x options, more robust command line
boisy
parents: 200
diff changeset
302 ble enlin
a4d2474884b4 Edition 6 now supports -d, -m, -h and -x options, more robust command line
boisy
parents: 200
diff changeset
303 lbsr onchr
a4d2474884b4 Edition 6 now supports -d, -m, -h and -x options, more robust command line
boisy
parents: 200
diff changeset
304 decb
a4d2474884b4 Edition 6 now supports -d, -m, -h and -x options, more robust command line
boisy
parents: 200
diff changeset
305 ble enlin
1002
b8608857a4a2 Fixed header problem
boisy
parents: 945
diff changeset
306 IFNE DOSCSIZ
945
707940712718 Fixed small screen output problems
boisy
parents: 921
diff changeset
307 tst <narrow
707940712718 Fixed small screen output problems
boisy
parents: 921
diff changeset
308 bne onlin
1002
b8608857a4a2 Fixed header problem
boisy
parents: 945
diff changeset
309 ENDC
660
a4d2474884b4 Edition 6 now supports -d, -m, -h and -x options, more robust command line
boisy
parents: 200
diff changeset
310 lda #C$SPAC
1002
b8608857a4a2 Fixed header problem
boisy
parents: 945
diff changeset
311 lbsr savec
660
a4d2474884b4 Edition 6 now supports -d, -m, -h and -x options, more robust command line
boisy
parents: 200
diff changeset
312 bra onlin
a4d2474884b4 Edition 6 now supports -d, -m, -h and -x options, more robust command line
boisy
parents: 200
diff changeset
313 enlin lda #C$CR
a4d2474884b4 Edition 6 now supports -d, -m, -h and -x options, more robust command line
boisy
parents: 200
diff changeset
314 ldx <D.Txt
a4d2474884b4 Edition 6 now supports -d, -m, -h and -x options, more robust command line
boisy
parents: 200
diff changeset
315 sta ,x
a4d2474884b4 Edition 6 now supports -d, -m, -h and -x options, more robust command line
boisy
parents: 200
diff changeset
316 leax Txtbuf,u
a4d2474884b4 Edition 6 now supports -d, -m, -h and -x options, more robust command line
boisy
parents: 200
diff changeset
317 bsr print
a4d2474884b4 Edition 6 now supports -d, -m, -h and -x options, more robust command line
boisy
parents: 200
diff changeset
318 ldd <D.Adr+2
a4d2474884b4 Edition 6 now supports -d, -m, -h and -x options, more robust command line
boisy
parents: 200
diff changeset
319 ldx <D.Adr
a4d2474884b4 Edition 6 now supports -d, -m, -h and -x options, more robust command line
boisy
parents: 200
diff changeset
320 addd <D.Len
a4d2474884b4 Edition 6 now supports -d, -m, -h and -x options, more robust command line
boisy
parents: 200
diff changeset
321 lbra onpas
a4d2474884b4 Edition 6 now supports -d, -m, -h and -x options, more robust command line
boisy
parents: 200
diff changeset
322 print ldy #BUFSZ
a4d2474884b4 Edition 6 now supports -d, -m, -h and -x options, more robust command line
boisy
parents: 200
diff changeset
323 lda #1
a4d2474884b4 Edition 6 now supports -d, -m, -h and -x options, more robust command line
boisy
parents: 200
diff changeset
324 os9 I$WritLn
a4d2474884b4 Edition 6 now supports -d, -m, -h and -x options, more robust command line
boisy
parents: 200
diff changeset
325 lbcs DoExit
a4d2474884b4 Edition 6 now supports -d, -m, -h and -x options, more robust command line
boisy
parents: 200
diff changeset
326 rts
a4d2474884b4 Edition 6 now supports -d, -m, -h and -x options, more robust command line
boisy
parents: 200
diff changeset
327 readi ldy <D.Len
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 tst <D.Mem
a4d2474884b4 Edition 6 now supports -d, -m, -h and -x options, more robust command line
boisy
parents: 200
diff changeset
330 bne redad
a4d2474884b4 Edition 6 now supports -d, -m, -h and -x options, more robust command line
boisy
parents: 200
diff changeset
331 leax Datbuf,u
a4d2474884b4 Edition 6 now supports -d, -m, -h and -x options, more robust command line
boisy
parents: 200
diff changeset
332 lda <D.Opn
a4d2474884b4 Edition 6 now supports -d, -m, -h and -x options, more robust command line
boisy
parents: 200
diff changeset
333 os9 I$Read
a4d2474884b4 Edition 6 now supports -d, -m, -h and -x options, more robust command line
boisy
parents: 200
diff changeset
334 bcs reded
a4d2474884b4 Edition 6 now supports -d, -m, -h and -x options, more robust command line
boisy
parents: 200
diff changeset
335 tfr y,d
a4d2474884b4 Edition 6 now supports -d, -m, -h and -x options, more robust command line
boisy
parents: 200
diff changeset
336 reded rts
1002
b8608857a4a2 Fixed header problem
boisy
parents: 945
diff changeset
337
b8608857a4a2 Fixed header problem
boisy
parents: 945
diff changeset
338 redad bsr iseofm
b8608857a4a2 Fixed header problem
boisy
parents: 945
diff changeset
339 bcc setct
660
a4d2474884b4 Edition 6 now supports -d, -m, -h and -x options, more robust command line
boisy
parents: 200
diff changeset
340 rts
a4d2474884b4 Edition 6 now supports -d, -m, -h and -x options, more robust command line
boisy
parents: 200
diff changeset
341 setct subd <D.Len
a4d2474884b4 Edition 6 now supports -d, -m, -h and -x options, more robust command line
boisy
parents: 200
diff changeset
342 bcs redof
a4d2474884b4 Edition 6 now supports -d, -m, -h and -x options, more robust command line
boisy
parents: 200
diff changeset
343 clra
a4d2474884b4 Edition 6 now supports -d, -m, -h and -x options, more robust command line
boisy
parents: 200
diff changeset
344 clrb
a4d2474884b4 Edition 6 now supports -d, -m, -h and -x options, more robust command line
boisy
parents: 200
diff changeset
345 redof addd <D.Len
a4d2474884b4 Edition 6 now supports -d, -m, -h and -x options, more robust command line
boisy
parents: 200
diff changeset
346 clr -1,s
a4d2474884b4 Edition 6 now supports -d, -m, -h and -x options, more robust command line
boisy
parents: 200
diff changeset
347 leay d,x
a4d2474884b4 Edition 6 now supports -d, -m, -h and -x options, more robust command line
boisy
parents: 200
diff changeset
348 sty <D.Beg
a4d2474884b4 Edition 6 now supports -d, -m, -h and -x options, more robust command line
boisy
parents: 200
diff changeset
349 rts
1002
b8608857a4a2 Fixed header problem
boisy
parents: 945
diff changeset
350
660
a4d2474884b4 Edition 6 now supports -d, -m, -h and -x options, more robust command line
boisy
parents: 200
diff changeset
351 eofck cmpb #E$EOF
a4d2474884b4 Edition 6 now supports -d, -m, -h and -x options, more robust command line
boisy
parents: 200
diff changeset
352 orcc #Carry
a4d2474884b4 Edition 6 now supports -d, -m, -h and -x options, more robust command line
boisy
parents: 200
diff changeset
353 lbne DoExit
a4d2474884b4 Edition 6 now supports -d, -m, -h and -x options, more robust command line
boisy
parents: 200
diff changeset
354 clrb
a4d2474884b4 Edition 6 now supports -d, -m, -h and -x options, more robust command line
boisy
parents: 200
diff changeset
355 ldx <D.Prm
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
356 rts
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
357
1002
b8608857a4a2 Fixed header problem
boisy
parents: 945
diff changeset
358 iseof tst <D.Mem
b8608857a4a2 Fixed header problem
boisy
parents: 945
diff changeset
359 bne iseofm
b8608857a4a2 Fixed header problem
boisy
parents: 945
diff changeset
360 lda <D.Opn
b8608857a4a2 Fixed header problem
boisy
parents: 945
diff changeset
361 ldb #SS.EOF
b8608857a4a2 Fixed header problem
boisy
parents: 945
diff changeset
362 os9 I$GetStt
b8608857a4a2 Fixed header problem
boisy
parents: 945
diff changeset
363 cmpb #E$EOF
b8608857a4a2 Fixed header problem
boisy
parents: 945
diff changeset
364 beq iseofex
b8608857a4a2 Fixed header problem
boisy
parents: 945
diff changeset
365 clrb
b8608857a4a2 Fixed header problem
boisy
parents: 945
diff changeset
366 iseofok rts
b8608857a4a2 Fixed header problem
boisy
parents: 945
diff changeset
367 iseofex orcc #Carry
b8608857a4a2 Fixed header problem
boisy
parents: 945
diff changeset
368 ldb #E$EOF
b8608857a4a2 Fixed header problem
boisy
parents: 945
diff changeset
369 rts
b8608857a4a2 Fixed header problem
boisy
parents: 945
diff changeset
370 iseofm ldd <D.End
b8608857a4a2 Fixed header problem
boisy
parents: 945
diff changeset
371 ldx <D.Beg
b8608857a4a2 Fixed header problem
boisy
parents: 945
diff changeset
372 subd <D.Beg
b8608857a4a2 Fixed header problem
boisy
parents: 945
diff changeset
373 beq iseofex
b8608857a4a2 Fixed header problem
boisy
parents: 945
diff changeset
374 andcc #^Carry
b8608857a4a2 Fixed header problem
boisy
parents: 945
diff changeset
375 rts
b8608857a4a2 Fixed header problem
boisy
parents: 945
diff changeset
376
660
a4d2474884b4 Edition 6 now supports -d, -m, -h and -x options, more robust command line
boisy
parents: 200
diff changeset
377 onibl anda #15
a4d2474884b4 Edition 6 now supports -d, -m, -h and -x options, more robust command line
boisy
parents: 200
diff changeset
378 cmpa #9
a4d2474884b4 Edition 6 now supports -d, -m, -h and -x options, more robust command line
boisy
parents: 200
diff changeset
379 bls nocom
a4d2474884b4 Edition 6 now supports -d, -m, -h and -x options, more robust command line
boisy
parents: 200
diff changeset
380 adda #7
a4d2474884b4 Edition 6 now supports -d, -m, -h and -x options, more robust command line
boisy
parents: 200
diff changeset
381 nocom adda #'0
a4d2474884b4 Edition 6 now supports -d, -m, -h and -x options, more robust command line
boisy
parents: 200
diff changeset
382 savec pshs x
a4d2474884b4 Edition 6 now supports -d, -m, -h and -x options, more robust command line
boisy
parents: 200
diff changeset
383 ldx <D.Ptr
a4d2474884b4 Edition 6 now supports -d, -m, -h and -x options, more robust command line
boisy
parents: 200
diff changeset
384 sta ,x+
a4d2474884b4 Edition 6 now supports -d, -m, -h and -x options, more robust command line
boisy
parents: 200
diff changeset
385 stx <D.Ptr
a4d2474884b4 Edition 6 now supports -d, -m, -h and -x options, more robust command line
boisy
parents: 200
diff changeset
386 puls x,pc
a4d2474884b4 Edition 6 now supports -d, -m, -h and -x options, more robust command line
boisy
parents: 200
diff changeset
387 onchr lda ,x+
a4d2474884b4 Edition 6 now supports -d, -m, -h and -x options, more robust command line
boisy
parents: 200
diff changeset
388 bsr onbyt
a4d2474884b4 Edition 6 now supports -d, -m, -h and -x options, more robust command line
boisy
parents: 200
diff changeset
389 pshs x,a
a4d2474884b4 Edition 6 now supports -d, -m, -h and -x options, more robust command line
boisy
parents: 200
diff changeset
390 anda #127
a4d2474884b4 Edition 6 now supports -d, -m, -h and -x options, more robust command line
boisy
parents: 200
diff changeset
391 cmpa #C$SPAC
a4d2474884b4 Edition 6 now supports -d, -m, -h and -x options, more robust command line
boisy
parents: 200
diff changeset
392 bcc savet
a4d2474884b4 Edition 6 now supports -d, -m, -h and -x options, more robust command line
boisy
parents: 200
diff changeset
393 lda #'.
a4d2474884b4 Edition 6 now supports -d, -m, -h and -x options, more robust command line
boisy
parents: 200
diff changeset
394 savet ldx <D.Txt
a4d2474884b4 Edition 6 now supports -d, -m, -h and -x options, more robust command line
boisy
parents: 200
diff changeset
395 sta ,x+
a4d2474884b4 Edition 6 now supports -d, -m, -h and -x options, more robust command line
boisy
parents: 200
diff changeset
396 stx <D.Txt
a4d2474884b4 Edition 6 now supports -d, -m, -h and -x options, more robust command line
boisy
parents: 200
diff changeset
397 puls a,x,pc
a4d2474884b4 Edition 6 now supports -d, -m, -h and -x options, more robust command line
boisy
parents: 200
diff changeset
398 onbyt pshs a
a4d2474884b4 Edition 6 now supports -d, -m, -h and -x options, more robust command line
boisy
parents: 200
diff changeset
399 lsra
a4d2474884b4 Edition 6 now supports -d, -m, -h and -x options, more robust command line
boisy
parents: 200
diff changeset
400 lsra
a4d2474884b4 Edition 6 now supports -d, -m, -h and -x options, more robust command line
boisy
parents: 200
diff changeset
401 lsra
a4d2474884b4 Edition 6 now supports -d, -m, -h and -x options, more robust command line
boisy
parents: 200
diff changeset
402 lsra
a4d2474884b4 Edition 6 now supports -d, -m, -h and -x options, more robust command line
boisy
parents: 200
diff changeset
403 bsr onibl
a4d2474884b4 Edition 6 now supports -d, -m, -h and -x options, more robust command line
boisy
parents: 200
diff changeset
404 lda ,s
a4d2474884b4 Edition 6 now supports -d, -m, -h and -x options, more robust command line
boisy
parents: 200
diff changeset
405 bsr onibl
a4d2474884b4 Edition 6 now supports -d, -m, -h and -x options, more robust command line
boisy
parents: 200
diff changeset
406 puls a,pc
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
407
660
a4d2474884b4 Edition 6 now supports -d, -m, -h and -x options, more robust command line
boisy
parents: 200
diff changeset
408 IFNE DOHELP
886
6393d53ce3c7 Fixed help to be consistent with other utils, set DOHELP to 0
boisy
parents: 785
diff changeset
409 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
410 fcb C$CR,C$LF
886
6393d53ce3c7 Fixed help to be consistent with other utils, set DOHELP to 0
boisy
parents: 785
diff changeset
411 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
412 fcb C$CR,C$LF
886
6393d53ce3c7 Fixed help to be consistent with other utils, set DOHELP to 0
boisy
parents: 785
diff changeset
413 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
414 fcb C$CR,C$LF
886
6393d53ce3c7 Fixed help to be consistent with other utils, set DOHELP to 0
boisy
parents: 785
diff changeset
415 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
416 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
417 HelpLen equ *-HelpMsg
a4d2474884b4 Edition 6 now supports -d, -m, -h and -x options, more robust command line
boisy
parents: 200
diff changeset
418 ENDC
a4d2474884b4 Edition 6 now supports -d, -m, -h and -x options, more robust command line
boisy
parents: 200
diff changeset
419
a4d2474884b4 Edition 6 now supports -d, -m, -h and -x options, more robust command line
boisy
parents: 200
diff changeset
420 emod
a4d2474884b4 Edition 6 now supports -d, -m, -h and -x options, more robust command line
boisy
parents: 200
diff changeset
421 length equ *
a4d2474884b4 Edition 6 now supports -d, -m, -h and -x options, more robust command line
boisy
parents: 200
diff changeset
422 end