Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

dis88(9) [minix man page]

Dis88 disassembles 8088 object code to the assembly language for-
mat used by It makes full use of symbol table  information,  sup-
ports separate instruction and data space, and generates synthet-
ic labels when needed.	It does not support 8087 mnemonics,  sym-
bolic  data segment references, or the ESC mnemonic.  The program
is invoked by: The -o flag causes object code to be  listed.   If
no  outfile is given, stdout is used.  The text segment of an ob-
ject file is always padded to an even address.	In  addition,  if
the  file has split I/D space, the text segment will be padded to
a paragraph boundary (i.e., an address divisible by 16).  Due  to
padding,  the  disassembler may produce a few spurious, but harm-
less, instructions at the end of the text segment.   Because  the
information  to which initialized data refers cannot generally be
inferred from context, the data  segment  is  treated  literally.
Byte  values  (in  hexadecimal) are output, and long stretches of
null data are represented by appropriate .zerow pseudo-ops.  Dis-
assembly  of  the  bss	segment,  on  the  other  hand,  is quite
straightforward, because uninitialized data is all zero by  defi-
nition.   No  data is output in the bss segment, but symbolic la-
bels are output as appropriate.  The output of operands  in  sym-
bolic  form is complicated somewhat by the existence of assembler
symbolic constants and segment override opcodes. Thus,	the  pro-
gram's	symbol	lookup routine attempts to apply a certain amount
of intelligence when it is asked to find a symbol. If  it  cannot
match  on  a symbol of the preferred type, it may output a symbol
of some other type, depending on preassigned (and somewhat  arbi-
trary)	rankings within each type. Finally, if all else fails, it
will output a string containing the address sought as a hex  con-
stant.	For  user  convenience,  the targets of branches are also
output, in comments, as  hexadecimal  constants.   Various  error
messages  may  be  generated  as a result of problems encountered
during the disassembly.  They are listed below
   Cannot access input file   - Input file cannot  be  opened  or
   Cannot open output file    - Output file cannot be created
   Input file not in object format-Bad magic number
   Not an 8086/8088 object file -CPU ID of the file header is in-
   Reloc table overflow       - Relocation table exceeds 1500 en-
   Symbol table overflow      - Symbol table exceeds 1500 entries
   Lseek error		      - Input file corrupted (should nev-
				er happen)
   Warning: no symbols	      - Symbol table is missing (use ast)
   Cannot reopen input file   - Input file was removed during ex-
Dis88	was  written  and copyrighted by G. M. Harding and is in-
cluded here by permission. It may be freely redistributed provid-
ed  that complete source code, with all copyright notices, accom-
panies any redistribution. This provision  also  applies  to  any
modifications  you  may  make.	You  are  urged  to  comment such
changes, giving, as a minimum, your name and complete address.

Check Out this Related Man Page

Z80DASM(1)						  Z80 disassembler User's manual						Z80DASM(1)

z80dasm - Z80 assembly generating disassembler SYNOPSIS
z80dasm [ options ] file DESCRIPTION
z80dasm disassembles a binary file containing Z80 machine code into Z80 assembly language source (including a number of undocumented opcodes). It can try to guess locations of labels in the code or the labels can be specified by hand in the form of a symbol file. If given proper information the disassembler can also split the binary file into code and data sections of several different types. Generated source file can be assembled back into the original binary using z80asm, zasm or the original Zilog assembler (when the --zilog option was used). OPTIONS
-a, --address Print the address of the memory location corresponding to each line of assembly code in a comment at the end of the line. -b, --block-def=FILE Read block information from a file. If this option is not specified the default is for the entire file to contain machine code. See BLOCK FILE below. -g, --origin=ORG Specify the start address of the binary code being disassembled. A corresponding org directive is generated in the output file. The argument is read in hexadecimal if it begins with 0x or 0X, in octal if it begins with 0, and in base 10 otherwise. Default is 0x0100. -h, --help Show summary of options and exit. -l, --labels Try to guess label locations from jump instructions and add them to the assembly code. -o, --output=FILE Specify the output file. Default is to write to standard output. -s, --sym-output=FILE Write symbol information into a file. -S, --sym-input=FILE Read symbol information from a file. See SYMBOL FILE below. -t, --source Print the binary data corresponding to each line of assembly code in a comment at the end of the line. Data is printed in hex and ASCII. This is useful for identifying data sections in the first disassembly. -v, --verbose Increase verbosity level. Specify multiple times to be more verbose. Messages are sent to standard error. -V, --version Display version information and exit. -z, --zilog Enable compatibility mode for the original Zilog Z80 assembler. This currently only changes the syntax of relative jumps. SYMBOL FILE
Symbol files written by z80dasm can be directly used as input symbol files with the --sym-input option. The following directives are recog- nized in input symbol files and are propagated to the output symbol files: include "filename" Include another symbol file. Double quotes are mandatory. Included files must be in the current directory. symbol: equ value Define a symbol with a value. The value is read in hexadecimal if it begins with 0x or 0X, in octal if it begins with 0, and in base 10 otherwise. Default is 0x0100. ; comment All characters between a semi-colon and end of line are ignored. BLOCK FILE
Block files specify the boundaries between different blocks (sections) of binary data in the disassembler input file. The following direc- tives are recognized: name: start address end address type type Define a block with the start and end address that contains a certain type of binary data. Start address is the 16 bit address of the first byte in the block. End address is the 16 bit address of the last byte in the block plus one. ; comment All characters between a semi-colon and end of line are ignored. The following block types are supported: code Block containing Z80 machine code. Data in this block will be written in Z80 assembly language. bytedata Data block containing separate bytes. Data in this block will be written with defb directives. worddata Data block containing 16 bit words (low order byte first). Data in this block will be written with defw directives. pointers Data block containing 16 bit pointers (low order byte first). This type is equivalent to worddata except that values will be replaced with labels where that is possible. DIAGNOSTICS
If disassembly was successful z80dasm returns 0. On error diagnostic messages are printed to standard error and z80dasm returns 1. BUGS
Please report bugs to AUTHOR
z80dasm is based largely on dz80 , written by Jan Panteltje. Feature enhancements and bug fixes were made by Tomaz Solc. SEE ALSO
z80asm(1) Tomaz Solc 2007-06-14 Z80DASM(1)
Man Page