Disassembler for MIPS Processors

Features:
Links:
Have fun!
Acade


================================================================================

usage: disasmips [option]* {file}		# system / version date

    input control options:

	-m {file}	mapfile, symbolic addresses may be used after -m
	-o {addr}	offset, memory address of 1st byte in dump file
	-a {addr}	start address (hex or symbol)
	-e {addr}	end address (hex or symbol), not before -a
	-s {size}	size (hex), instead of end address
	-n {lines}	maximum number of output lines
	-h {dir}	HTML output directory, use -n for approx. file size
	-x		end at address of next symbol after start address

	-LE		force as Little Endian input
	-NO		not an object file
	-NG		no GPA in object file ($gp/$s7 global pointer area)
	-GP {addr}	global offset table address for offset($gp) terms

    presentation options:

	-g		GCC register naming
	-b		prefix braces before symbol labels
	-r		show addresses relative to last symbol label
	-c		special comments for some instruction[ sequence]s
	-B {len}	bi-instruction memory access sequence length
			(#instructions: 1=off, 2..50, default=10), implies -c
	-F {len}	function end extension by branches < len to next JR
			(#instructions: 1=off, 2..10000, default=500)
	-H		highlight jumps/branches and load/store (HTML output)
	-S		short operands format (sub $1,$2; BUT sub $1,$2,$1)
	-P		pseudo moves (move $1,$2; move $a0,100), implies -S
	-A		all of the above presentation options

    other options:

	-t		test only (coverage and inambiguity of decoded ops)
	-!		show mapfile syntax

mapfile syntax: [[value [@|*]symbol] [comment] [#comment] newline]*

	value  := {hexnum | symbol}[+{value}]
	hexnum := [0x]{0..9 | a..f | A..F}*
	symbol := {a..z | A..Z | _ | 0..9}*

	symbols must not start with a decimal digit
	symbols must not be identical to any hex number

	special symbol '//' indicates a commented only value
	special comment '// $gp={value}' sets $gp for offset($gp) terms

	prefixed '@' switches from code to data representation
	'symbol' / '@symbol' / '*symbol' are different symbols

	for addr references in options, '@' may be omitted, but then, an
		existing 'symbol' is taken before the '@symbol'

	comments before a # sign are visible in generated output
	multiple mapfiles (-m options) allowed

================================================================================

Example Output:

	00000034:    18800006	blez	$a0,0x50
	00000038:    24020001	addiu	$v0,$zero,1
	0000003c:    00440018	mult	$v0,$a0
	00000040:    2484ffff	addiu	$a0,$a0,-1
	00000044:    00001012	mflo	$v0
	00000048:    1c80fffc	bgtz	$a0,0x3c
	0000004c:    00000000	nop
	00000050:    03e00008	jr	$ra
	00000054:    00000000	nop

(Compiled from

	int fac (int i) {int k = 1; while (i > 0) k *= i--; return (k);}

by GCC.)

================================================================================

Versions / Modification History:

 9-SEP-2016
		new option -GP: global offset table address for offset($gp) terms
		new option -NG: no GPA in object file ($gp/$s7 global pointer area)
		significantly improved performance for very large symbol maps
		comments' pointer chaining: stop at function heads improved
25-APR-2015
		new option -LE: little-endian support
		new option -NO: not an object file
 8-SEP-2006
		new option -F: detection of function boundaries improved
		detection of non-influencing instructions for -B improved
29-JUN-2006
		maximum line length of mapfiles increased to 200 characters
22-JUL-2005
		bugfix: crash on WinXP in some cases
12-JUL-2005
		disassembly of GCC object files now possible
			(with automatic map and global offset table relocation)
		decoding of memory references of type lw + nop + addiu
		special comment "// $s7=value" for use in "offset($s7)" terms
		minimum string length set to 2 (was 1)
		new option -A for all must-have presentation options
 1-JUL-2005
		first release for Linux (x86)
28-JUN-2005
		new option -S: output only 2 operands, if $dst == $src1..2
		new option -P: output mnemonic "move" on appropriate cases
		special comment "// $gp=value" also for "addiu ..,$gp,.." instr.
27-JUN-2005
		detection of non-influencing instructions for -B improved
22-JUN-2005
		highlight jumps/branches and load/store (new option -H)
		align all comments correctly
		bugfix: too relaxed non-influencing instructions for -B
17-JUN-2005
		bi-instruction memory references may be separated by up to 48
			non-influencing instructions (new option -B)
16-JUN-2005
		bi-instruction memory references may be separated by another
			non-influencing instruction
13-JUN-2005
		bugfix: cyclic memory references
 8-JUN-2005
		complete decoding of bi-instruction memory references of type
			lui + addi / ori / load / store
		bugfix: ambiguity test (mtc0 was not ambiguous to cop0)
 2-JUN-2005
 		bugfix: mtc0/mfc0 (rd confused with rt)
		new mtc0/mfc0 format Rrd[.sel]#regname
30-MAY-2005
		symbols.htm with links to all HTML files now
		calls.htm with up to 500 entries now
		string references accept \t, \r and \n now (converted to blanks)
		relative addresses for symbol definitions in mapfiles
		special symbol "//" in mapfiles to indicate instruction comment
		special comment "// $gp=value" for use in "offset($gp)" terms
22-MAY-2005
		decoding of mtc0, mfc0 and cache
		calls.htm for statistics
21-MAY-2005
		HTML output possible
17-MAY-2005
		absolute branch addresses possibly shown as symbols
		string references
 6-MAY-2005
		symbol maps
25-APR-2005
		first release for Win32

================================================================================

LICENCE AND DISCLAIMER:

You are free to use this program for non-commercial purposes.

Acade disclaims all warranties as to this software, whether express
or implied, including without limitation any implied warranties of mer-
chantability, fitness for a particular purpose or functionality.

Any responsibility for any damages (including consequential ones)
caused directly or by reliance on this program is denied.

Using this program is an acknowledgement of these conditions.

================================================================================

Any trademarks mentioned are property of their respective owners.