www.detachedsolutions.com
Detached Solutions Title

Command Post Home Page : Disassembler - Special Topics

Disassembler - Special Topics

The Command Post disassembler is a very powerful and complex tool which disassembles binary data into 68k assembly language. If you choose to install a rom call database, Command Post can identify nearly any rom call that is made within a program. The disassembler also includes support for Line 1111 rom calls, branches and jumps, and Line 1010 ER_throw disassembly. When you jump to the data portion of an unarchived ASM program, EX_patch is automatically applied to ensure all absolute references are relocated and ready for disassembly.

If the bookmarks (either manually, or through a command such as Jump: Variable ) are set, Command Post will utilize idle processor cycles to significantly increase disassembly performance by pre-disassembling instructions and placing them in a buffer. Third party applications can use Command Post's disassembler through the shared-code library.

For more information about the disassembler, and features which support it, see Disassembly Tools, and the Formats dialog documentation.

 

Special Topics:


Disassembler Keys

KEYS
ACTION
Up

Scroll the disassembly up 1 instruction.

If you are viewing a memory area between Bookmark1 and Bookmark2 and the background disassembly process has completed, this function will be very fast.

If you are not viewing memory between Bookmark1 and Bookmark2 and the background disassembly task has not completed, this function acts the same as pressing MINUS.

Down

Scroll the disassembly down 1 instruction.

Due to the nature of disassembly, scrolling down is extremely fast.

Diamond Up

Bookmark 1
Command Post will automatically set this bookmark when you request a jump to a variable's data, SYM_ENTRY structure, or an AMS global variable. This bookmark always jumps to the beginning of the structure or variable.

For best results when using this bookmark, please ensure that it points to a memory location that is lower than Bookmark 2.

Diamond Down

Bookmark 2
Command Post will automatically set this bookmark when you request a jump to a variable's data, SYM_ENTRY, or an AMS global variable who's size is known. This bookmark always jumps to the end of the structure or variable.

For best results when using this bookmark, please ensure that it points to a memory location that is higher than Bookmark 1.

2nd Up

Page Up

Due to the nature of disassembly, this function is rather slow. If you are viewing an area between Bookmark1 and Bookmark2 and the background disassembly process has finished its work, this function will be nearly as fast as 2nd Down.

2nd Down

Page Down

This scrolls the disassembly down one page. Due to the nature of disassembly, this feature will always be extremely responsive.

PLUS

Adjust Disassembly By One WORD (positive direction).

Use this key if you feel that the disassembler is incorrectly disassembling instructions.

MINUS

Adjust Disassembly By One WORD (negative direction).

Use this key if you feel that the disassembler is incorrectly disassembling instructions.

 


F-Line (1111) Instruction Support

The disassembler supports valid Line 1111 emulator rom calls, bsr, and bra. Valid line 1111 instructions will be prefixed with F. Supported formats are:

  • FCall $rom_call_index ;rom_call_to_string
  • F_bsr $address
  • F_bra $address.

A-Line (1010) Instruction Support

The disassembler supports valid Line 1010 ER_throw calls by printing the error number, and following the instruction with a comment which describes the error number.

Example:
ER_throw $error_code ;error_to_string


Disassembler Notes

  • the disassembler supports chk.l even though it is invalid on the MC68000
  • the disassembler interprets dbf as dbra (they are equivalent)
  • the condition code hi is always interpreted as cc (they are equivalent)
  • the condition code lo is always interpreted as cs (they are equivalent)
  • line 1010 exceptions are translated to ER_throw $xxxx. Jump to EV_errorCode and Edit that WORD so that it contains 0hxxxx if you want to know what the error code means.
  • no EA mask checks are implemented, so data can be interpreted as illegal instructions such as move.w a6,sr . This helps keep the disassembler small and fast while discouraging reverse engineering.

Rom Call Support

The disassembler provides full support for rom calls when a rom call database is installed. A list of supported formats follows:

  • movea.l x(An),Ay
    • When the disassembler encounters an instruction with the preceding format, it will divide x by four and perform a very fast binary search of the rom call database. If the rom call is found, it will appear as a comment following the instruction. If y is equal to seven, Command Post will not perform the rom call lookup.
  • jmp.l $x
    • Command Post will use a linear search of an internal database to determine if the absolute address x represents an entry in the jump table. If the address is determined to be a rom call, the name of the rom call will appear as a comment following the instruction.
    • If the calculator is low on RAM, this feature may not be available.
  • FCall $x
    • When Command Post encounters a Line 1111 rom call, it will search the rom call database for rom call x using a very fast binary search. If the rom call is found, it will appear as a comment following the FCall instruction.
  • Memory Locations (these features require you to install external databases or they will not be available)
    • When disassembling, if the first disassembly line is the address of a rom call, Command Post will display the rom call name as text in the status line. If the calculator is low on RAM or a romcall database is not installed, this feature may not be available.
    • Additionally, Command Post will notify you via the status line when the top line of the disassembly has an alias found in the memdat database. This feature is always available when a memdat database is installed.

 

Copyright © 2000-2018  Detached Solutions
Last Modified: 2005-07-02 01:36:26 GMT