home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / nasm097.zip / NDISASM.MAN < prev    next >
Text File  |  1997-10-01  |  4KB  |  133 lines

  1.  
  2.  
  3.  
  4. NDISASM(1)                                             NDISASM(1)
  5.  
  6.  
  7. NAME
  8.        ndisasm  -  the  Netwide  Disassembler - 80x86 binary file
  9.        disassembler
  10.  
  11. SYNOPSIS
  12.        ndisasm [ -o origin ] [ -s sync-point [...]]  [ -a | -i  ]
  13.        [ -b bits ] [ -u ] [ -e hdrlen ] [ -k offset,length [...]]
  14.        infile
  15.        ndisasm -h
  16.        ndisasm -r
  17.  
  18. DESCRIPTION
  19.        The ndisasm command generates a disassembly listing of the
  20.        binary file infile and directs it to stdout.
  21.  
  22.    OPTIONS
  23.        -h     Causes  ndisasm to exit immediately, after giving a
  24.               summary of its invocation options.
  25.  
  26.        -r     Causes ndisasm to exit immediately, after  display-
  27.               ing its version number.
  28.  
  29.        -o origin
  30.               Specifies  the  notional load address for the file.
  31.               This option causes ndisasm to get the addresses  it
  32.               lists  down  the  left  hand margin, and the target
  33.               addresses of PC-relative jumps and calls, right.
  34.  
  35.        -s sync-point
  36.               Manually specifies a synchronisation address,  such
  37.               that  ndisasm  will not output any machine instruc-
  38.               tion which encompasses bytes on both sides  of  the
  39.               address. Hence the instruction which starts at that
  40.               address will be correctly disassembled.
  41.  
  42.        -e hdrlen
  43.               Specifies a number of bytes  to  discard  from  the
  44.               beginning  of the file before starting disassembly.
  45.               This does not count towards the calculation of  the
  46.               disassembly offset: the first disassembled instruc-
  47.               tion will be  shown  starting  at  the  given  load
  48.               address.
  49.  
  50.        -k offset,length
  51.               Specifies  that  length bytes, starting from disas-
  52.               sembly offset offset, should be skipped over  with-
  53.               out  generating any output. The skipped bytes still
  54.               count towards the calculation  of  the  disassembly
  55.               offset.
  56.  
  57.        -a or -i
  58.               Enables  automatic  (or  intelligent) sync mode, in
  59.               which ndisasm will attempt to guess where  synchro-
  60.               nisation should be performed, by means of examining
  61.  
  62.  
  63.  
  64.                   The Netwide Assembler Project                 1
  65.  
  66.  
  67.  
  68.  
  69.  
  70. NDISASM(1)                                             NDISASM(1)
  71.  
  72.  
  73.               the target addresses  of  the  relative  jumps  and
  74.               calls it disassembles.
  75.  
  76.        -b bits
  77.               Specifies either 16-bit or 32-bit mode. The default
  78.               is 16-bit mode.
  79.  
  80.        -u     Specifies 32-bit mode, more  compactly  than  using
  81.               `-b 32'.
  82.  
  83.  
  84. RESTRICTIONS
  85.        ndisasm  only  disassembles binary files: it has no under-
  86.        standing of the header information present  in  object  or
  87.        executable  files.  If  you  want to disassemble an object
  88.        file, you should probably be using objdump(1).
  89.  
  90.        Auto-sync mode won't necessarily cure all your  synchroni-
  91.        sation problems: a sync marker can only be placed automat-
  92.        ically if a jump or call instruction is found to refer  to
  93.        it  before  ndisasm actually disassembles that part of the
  94.        code. Also, if spurious jumps or calls result from  disas-
  95.        sembling  non-machine-code  data,  sync  markers  may  get
  96.        placed in strange places. Feel free to turn auto-sync  off
  97.        and go back to doing it manually if necessary.
  98.  
  99.        ndisasm  can  only  keep track of 8192 sync markers inter-
  100.        nally at once: this is to do with portability,  since  DOS
  101.        machines  don't  take  kindly to more than 64K being allo-
  102.        cated at a time.
  103.  
  104.  
  105. SEE ALSO
  106.        objdump(1).
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.  
  130.                   The Netwide Assembler Project                 2
  131.  
  132.  
  133.