home *** CD-ROM | disk | FTP | other *** search
/ Frozen Fish 1: Amiga / FrozenFish-Apr94.iso / bbs / alib / d1xx / d160 / dis.lha / Dis / dis.doc < prev    next >
Text File  |  1988-10-02  |  10KB  |  182 lines

  1.  
  2. Dis   68000 disassembler
  3. Greg Lee, February, 1986
  4. Update by Willi Kusche, SYSOP, KMMM Pascal BBS, (609) 232-0773
  5. July 1, 1988
  6.  
  7.       Commands to Dis are:
  8.  
  9.          <CR>, which repeats the last listing command ('l','b','B','d', or
  10.                'a') 21 times
  11.          <command-letter><CR>, where command-letter is a single character
  12.                from the list below
  13.          <command-letter><argument><CR>, where the argument follows
  14.                immediately after the command-letter
  15.  
  16. In the list below, arguments in '[...]' are optional, and 'addr' is
  17. either a hexadecimal number or a symbol. One must enter numbers
  18. beginning with digits A-F with a leading 0, so they can be distinguished
  19. from symbols. Note that there is no provision for ignoring spaces before
  20. or after the command-letter.
  21.  
  22.  command    argument  what it does
  23.  
  24.       l      [addr]    list instructions
  25.                         Instructions are disassembled in a format which
  26.                         would be acceptable to a standard assembler, except
  27.                         that program counter relative references are given
  28.                         as hex addresses without a leading '$'.  Such
  29.                         addresses would have to be assigned a symbolic
  30.                         value before any reassembly.
  31.       b      [addr]    build symbols
  32.                         This does the same as 'l' above, except that symbols
  33.                         are made and added to the symbol table for any
  34.                         operand references which are PC relative, or
  35.                         absolute long. Symbols are not constructed for
  36.                         immediate opereands. Symbols are given types
  37.                         if they appear to be references to data (see the
  38.                         note below on symbol types). The operand of LEA
  39.                         is assumed by Dis to refer to instructions,
  40.                         although this is usually not the case. The target
  41.                         of JSR or BSR is given a symbol beginning with 'R',
  42.                         which will cause a preceding blank line when it is
  43.                         listed as a label.
  44.       B      [addr]    Build locals
  45.                         This does the same as 'l' above, except that certain
  46.                         symbols that were probably made with the 'b' command
  47.                         are replaced with local labels of the form '1$',
  48.                         '2$',...,'999$'. The labels susceptible to
  49.                         replacement are those which begin with 'l' and are
  50.                         7 characters in length. When a label not of this
  51.                         form is encountered in the listing, a counter is
  52.                         reset so that the next local generated will be '1$'.
  53.       d      [addr]    dump in hex
  54.       a      [addr]    ascii dump
  55.       /      addr      address is this
  56.                         This assigns a new current address for the next
  57.                         listing command or symbol assignment, but
  58.                         nothing is listed. Convenient for assigning a
  59.                         symbol to an IO location which should not be
  60.                         accessed.
  61.       =      <symbol>  add symbol to table
  62.                         The string following the '=' is stored in the
  63.                         symbol table with a value equal to the address of
  64.                         the last instruction or data that was listed.
  65.                         The space available for the table is fixed at
  66.                         1600 symbols containing 11,200 characters. Space
  67.                         occupied by no longer used symbols is not
  68.                         automatically reclaimed, but it may be reclaimed
  69.                         by saving the table to disk, then reading it back.
  70.       r      [<name>]  read file (symtab)
  71.                         A file of symbols and the addresses to which they
  72.                         refer is read from disk into Dis's symbol table.
  73.                         Any symbols already in the table are lost.
  74.                         The file will commonly have been created by by
  75.                         the 's' command below, but it could have been
  76.                         made or modified with an editor. Each line of
  77.                         the file should either be empty or consist of
  78.                         a hex number followed by exactly one space, and
  79.                         then the string of characters that is to make
  80.                         up the symbol name.
  81.       s      [<name>]  save to file (symtab)
  82.                         Any symbols currently in the table are saved in
  83.                         the file for future use. For both 'r' and 's', if
  84.                         no name is given, 'symtab' is assumed.
  85.       q                quit
  86.                         Exit to AmigaDos.
  87.       w      <num>     where is this word?
  88.       W      <num>     where is this longword?
  89.                         These two commands start searching memory at
  90.                         the current listing address, but skip memory
  91.                         from 80000 to FC0000.
  92.       f      <name>    file to disassemble
  93.                         The requested file is loaded and its first
  94.                         instruction is listed. The file must be a load
  95.                         module. If for some reason the file could not be
  96.                         loaded, the IO error code is shown in hex.
  97.       >                next code segment
  98.                         The segments of a load module are scattered in
  99.                         memory by the AmigaDos loader. This command
  100.                         alters the current listing address to the beginning
  101.                         of the code segment after the current one (which
  102.                         is the first segment, after a successful use of
  103.                         the 'f' command). If nothing is listed, this means
  104.                         there is no next segment (or, in 'p' mode, that the
  105.                         next segment is empty).
  106.       <                first code segment
  107.                         After one or more uses of the '>' command, you
  108.                         might want to go back and look at the first
  109.                         segment again.
  110.       o      [num]     offset addresses
  111.                         All address references are adjusted by subtracting
  112.                         the number before being displayed. If no number
  113.                         is given, the last listing address is used. This
  114.                         command is of little use, given the availability
  115.                         of the below 'p' command.
  116.       p                offset by segment toggle
  117.                         After a file is loaded with the 'f' command, this
  118.                         will adjust all displayed addresses to offsets
  119.                         from the beginning of the first segment. Thus
  120.                         the segments will appear to occur in memory in
  121.                         the same order they occupied the the load file.
  122.                         In addition, the listing of memory locations
  123.                         outside any segment of the loaded file is
  124.                         suppressed, and after 'b', symbols are not
  125.                         constructed for references outside the loaded
  126.                         file. 'p' mode is automatic after loading a file.
  127.       k<name>          keep output in file
  128.                         Subsequent listing output to the screen will also
  129.                         be kept in the named file (possibly for subsequent
  130.                         reassembly). The saving continues until you exit
  131.                         with the 'q' command.
  132.       t                trim toggle
  133.                         Suppresses or enables the display of addresses at
  134.                         the left-hand side of the screen.
  135.       n<num>           print n lines after <CR>
  136.  
  137.  
  138. Notes on symbols.
  139.  
  140.       Symbols may be up to 255 characters and may contain any
  141. non-control characters.  A symbol may not be associated with the
  142. value zero or a value greater than 7FFFFFFFH. Symbols are case sensitive.
  143.  
  144.       There are some special conventions for symbols.  A symbol may
  145. carry information about the type of data being disassembled.  If a
  146. symbol starts with '.' and one of the letters 'b','a','w','l','c','i', then
  147. code at this and subsequent locations will be treated as bytes, ascii
  148. characters, words, longwords, a constant block, or instructions,
  149. respectively.  Otherwise, it will be treated as instructions.  Two character
  150. symbols beginning with '.' are not listed, since they are assumed to be
  151. intended to carry only type information.
  152.  
  153.       When a symbol starts with '.c', Dis displays 'dcb.b  <length>,<value>'
  154. where the value is that of the byte found at the address of the symbol
  155. and subsequent memory locations, and the length is the count of the number
  156. of bytes in the block. The block is considered to end when:
  157.          a byte with a different value is encountered,
  158.          an address with an associated symbol is found,
  159.       or in 'p' mode the end of a segment is reached.
  160. Dis does not do the counting of bytes in blocks very efficiently when there
  161. are lots of symbols in the table, so after 'dcb.b' has been displayed,
  162. some patience may be required.
  163.  
  164.       It is possible for a symbol to be concealed and not listed as a
  165. label at the left of the screen in some circumstances. This will happen
  166. when its address comes within an instruction being listed, or when its
  167. address is odd and a preceding address was listed as 'dc.w' or 'dc.l'.
  168. However, if a symbol with a following even address would be concealed by a
  169. 'dc.l' listing, this is prevented by listing data as bytes rather than
  170. as a longword. In 'p' mode, this is also done one word away from the
  171. end of a segment so as not to show data outside the segment.
  172.  
  173.       Symbols beginning with asterisks may be used to enter comments,
  174. in which case they are not listed as operands, but only as labels.
  175. If a single address is to have both a comment and an ordinary label
  176. associated with it, the comment should be entered after the ordinary
  177. label (else the comment will be lost).  Multiple comments for a single
  178. address are listed in the order in which they were entered. Once a
  179. comment has been entered, it can be eliminated only in the way just
  180. mentioned, or by saving the symbol table and editing it.
  181.  
  182.