Blame ndisasm.txt

Packit Service 3b8507
ndisasm(1)
Packit Service 3b8507
==========
Packit Service 3b8507
:doctype:	manpage
Packit Service 3b8507
:man source:	NASM
Packit Service 3b8507
:man manual:	The Netwide Assembler Project
Packit Service 3b8507
Packit Service 3b8507
NAME
Packit Service 3b8507
----
Packit Service 3b8507
ndisasm - the Netwide Disassembler, an 80x86 binary file disassembler
Packit Service 3b8507
Packit Service 3b8507
SYNOPSIS
Packit Service 3b8507
--------
Packit Service 3b8507
*ndisasm* [ *-o* origin ] [ *-s* sync-point [...]] [ *-a* | *-i* ]
Packit Service 3b8507
	[ *-b* bits ] [ *-u* ] [ *-e* hdrlen ] [ *-p* vendor ]
Packit Service 3b8507
	[ *-k* offset,length [...]] infile
Packit Service 3b8507
Packit Service 3b8507
DESCRIPTION
Packit Service 3b8507
-----------
Packit Service 3b8507
The *ndisasm* command generates a disassembly listing of the binary file
Packit Service 3b8507
infile and directs it to stdout.
Packit Service 3b8507
Packit Service 3b8507
OPTIONS
Packit Service 3b8507
-------
Packit Service 3b8507
*-h*::
Packit Service 3b8507
	Causes *ndisasm* to exit immediately, after giving a summary
Packit Service 3b8507
	of its invocation options.
Packit Service 3b8507
Packit Service 3b8507
*-r*|*-v*::
Packit Service 3b8507
	Causes *ndisasm* to exit immediately, after displaying its
Packit Service 3b8507
	version number.
Packit Service 3b8507
Packit Service 3b8507
*-o* 'origin'::
Packit Service 3b8507
	Specifies the notional load address for the file. This
Packit Service 3b8507
	option causes *ndisasm* to get the addresses it lists
Packit Service 3b8507
	down the left hand margin, and the target addresses
Packit Service 3b8507
	of PC-relative jumps and calls, right.
Packit Service 3b8507
Packit Service 3b8507
*-s* 'sync-point'::
Packit Service 3b8507
	Manually specifies a synchronisation address, such that
Packit Service 3b8507
	*ndisasm* will not output any machine instruction which
Packit Service 3b8507
	encompasses bytes on both sides of the address. Hence
Packit Service 3b8507
	the instruction which starts at that address will be
Packit Service 3b8507
	correctly disassembled.
Packit Service 3b8507
Packit Service 3b8507
*-e* 'hdrlen'::
Packit Service 3b8507
	Specifies a number of bytes to discard from the beginning
Packit Service 3b8507
	of the file before starting disassembly. This does not
Packit Service 3b8507
	count towards the calculation of the disassembly offset:
Packit Service 3b8507
	the first 'disassembled' instruction will be shown starting
Packit Service 3b8507
	at the given load address.
Packit Service 3b8507
Packit Service 3b8507
*-k* 'offset,length'::
Packit Service 3b8507
	Specifies that 'length' bytes, starting from disassembly
Packit Service 3b8507
	offset 'offset', should be skipped over without generating
Packit Service 3b8507
	any output. The skipped bytes still count towards the
Packit Service 3b8507
	calculation of the disassembly offset.
Packit Service 3b8507
Packit Service 3b8507
*-a*|*-i*::
Packit Service 3b8507
	Enables automatic (or intelligent) sync mode, in which
Packit Service 3b8507
	*ndisasm* will attempt to guess where synchronisation should
Packit Service 3b8507
	be performed, by means of examining the target addresses
Packit Service 3b8507
	of the relative jumps and calls it disassembles.
Packit Service 3b8507
Packit Service 3b8507
*-b* 'bits'::
Packit Service 3b8507
	Specifies 16-, 32- or 64-bit mode. The default is 16-bit
Packit Service 3b8507
	mode.
Packit Service 3b8507
Packit Service 3b8507
*-u*::
Packit Service 3b8507
	Specifies 32-bit mode, more compactly than using `-b 32'.
Packit Service 3b8507
Packit Service 3b8507
*-p* 'vendor'::
Packit Service 3b8507
	Prefers instructions as defined by 'vendor' in case of
Packit Service 3b8507
	a conflict. Known 'vendor' names include *intel*, *amd*,
Packit Service 3b8507
	*cyrix*, and *idt*. The default is *intel*.
Packit Service 3b8507
Packit Service 3b8507
RESTRICTIONS
Packit Service 3b8507
------------
Packit Service 3b8507
*ndisasm* only disassembles binary files: it has no understanding of
Packit Service 3b8507
the header information present in object or executable files.
Packit Service 3b8507
If you want to disassemble an object file, you should probably
Packit Service 3b8507
be using *objdump*(1).
Packit Service 3b8507
Packit Service 3b8507
Auto-sync mode won't necessarily cure all your synchronisation
Packit Service 3b8507
problems: a sync marker can only be placed automatically if a
Packit Service 3b8507
jump or call instruction is found to refer to it 'before'
Packit Service 3b8507
*ndisasm* actually disassembles that part of the code. Also,
Packit Service 3b8507
if spurious jumps or calls result from disassembling
Packit Service 3b8507
non-machine-code data, sync markers may get placed in strange
Packit Service 3b8507
places. Feel free to turn auto-sync off and go back to doing
Packit Service 3b8507
it manually if necessary.
Packit Service 3b8507
Packit Service 3b8507
SEE ALSO
Packit Service 3b8507
--------
Packit Service 3b8507
*objdump*(1)