aboutsummaryrefslogtreecommitdiff
path: root/development/dis6502/dis6502.1
blob: 458f8fd3835e0b31158e4a824219f44c596ad5f8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
.\" Man page generated from reStructuredText.
.
.TH DIS6502 1 "2017-09-08" "0.12" "SlackBuilds.org"
.SH NAME
dis6502 \- Disassemble 6502 object code
.
.nr rst2man-indent-level 0
.
.de1 rstReportMargin
\\$1 \\n[an-margin]
level \\n[rst2man-indent-level]
level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
-
\\n[rst2man-indent0]
\\n[rst2man-indent1]
\\n[rst2man-indent2]
..
.de1 INDENT
.\" .rstReportMargin pre:
. RS \\$1
. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
. nr rst2man-indent-level +1
.\" .rstReportMargin post:
..
.de UNINDENT
. RE
.\" indent \\n[an-margin]
.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
.nr rst2man-indent-level -1
.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
..
.\" RST source for dis6502(1) man page. Convert with:
.
.\" rst2man.py dis6502.rst > dis6502.1
.
.\" rst2man.py comes from the SBo development/docutils package.
.
.SH SYNOPSIS
.sp
dis6502 [\fI\-b\fP | \fI\-l\fP | \fI\-c\fP | \fI\-r <address>\fP] [\fI\-a\fP] [\fI\-p <pfile>\fP] [\fI\-v <address>\fP] [\fI\-7\fP] \fIfile\fP
.SH DESCRIPTION
.sp
Dis6502 disassembles 6502 binary files. Binary formats understood include
Atari binary files (L menu command) and boot files. Equate and control
files can be included via the option to name well known locations and to
control the disassembly process. The output includes a cross reference.
.sp
The disassembly process is a two pass operation: First the program flow
is traced starting with the init and run parameters in the file headers.
The dump routine then prints out the information.
.SH OPTIONS
.INDENT 0.0
.TP
.B \fB\-r\fP \fI<address\fP>
\fIfile\fP is raw binary, located at \fI<address>\fP\&.
.TP
.B \fB\-b\fP
\fIfile\fP is an Atari boot image (disk or cassette). Note that neither .ATR
nor .CAS images are supported: the file must be a raw image with no header
information. For disks, this is called an XFD file.
.TP
.B \fB\-l\fP
\fIfile\fP is an Atari load file (aka XEX).
.TP
.B \fB\-c\fP
\fIfile\fP is a Commodore 64 executable.
.TP
.B \fB\-a\fP
Generate assembly output. Suppresses the addresses and object
code normally printed on each line of output, and omits the
cross\-reference section from the end of the output.
.TP
.B \fB\-p\fP \fI<pfile>\fP
Use predefinition file. See \fBFILE FORMAT\fP for the predef file format.
Up to 10 \fB\-p\fP options may be included.
.TP
.B \fB\-v\fP \fI<address>\fP
Alternate vector address (normally \fB$FFFA\fP). This option only has
any effect with raw binaries (\fB\-r\fP option).
.TP
.B \fB\-7\fP
Mask character data to 7\-bit.
.UNINDENT
.SH FILES
.sp
\fB/usr/share/dis6502/atari8.predef\fP
.sp
\fB/usr/share/dis6502/c64.predef\fP
.sp
Predefinition files for Atari 8\-bit and Commodore 64, containing the usual
system equates.
.SH FILE FORMAT
.sp
Lines in a predefinition file consist of:
.sp
\fBlabel\fP .eq \fIaddress\fP
.sp
\fBlabel\fP .equ \fIaddress\fP
.INDENT 0.0
.INDENT 3.5
Defines a label. The \fB\&.eq\fP and \fB\&.equ\fP forms are equivalent.
.UNINDENT
.UNINDENT
.sp
\fB\&.jtab2\fP \fIlowaddr,hiaddr,count\fP
.INDENT 0.0
.INDENT 3.5
Defines a table of \fIcount\fP pointers, split into low and
high byte tables. In assembly code, such a table might look like:
.INDENT 0.0
.INDENT 3.5
.sp
.nf
.ft C
; func1, func2, func3 are addresses.
table_lo: .byte <func1, <func2, <func3
table_hi: .byte >func1, >func2, >func3
.ft P
.fi
.UNINDENT
.UNINDENT
.sp
To disassemble these, assuming the address of \fItable_lo\fP is \fB$1000\fP,
use:
.INDENT 0.0
.INDENT 3.5
.sp
.nf
.ft C
\&.jtab2 $1000,$1003,3
.ft P
.fi
.UNINDENT
.UNINDENT
.UNINDENT
.UNINDENT
.sp
\fB\&.rtstab\fP \fIlowaddr\fP,*hiaddr*,*count*
.INDENT 0.0
.INDENT 3.5
Like \fB\&.jtab2\fP, but each entry contains the target address minus one, for use with RTS.
.UNINDENT
.UNINDENT
.sp
\fB\&.trace\fP \fIaddress\fP
.INDENT 0.0
.INDENT 3.5
Causes the trace process to continue at \fIaddress\fP\&.
.UNINDENT
.UNINDENT
.sp
\fB\&.stop\fP \fIaddress\fP
.INDENT 0.0
.INDENT 3.5
Causes the trace process to stop at \fIaddress\fP\&.
.UNINDENT
.UNINDENT
.SH COPYRIGHT
.sp
dis6502 is distributed under the terms of the Free Software Foundation\(aqs
General Public License, Version 2. See the file
/usr/doc/dis6502\-0.12/COPYING for license information.
.SH AUTHORS
.sp
dis6502 was written by Robert Bond, Udi Finkelstein, and Eric Smith.
.sp
This man page written for the SlackBuilds.org project
by B. Watson, and is licensed under the WTFPL.
.SH SEE ALSO
.sp
dis(1), da65(1)
.sp
The dis6502 homepage: \fI\%http://www.brouhaha.com/~eric/software/dis6502/\fP
.\" Generated by docutils manpage writer.
.