

NDISASM(1)                Minix Programmer's Manual                 NDISASM(1)


NNNAAAMMMEEE
     ndisasm - the Netwide Disassembler - 80x86 binary file disassembler

SSSYYYNNNOOOPPPSSSIIISSS
     nnndddiiisssaaasssmmm [ ---ooo origin ] [ ---sss sync-point [...]]  [ ---aaa | ---iii ] [ ---bbb bits  ]  [
     ---uuu ] [ ---eee hdrlen ] [ ---kkk offset,length [...]]  infile
     nnndddiiisssaaasssmmm ---hhh
     nnndddiiisssaaasssmmm ---rrr

DDDEEESSSCCCRRRIIIPPPTTTIIIOOONNN
     The nnndddiiisssaaasssmmm command generates a disassembly listing of  the  binary  file
     _i_n_f_i_l_e and directs it to stdout.

  OOOPPPTTTIIIOOONNNSSS

     ---hhh   Causes nnndddiiisssaaasssmmm to exit immediately, after giving a  summary  of  its
          invocation options.

     ---rrr   Causes nnndddiiisssaaasssmmm to exit immediately,  after  displaying  its  version
          number.

     ---ooo _o_r_i_g_i_n
          Specifies the notional load address for the file. This option causes
          nnndddiiisssaaasssmmm to get the addresses it lists down the left hand margin, and
          the target addresses of PC-relative jumps and calls, right.

     ---sss _s_y_n_c-_p_o_i_n_t
          Manually specifies a synchronisation address, such that nnndddiiisssaaasssmmm will
          not  output  any machine instruction which encompasses bytes on both
          sides of the address. Hence the instruction  which  _s_t_a_r_t_s  at  that
          address will be correctly disassembled.

     ---eee _h_d_r_l_e_n
          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  _d_i_s_a_s_s_e_m_b_l_e_d
          instruction will be shown starting at the given load address.

     ---kkk _o_f_f_s_e_t,_l_e_n_g_t_h
          Specifies  that  _l_e_n_g_t_h  bytes,  starting  from  disassembly  offset
          _o_f_f_s_e_t,  should  be  skipped over without generating any output. The
          skipped bytes still count towards the calculation of the disassembly
          offset.

     ---aaa or ---iii
          Enables automatic (or intelligent) sync mode, in which nnndddiiisssaaasssmmm  will
          attempt to guess where synchronisation should be performed, by means
          of examining the target addresses of the relative jumps and calls it
          disassembles.



                        The Netwide Assembler Project                        1



NDISASM(1)                Minix Programmer's Manual                 NDISASM(1)


     ---bbb _b_i_t_s
          Specifies either 16-bit or 32-bit mode. The default is 16-bit mode.

     ---uuu   Specifies 32-bit mode, more compactly than using `-b 32'.

     ---ppp _v_e_n_d_o_r
          Prefers instructions as defined by _v_e_n_d_o_r in  case  of  a  conflict.
          Known  _v_e_n_d_o_r names include iiinnnttteeelll, aaammmddd, cccyyyrrriiixxx, and iiidddttt.  The default
          is iiinnnttteeelll.

RRREEESSSTTTRRRIIICCCTTTIIIOOONNNSSS
     nnndddiiisssaaasssmmm 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 ooobbbjjjddduuummmppp(111).

     Auto-sync mode won't 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 _b_e_f_o_r_e nnndddiiisssaaasssmmm 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.

     nnndddiiisssaaasssmmm can only keep track of 8192 sync markers internally at once: this
     is  to  do with portability, since DOS machines don't take kindly to more
     than 64K being allocated at a time.

SSSEEEEEE AAALLLSSSOOO
     ooobbbjjjddduuummmppp(111).























                        The Netwide Assembler Project                        2

