pilotdis(1)

NAME

pilotdis - disassemble PalmOS (MC68000) object code

SYNOPSIS

pilotdis [-help] [-000|-008|-010] [-020|-030|-040] [-851|-881|-882] [-a A-Line-file] [-all[c]] [-pilamode] [-b break-file] [-f F-Line-file] [-g globals-file] [-i instruction-file] [-isp] [-j jump-file] [-l] [-codeonly] [-seperator] [-lft] [-n data-file] [-ng] [-nl] [-ns notstart-file] [-o output-file] [-odd] [-pc initialpc] [-s minlength] [-slenp maxlength] [-t traps-file] [-hex] [-dec] [-v] file...

DESCRIPTION

pilotdis is a disassembler for the Motorola 68000 family
 of cpu devices, optimized for PalmOS object files. The
 disassembler attempts to discern between the instruction
 and data portions of an object code file. pilotdis produces output files much like cc(1). When the
 [-o output-file] option is not used, file arguments that end in .o have
 output filenames with .s substituted for .o otherwise, .s
 is simply appended. The output consists of five columns:

o   program counter in hexadecimal

o   file contents with each byte displayed as two characters in hexadecimal

o   label (if any)

o   instruction name

o   operands (if any)

OPTIONS

[-help]
    Print help page.

[-000|-008|-010|- 20|-030|-040|-851|-881|-882]
    Specifies the chip and coprocessors. Valid values
     for ddd are currently 000, 008, 010, 020, 030, 851,
     881, and 882. This option may be repeated as appropriate. The default is 000 with no coprocessors.

[-a A-Line-file]
    Specifies that file contains lines of the form "aXXX instruction-string" which specify acceptable A-line opcodes. XXX is in hexadecimal.

[-all[c]]
    Specifies that only one pass should be made, outputting the instruction (if any) at each word boundary. If the c is included, -i, -j, -n and -ns options are also processed, and another pass is made to ensure consistency between instructions.

[-pilamode]
    Specifies that output should be in a way that pila and other macroassemblers can understand it.

[-b break-file]
    Specifies that file contains program counter values which are taken as locations in data to be output on a new line. The values should be one to a line, and of a form acceptable to strtoul() with base equal to 0. Hex values should be preceeded by 0x.

[-f F-Line-file]
    Specifies that file contains lines of the form "fXXX instruction-string" which specify acceptable F-line opcodes. XXX is in hexadecimal.

[-g globals-file]
    Specifies that file contains A5 offsets and labels for global variables. Normally the A5 register points to a heap area used for global variables. The offsets values should be one to a line in a form acceptable to strtoul() with base equal to 0. The negative offset should be followed by the name of the global variable.

[-i instruction-file]
    Specifies that file contains program counter values which are, if possible, to be taken as locations of valid instructions. The values should be one to a line, and of a form acceptable to strtoul() with base equal to 0. The lines may also contain a label and/or a line count `name:count'. If a name is specified then a label will be forced at this address. If the name was `L' or `l' the label will be in the usual numeric form `Lnnn' otherwise the supplied name will be used as the label.

[-isp]
    Specifies that the determination of a printing character should be done by the local system's isprint(). By default, only ASCII characters (0x20 to 0x7e inclusive) are considered printing characters.

[-j jump-file]
    Specifies that file contains A-line and F-line opcodes which are unconditional jumps and therefore do not need to be followed by a valid instruction. The values should be one to a line, and of a form acceptable to strtoul() with base equal to 0.

[-l]
    Specifies that output should be in lowercase. (Exception: Label references retain an uppercase "L".)

[-codeonly]
    Specifies that output should contain code only. Everything else is skipped.

[-seperator]
    Specifies that output should have a nice seperatorline appended to each "rts"

[-lft]
    Specifies that instructions that "fall through" to a LINK instruction should be considered valid. By default, these instructions are considered invalid.

[-n data-file]
    Specifies that file contains program counter values which are to be taken as locations of data. The values should be one to a line, and of a form acceptable to strtoul() with base equal to 0. The lines may also contain a label and/or a line count `name:count'. If a name is specified then a label will be forced at this address. If the name is `L' or `l' the label will be in the numeric form `Lnnn' otherwise the supplied name will be used as the label.

[-ng]
    Specifies that the table of global cross references should not be produced. The global cross reference table will only be printed if the `-ng' was not put on the command line, a full two pass disassembly was used (no `-all') and references relative to A5 were found.

[-nl]
    Specifies that the table of label cross references should not be produced. The label cross reference table will only be printed if the `-ng' was not put on the command line, a full two pass disassembly was used (no `-all').

[-ns notstart-file]
    Specifies that file contains program counter values which are to be taken as locations at which instructions do not begin. The words at these locations may, however, be extension words of instructions. The values should be one to a line, and of a form acceptable to strtoul() with base equal to 0.

[-o output-file]
    Specifies the output file. Only one file to be disassembled may be given when this option is used.

[-odd]
    Specifies that instructions may begin at odd offsets. This can be useful when code to be disassembled is not stripped out of an object file. In particular, this option is often needed when disassembling an intact Macintosh resource fork.

[-pc initialpc]
    Specifies that initialpc be taken as the program counter value for the start of the object code. The default is 0.

[-s minlength]
    Specifies that data contain at least length consecutive printing characters to be output as a string. The minimum value for length is 2; the default is 5.

[-slenp maxlength]
    Specifies that strings should print out no more than length characters per output line. The minimum value for length is 10; the default is 80.

[-t traps-file]
    Specifies that file contains lines of the form "XXXX instruction-string" which specify acceptable trap 15 codes. XXXX is in hexadecimal.

[-hex]
    Specifies that output should contain hex values only.

[-dec]
    Specifies that output should contain dec values only.

[-v]
    Specifies that a verbose output should be given, when processing files.

NOTES

The output is based on Motorola syntax. Immediate values are sometimes also output in hexadecimal after an intervening. The following procedure is used to filter out the data from the instructions:

o   An initial pass is made determining at which file offsets potential instructions exist and the sizes of those instructions including operands.

o   File offsets specified by the user as being data are processed.

o   File offsets specified by the user as not starting instructions are processed.

o   File offsets specified by the user as being instructions are processed.

o   Potential instructions which reference data as instructions are changed to data. (This step is repeated after each of the remaining steps.)

o   LINK instructions which are referenced by BSR and JSR instructions are accepted as final instructions. (A final instruction is one that is included in the final output.)

o   Remaining LINK instructions are accepted as final instructions.

o   Branching and jumping instructions that reference final instructions and are not potential extension words of floatingpoint instructions are accepted as final instructions.

o   Remaining branching and jumping that are not extension words of potential floatingpoint instructions and returning instructions are accepted as final instructions.

o   Overlapping instructions are selected by minimizing the amount of data.

SEE ALSO

1.  Motorola: M68000 8/16/32 Bit Microprocessors: Programmer's Reference Manual, 5th ed., PrenticeHall, Englewood Cliffs, NJ, 1986.

2.  Motorola: M68030: Enhanced 32-Bit Microprocessor User's Manual, 2nd ed., PrenticeHall, Englewood Cliffs, NJ, 1989.

3.  Motorola: M68851: Paged Memory Management Unit User's Manual, 2nd ed., PrenticeHall, Englewood Cliffs, NJ, 1989.

4.  Motorola: M68881/MC68882: FloatingPoint Coprocessor User's Manual, 2nd ed., PrenticeHall, Englewood Cliffs, NJ, 1989.

AUTHOR

1998 David Griffiths

1999 Nick Spence

2000 Ali Akcaagac