aboutsummaryrefslogtreecommitdiff
path: root/development/dis6502/dis6502.rst
blob: dae1d3efd5fc5d6ba1b487c64fc8eb03387508fc (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
.. RST source for dis6502(1) man page. Convert with:
..   rst2man.py dis6502.rst > dis6502.1
.. rst2man.py comes from the SBo development/docutils package.

.. |version| replace:: 0.12
.. |date| date::

=======
dis6502
=======

----------------------------
Disassemble 6502 object code
----------------------------

:Manual section: 1
:Manual group: SlackBuilds.org
:Date: |date|
:Version: |version|

SYNOPSIS
========

dis6502 [*-b* | *-l* | *-c* | *-r <address>*] [*-a*] [*-p <pfile>*] [*-v <address>*] [*-7*] *file*

DESCRIPTION
===========

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.

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.

OPTIONS
=======

**-r** *<address*>
  *file* is raw binary, located at *<address>*.

**-b**
  *file* 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.

**-l**
  *file* is an Atari load file (aka XEX).

**-c**
  *file* is a Commodore 64 executable.

**-a**
  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.

**-p** *<pfile>*
  Use predefinition file. See **FILE FORMAT** for the predef file format.
  Up to 10 **-p** options may be included.

**-v** *<address>*
  Alternate vector address (normally **$FFFA**). This option only has
  any effect with raw binaries (**-r** option).

**-7**
  Mask character data to 7-bit.

FILES
=====

**/usr/share/dis6502/atari8.predef**

**/usr/share/dis6502/c64.predef**

Predefinition files for Atari 8-bit and Commodore 64, containing the usual
system equates.

FILE FORMAT
===========

Lines in a predefinition file consist of:

**label** .eq *address*

**label** .equ *address*

  Defines a label. The **.eq** and **.equ** forms are equivalent.

**.jtab2** *lowaddr,hiaddr,count*

  Defines a table of *count* pointers, split into low and
  high byte tables. In assembly code, such a table might look like::

    ; func1, func2, func3 are addresses.
    table_lo: .byte <func1, <func2, <func3
    table_hi: .byte >func1, >func2, >func3

  To disassemble these, assuming the address of *table_lo* is **$1000**,
  use::

    .jtab2 $1000,$1003,3

**.rtstab** *lowaddr*\,*hiaddr*\,*count*

  Like **.jtab2**, but each entry contains the target address minus one, for use with RTS.

**.trace** *address*

  Causes the trace process to continue at *address*.

**.stop** *address*

  Causes the trace process to stop at *address*.

COPYRIGHT
=========

dis6502 is distributed under the terms of the Free Software Foundation's
General Public License, Version 2. See the file
/usr/doc/dis6502-|version|/COPYING for license information.

AUTHORS
=======

dis6502 was written by Robert Bond, Udi Finkelstein, and Eric Smith.

This man page written for the SlackBuilds.org project
by B. Watson, and is licensed under the WTFPL.

SEE ALSO
========

dis(1), da65(1)

The dis6502 homepage: http://www.brouhaha.com/~eric/software/dis6502/