# M68k Disassembler

The unit at asm/m68kd decodes byte streams containing Motorola 680x0 code into
listings where each line contains an operation.

While some wrong encoding can still get disassembled, this unit mainly strives
to decode as many instructions as possible. Marking invalid words as unknown is
not a priority.

## Listing format

Each line in the listing has this format:

  addr size mnemonic arguments rawbytes

The following syntax is used for arguments:
* %dN              -> data register
* %aN              -> address register
* %aN@             -> address register indirect
* %aN@+            -> address register postincrement
* -%aN@            -> address register predecrement
* %aN@(n)          -> indirect plus offset
* %aN@(%xN:sz*s+n) -> indirect with index
* %pc@(n)          -> program counter plus offset
* %pc@(%xN:sz*s+n) -> program counter with index
* $n               -> hexadecimal immediate
* #n               -> signed decimal immediate
* n:sz             -> absolute in hexadecimal
* %sr,%ccr,%usp    -> status, control code, and user stack pointer registers 
* `label           -> a label to a Forth entry, always prefixed by a backtick

Some letters used above have the following meaning:
* N is a number between 0 and 7 included
* n is an integer number whose size depends with context. 
    If not an immediate it is a signed decimal
* x may be 'a' or 'd' to specify either address or data register
* sz may be 'l', 'w', or 'b' for 32-bit, 16-bit, or 8-bit respectively
* s is a scale which is 1, 2, 4, or 8
A label may be any valid Forth entry, see "?xt>e" and "?var>e" in [mem/dict].

Instructions operating on an effective address *always* specify their size, even
if only one size is possible. Letters are the same as described in "sz" format.
When an instruction does not have a size, it is omitted.

## Shortened mnemonics

Mnemonics are limited to 4 characters, which means that we lack space for some
of them. New mnemonics have thus been created:

movp movep
mova movea
movq moveq
movm movem
ilgl illegal
rset reset
trpv trapv
dvul divul
dvsl divsl
