annotate nasmbuild/nasm-2.13rc9/ndisasm.txt @ 10656:d14f0b444087

<oerjan> ` cd wisdom; mv {\xc3\x84,\xc3\xa4}; mv \'{\xc3\x85,\xc3\xa5}\'
author HackBot
date Thu, 13 Apr 2017 03:46:40 +0000
parents 587a0a262d22
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
10554
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
1 ndisasm(1)
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
2 ==========
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
3 :doctype: manpage
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
4 :man source: NASM
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
5 :man manual: The Netwide Assembler Project
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
6
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
7 NAME
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
8 ----
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
9 ndisasm - the Netwide Disassembler, an 80x86 binary file disassembler
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
10
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
11 SYNOPSIS
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
12 --------
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
13 *ndisasm* [ *-o* origin ] [ *-s* sync-point [...]] [ *-a* | *-i* ]
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
14 [ *-b* bits ] [ *-u* ] [ *-e* hdrlen ] [ *-p* vendor ]
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
15 [ *-k* offset,length [...]] infile
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
16
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
17 DESCRIPTION
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
18 -----------
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
19 The *ndisasm* command generates a disassembly listing of the binary file
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
20 infile and directs it to stdout.
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
21
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
22 OPTIONS
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
23 -------
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
24 *-h*::
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
25 Causes *ndisasm* to exit immediately, after giving a summary
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
26 of its invocation options.
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
27
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
28 *-r*|*-v*::
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
29 Causes *ndisasm* to exit immediately, after displaying its
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
30 version number.
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
31
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
32 *-o* 'origin'::
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
33 Specifies the notional load address for the file. This
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
34 option causes *ndisasm* to get the addresses it lists
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
35 down the left hand margin, and the target addresses
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
36 of PC-relative jumps and calls, right.
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
37
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
38 *-s* 'sync-point'::
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
39 Manually specifies a synchronisation address, such that
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
40 *ndisasm* will not output any machine instruction which
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
41 encompasses bytes on both sides of the address. Hence
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
42 the instruction which starts at that address will be
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
43 correctly disassembled.
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
44
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
45 *-e* 'hdrlen'::
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
46 Specifies a number of bytes to discard from the beginning
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
47 of the file before starting disassembly. This does not
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
48 count towards the calculation of the disassembly offset:
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
49 the first 'disassembled' instruction will be shown starting
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
50 at the given load address.
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
51
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
52 *-k* 'offset,length'::
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
53 Specifies that 'length' bytes, starting from disassembly
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
54 offset 'offset', should be skipped over without generating
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
55 any output. The skipped bytes still count towards the
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
56 calculation of the disassembly offset.
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
57
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
58 *-a*|*-i*::
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
59 Enables automatic (or intelligent) sync mode, in which
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
60 *ndisasm* will attempt to guess where synchronisation should
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
61 be performed, by means of examining the target addresses
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
62 of the relative jumps and calls it disassembles.
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
63
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
64 *-b* 'bits'::
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
65 Specifies 16-, 32- or 64-bit mode. The default is 16-bit
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
66 mode.
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
67
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
68 *-u*::
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
69 Specifies 32-bit mode, more compactly than using `-b 32'.
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
70
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
71 *-p* 'vendor'::
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
72 Prefers instructions as defined by 'vendor' in case of
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
73 a conflict. Known 'vendor' names include *intel*, *amd*,
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
74 *cyrix*, and *idt*. The default is *intel*.
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
75
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
76 RESTRICTIONS
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
77 ------------
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
78 *ndisasm* only disassembles binary files: it has no understanding of
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
79 the header information present in object or executable files.
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
80 If you want to disassemble an object file, you should probably
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
81 be using *objdump*(1).
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
82
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
83 Auto-sync mode won't necessarily cure all your synchronisation
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
84 problems: a sync marker can only be placed automatically if a
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
85 jump or call instruction is found to refer to it 'before'
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
86 *ndisasm* actually disassembles that part of the code. Also,
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
87 if spurious jumps or calls result from disassembling
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
88 non-machine-code data, sync markers may get placed in strange
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
89 places. Feel free to turn auto-sync off and go back to doing
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
90 it manually if necessary.
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
91
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
92 SEE ALSO
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
93 --------
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
94 *objdump*(1)