3 .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author]
4 .\" Generator: DocBook XSL Stylesheets v1.78.1 <http://docbook.sf.net/>
6 .\" Manual: The Netwide Assembler Project
10 .TH "NDISASM" "1" "04/20/2013" "NASM" "The Netwide Assembler Project"
11 .\" -----------------------------------------------------------------
12 .\" * Define some portability stuff
13 .\" -----------------------------------------------------------------
14 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
15 .\" http://bugs.debian.org/507673
16 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
17 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
20 .\" -----------------------------------------------------------------
21 .\" * set default formatting
22 .\" -----------------------------------------------------------------
23 .\" disable hyphenation
25 .\" disable justification (adjust text to left margin only)
27 .\" -----------------------------------------------------------------
28 .\" * MAIN CONTENT STARTS HERE *
29 .\" -----------------------------------------------------------------
31 ndisasm \- the Netwide Disassembler, an 80x86 binary file disassembler
34 \fBndisasm\fR [ \fB\-o\fR origin ] [ \fB\-s\fR sync\-point [\&...]] [ \fB\-a\fR | \fB\-i\fR ] [ \fB\-b\fR bits ] [ \fB\-u\fR ] [ \fB\-e\fR hdrlen ] [ \fB\-p\fR vendor ] [ \fB\-k\fR offset,length [\&...]] infile
37 The \fBndisasm\fR command generates a disassembly listing of the binary file infile and directs it to stdout\&.
44 to exit immediately, after giving a summary of its invocation options\&.
51 to exit immediately, after displaying its version number\&.
54 \fB\-o\fR \fIorigin\fR
56 Specifies the notional load address for the file\&. This option causes
58 to get the addresses it lists down the left hand margin, and the target addresses of PC\-relative jumps and calls, right\&.
61 \fB\-s\fR \fIsync\-point\fR
63 Manually specifies a synchronisation address, such that
65 will not output any machine instruction which encompasses bytes on both sides of the address\&. Hence the instruction which starts at that address will be correctly disassembled\&.
68 \fB\-e\fR \fIhdrlen\fR
70 Specifies a number of bytes to discard from the beginning of the file before starting disassembly\&. This does not count towards the calculation of the disassembly offset: the first
72 instruction will be shown starting at the given load address\&.
75 \fB\-k\fR \fIoffset,length\fR
79 bytes, starting from disassembly offset
80 \fIoffset\fR, should be skipped over without generating any output\&. The skipped bytes still count towards the calculation of the disassembly offset\&.
85 Enables automatic (or intelligent) sync mode, in which
87 will attempt to guess where synchronisation should be performed, by means of examining the target addresses of the relative jumps and calls it disassembles\&.
92 Specifies 16\-, 32\- or 64\-bit mode\&. The default is 16\-bit mode\&.
97 Specifies 32\-bit mode, more compactly than using \(oq\-b 32\(cq\&.
100 \fB\-p\fR \fIvendor\fR
102 Prefers instructions as defined by
104 in case of a conflict\&. Known
110 \fBidt\fR\&. The default is
115 \fBndisasm\fR only disassembles binary files: it has no understanding of the header information present in object or executable files\&. If you want to disassemble an object file, you should probably be using \fBobjdump\fR(1)\&.
117 Auto\-sync mode won\(cqt necessarily cure all your synchronisation problems: a sync marker can only be placed automatically if a jump or call instruction is found to refer to it \fIbefore\fR \fBndisasm\fR actually disassembles that part of the code\&. Also, if spurious jumps or calls result from disassembling non\-machine\-code data, sync markers may get placed in strange places\&. Feel free to turn auto\-sync off and go back to doing it manually if necessary\&.