680x0 Assembler
680x0 Assembler
This document gives details of the Motorola 680x0 instruction set. You should
also look at the document "FILETYPE.DOC" to see how various output file formats
are supported, especially for types ".PRG" and ".ACC".
������������������������������������������������������������������������������Ŀ
� Document Guide �
��������������������������������������������������������������������������������
Flags: XNZVC
Examples for each instruction are given. If <ea> is used, the valid effective
addresses for the instruction are listed. ext(An) and ext(PC) means the extended
addressing modes of the 68020, 68030, 68040 and CPU32 can be used.
If address register An is used, only word and long are allowed (however, byte
address register An is allowed for CHK2, CMP2 and MOVES).
{68EC000} �
{68010} �
{68020} �
{68030} � Specifies which processors / coprocessor
{68040} � the instruction will work on.
{68EC040} � If none are specified, the instruction
{68LC040} � works on the whole 680x0 family of processors.
{CPU32} �
{68881} �
{68882} �
������������������������������������������������������������������������������ͻ
� 680x0 Instruction Set �
������������������������������������������������������������������������������ͼ
ABCD D4,D5
ABCD -(A4),-(A5)
--------------------------------------------------------------------------------
ADD (add)
--------------------------------------------------------------------------------
ADDs the source to the destination register, storing the result in the
destination address register. Word length operands are sign-extended to
32-bits for addition.
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
ADDs the source to the destination along with the extend bit, storing
the result in the destination.
--------------------------------------------------------------------------------
ANDs the source with the destination, storing the result in the
destination.
--------------------------------------------------------------------------------
ANDs the immediate value with the destination, storing the result in the
destination.
--------------------------------------------------------------------------------
ANDs the immediate value with the condition codes, storing the result in
the condition code register.
ANDI #imm,CCR
--------------------------------------------------------------------------------
ANDs the immediate value with the status register, storing the result in
the status register.
ANDI #imm,SR
--------------------------------------------------------------------------------
Shift the destination by the specified count (Dx modulo 64, or #count
from 1 to 8), or by 1 if using ASL <ea>. Bits shifted out of the high
order bit go to both the carry and extend flags; zeros are shifted into
the low order bit. The overflow bit indicates if any sign changes
occurred.
ASL <ea>
(An) (An)+ -(An) d16(An) d8(An,Ix) mem.w mem.l ext(An)
--------------------------------------------------------------------------------
Shift the destination by the specified count (Dx modulo 64, or #count
from 1 to 8), or by 1 if using ASR <ea>. Bits shifted out of the low
order bit go to both the carry and extend flags; the sign bit is shifted
into the high order bit.
ASR <ea>
(An) (An)+ -(An) d16(An) d8(An,Ix) mem.w mem.l ext(An)
--------------------------------------------------------------------------------
conditions:-
BCC BHS branch if carry clear / higher or same (unsigned)
BCS BLO branch if carry set / lower (unsigned)
BEQ branch if equal
BGE branch if greater or equal (signed)
BGT branch if greater than (signed)
BHI branch if higher than (unsigned)
BLE branch if less or equal (signed)
BLS branch if lower or the same (unsigned)
BLT branch if less than (signed)
BMI branch if minus
BNE branch if not equal
BPL branch if plus
BVC branch if overflow clear
BVS branch if overflow set
--------------------------------------------------------------------------------
Test the specified bit (Dn or #bit) of the destination, setting the Z
condition code. Then invert the specified bit. The bit number is modulo
32 (from 0 to 31, long) if the destination is a data register, or modulo
8 (from 0 to 7, byte) if the destination is not a data register.
--------------------------------------------------------------------------------
Test the specified bit (Dn or #bit) of the destination, setting the Z
condition code. Then clear the specified bit. The bit number is modulo
32 (from 0 to 31, long) if the destination is a data register, or modulo
8 (from 0 to 7, byte) if the destination is not a data register.
--------------------------------------------------------------------------------
BFCHG (test bit field and change) {68020} {68030} {68040}
Sets the condition codes according to the value in the bit field :-
N set the same as the most significant bit of the field.
Z set if all bits of the field are zero, cleared otherwise.
The bit field is then complemented (inverted).
:width} :Dn the range is modulo 32, with 0=32 (width = 1 to 32).
:#width the range is 1 to 32.
--------------------------------------------------------------------------------
Sets the condition codes according to the value in the bit field :-
N set the same as the most significant bit of the field.
Z set if all bits of the field are zero, cleared otherwise.
The bit field is then cleared.
:width} :Dn the range is modulo 32, with 0=32 (width = 1 to 32).
:#width the range is 1 to 32.
--------------------------------------------------------------------------------
Sets the condition codes according to the value in the bit field :-
N set the same as the most significant bit of the field.
Z set if all bits of the field are zero, cleared otherwise.
Extracts a bit field from the specified extended address location, sign
extends to 32-bits, and loads the result into the destination data
register.
:width} :Dn the range is modulo 32, with 0=32 (width = 1 to 32).
:#width the range is 1 to 32.
--------------------------------------------------------------------------------
Sets the condition codes according to the value in the bit field :-
N set the same as the most significant bit of the field.
Z set if all bits of the field are zero, cleared otherwise.
Extracts a bit field from the specified extended address location, zero
extends to 32-bits, and loads the result into the destination data
register.
:width} :Dn the range is modulo 32, with 0=32 (width = 1 to 32).
:#width the range is 1 to 32.
--------------------------------------------------------------------------------
BFFFO (find first one in bit field) {68020} {68030} {68040}
BFFF1 {!!!} (find first one in bit field) {68020} {68030} {68040}
Sets the condition codes according to the value in the bit field :-
N set the same as the most significant bit of the field.
Z set if all bits of the field are zero, cleared otherwise.
Finds the first set bit in the bit field, and places the bit number in
destination data register Dn (the bit offset in the instruction plus the
offset of the first one bit). If all bits of the field are clear, Dn is
set to field offset+width.
:width} :Dn the range is modulo 32, with 0=32 (width = 1 to 32).
:#width the range is 1 to 32.
--------------------------------------------------------------------------------
Inserts a bit field taken from the low order bits of the specified data
register into a bit field at the effective address location. Then the
instruction sets the condition codes according to the inserted value.
N set the same as the most significant bit of the field.
Z set if all bits of the field are zero, cleared otherwise.
:width} :Dn the range is modulo 32, with 0=32 (width = 1 to 32).
:#width the range is 1 to 32.
--------------------------------------------------------------------------------
Sets the condition codes according to the value in the bit field :-
N set the same as the most significant bit of the field.
Z set if all bits of the field are zero, cleared otherwise.
Each bit in the field is then set.
:width} :Dn the range is modulo 32, with 0=32 (width = 1 to 32).
:#width the range is 1 to 32.
--------------------------------------------------------------------------------
Sets the condition codes according to the value in the bit field :-
N set the same as the most significant bit of the field.
Z set if all bits of the field are zero, cleared otherwise.
:width} :Dn the range is modulo 32, with 0=32 (width = 1 to 32).
:#width the range is 1 to 32.
--------------------------------------------------------------------------------
BGND (enter background mode) {CPU32}
Syntax: BGND
Flags: -----
Size: unsized
BGND
--------------------------------------------------------------------------------
BKPT #data(0-7)
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
Test the specified bit (Dn or #bit) of the destination, setting the Z
condition code. Then set the specified bit. The bit number is modulo 32
(from 0 to 31, long) if the destination is a data register, or modulo 8
(from 0 to 7, byte) if the destination is not a data register.
--------------------------------------------------------------------------------
Store the long word address of the next instruction on the stack, then
branch to the specified label. Short branch to the following instruction
is not allowed (BSR.S *+2). The default branch size is word.
--------------------------------------------------------------------------------
Test the specified bit (Dn or #bit) of the destination, setting the Z
condition code. The bit number is modulo 32 (from 0 to 31, long) if the
destination is a data register, or modulo 8 (from 0 to 7, byte) if the
destination is not a data register.
BTST #bit(0-7),<ea>
(An) (An)+ -(An) d16(An) d8(An,Ix)
mem.w mem.l d16(PC) d8(PC,Ix) ext(An) ext(PC)
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
CAS compares the effective address operand to the compare operand (Dc).
If the operands are equal, the instruction writes the update operand
(Du) to the effective address operand; otherwise, the instruction writes
the effective address operand to the compare operand (Dc).
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
Compares the value in the specified data register to zero and the upper
bound (effective address operand). The upper bound is a twos complement
integer. If the register value is less than zero or greater than the
upper bound, a CHK instruction exception (vector number 6) occurs. The
default instruction size is word.
CHK.W <ea>,D4 CHK.L <ea>,D4
Dn (An) (An)+ -(An) d16(An) d8(An,Ix)
mem.w mem.l #data d16(PC) d8(PC,Ix) ext(An) ext(PC)
--------------------------------------------------------------------------------
The size of the data and the bounds can be specified as byte, word or
long. If Rn is a data register and the operation size is byte or word,
only the byte or word part of Dn is checked. If Rn is an address
register and the operation size is byte or word, the bounds operands are
sign-extended to 32-bits, and the resultant operands are compared to the
full 32-bits of An.
If the upper bound equals the lower bound, the valid range is a single
value. If the register value is less than the lower bound or greater
than the upper bound, a CHK instruction exception (vector number 6)
occurs.
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
CMP (compare)
Subtracts the source operand from the destination data register and sets
the condition codes according to the result; the data register is not
changed.
--------------------------------------------------------------------------------
Subtracts the source operand from the destination address register and
sets the condition codes according to the result; the address register
is not changed. Word length operands are sign-extended to 32-bits for
comparison.
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
Subtracts the source operand from the destination operand and sets the
condition code according to the result; the destination operand is not
changed.
--------------------------------------------------------------------------------
The size of the data and the bounds can be specified as byte, word or
long. If Rn is a data register and the operation size is byte or word,
only the byte or word part of Dn is checked. If Rn is an address
register and the operation size is byte or word, the bounds operands are
sign-extended to 32-bits, and the resultant operands are compared to the
full 32-bits of An.
If the upper bound equals the lower bound, the valid range is a single
value.
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
conditions:-
DBRA D4,label
--------------------------------------------------------------------------------
Divides the signed destination operand by the signed source operand and
stores the signed result in the destination. The instruction uses one of
four forms:
Dr:Dq cannot be the same register. Division by zero causes a trap. The
operands are unaffected if an overflow occurs.
DIVS.W <ea>,D4
DIVS.L <ea>,D4
DIVS.L <ea>,D4:D5
DIVSL.L <ea>,D4:D5
Dn (An) (An)+ -(An) d16(An) d8(An,Ix)
mem.w mem.l #data d16(PC) d8(PC,Ix) ext(An) ext(PC)
--------------------------------------------------------------------------------
long 2 divides a quad word (in any two different data registers) by a
long word. The result is a long quotient and a long remainder.
Dr:Dq cannot be the same register. Division by zero causes a trap. The
operands are unaffected if an overflow occurs.
DIVU.W <ea>,D4
DIVU.L <ea>,D4
DIVU.L <ea>,D4:D5
DIVUL.L <ea>,D4:D5
Dn (An) (An)+ -(An) d16(An) d8(An,Ix)
mem.w mem.l #data d16(PC) d8(PC,Ix) ext(An) ext(PC)
--------------------------------------------------------------------------------
EOR (logical exclusive OR)
EORs the source with the destination, storing the result in the
destination.
--------------------------------------------------------------------------------
EORs the immediate value with the destination, storing the result in the
destination.
--------------------------------------------------------------------------------
EORs the immediate value with the condition codes, storing the result in
the condition code register.
EORI #imm,CCR
--------------------------------------------------------------------------------
EORs the immediate value with the status register, storing the result in
the status register.
EORI #imm,SR
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
Syntax: ILLEGAL
Flags: -----
Size: unsized
ILLEGAL
--------------------------------------------------------------------------------
JMP <ea>
(An) d16(An) d8(An,Ix) mem.w mem.l d16(PC) d8(PC,Ix) ext(An) ext(PC)
--------------------------------------------------------------------------------
Store the long word address of the next instruction onto the stack, then
program continues execution at the specified effective address.
JSR <ea>
(An) d16(An) d8(An,Ix) mem.w mem.l d16(PC) d8(PC,Ix) ext(An) ext(PC)
--------------------------------------------------------------------------------
Loads the effective address into the address register. All 32-bits of
the address register are affected.
LEA <ea>,A4
(An) d16(An) d8(An,Ix) mem.w mem.l d16(PC) d8(PC,Ix) ext(An) ext(PC)
--------------------------------------------------------------------------------
Stores the contents of the specified address register on the stack, then
loads the updated stack pointer into the address register. Finally, adds
the displacement value to the stack pointer. The displacement is sign
extended for word size operation. The displacement should be a negative
value in order to allocate stack area. LINK and UNLINK can be used to
keep local data and parameter areas on the stack for nested subroutines.
--------------------------------------------------------------------------------
Moves the immediate word into the status register, advances the program
counter to the next instruction, and stops the fetching and executing of
instructions. A CPU LPSTOP broadcast cycle is executed to CPU space $3
to copy the updated interrupt mask to the external bus interface (EBI).
The internal clocks are stopped.
LPSTOP #word
--------------------------------------------------------------------------------
Shift the destination by the specified count (Dx modulo 64, or #count
from 1 to 8), or by 1 if using LSL <ea>. Bits shifted out of the high
order bit go to both the carry and extend flags; zeros are shifted into
the low order bit.
LSL <ea>
(An) (An)+ -(An) d16(An) d8(An,Ix) mem.w mem.l ext(An)
--------------------------------------------------------------------------------
Shift the destination by the specified count (Dx modulo 64, or #count
from 1 to 8), or by 1 if using LSR <ea>. Bits shifted out of the low
order bit go to both the carry and extend flags; zeros are shifted into
the high order bit.
LSR <ea>
(An) (An)+ -(An) d16(An) d8(An,Ix) mem.w mem.l ext(An)
--------------------------------------------------------------------------------
MOVEs the data from the source operand to the destination operand,
setting the condition codes accordingly.
--------------------------------------------------------------------------------
MOVEs the data from the source operand to the destination address
register.
--------------------------------------------------------------------------------
MOVE CCR,<ea>
Dn (An) (An)+ -(An) d16(An) d8(An,Ix) mem.w mem.l ext(An)
--------------------------------------------------------------------------------
MOVEs the source operand to the condition code register. MOVE to CCR is
a word operation; ANDI, ORI and EORI to CCR are byte operations.
Unimplemented bits of the condition code register are unaffected.
MOVE <ea>,CCR
Dn (An) (An)+ -(An) d16(An) d8(An,Ix)
mem.w mem.l #data d16(PC) d8(PC,Ix) ext(An) ext(PC)
--------------------------------------------------------------------------------
MOVE SR,<ea>
Dn (An) (An)+ -(An) d16(An) d8(An,Ix) mem.w mem.l ext(An)
--------------------------------------------------------------------------------
MOVEs the data from the source to the status register. Unimplemented
bits of the status register are unaffected.
MOVE <ea>,SR
Dn (An) (An)+ -(An) d16(An) d8(An,Ix)
mem.w mem.l #data d16(PC) d8(PC,Ix) ext(An) ext(PC)
--------------------------------------------------------------------------------
MOVEs the contents of the user stack pointer to or from the specified
address register.
MOVE USP,A5
MOVE A4,USP
--------------------------------------------------------------------------------
MOVEs the source line to the destination line. The lines are aligned
to 16 byte boundaries. Applications for this instruction include
coprocessor communications, memory initialization and fast copying.
MOVE16 (A4)+,(A5)+
MOVE16 mem.l,(A5)
MOVE16 mem.l,(A5)+
MOVE16 (A4),mem.l
MOVE16 (A4)+,mem.l
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
MOVEs data between a data register and alternate bytes within the
address space starting at the location specified and incrementing by
two. The high order byte of the data register is transferred first, and
the low order byte is transferred last.
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
This instruction moves the byte, word or long from the specified general
register to a location within the address space specified by the
destination function code (DFC) register, or it moves the byte, word or
long from a location within the address space specified by the source
function code (SFC) register to the general register.
--------------------------------------------------------------------------------
word multiplies a word with a word. The result is a long word stored
in register Dn.
long 1 multiplies a long with a long. The result is a long word stored
in register Dl, the upper 32-bits of the result are discarded.
MULS.W <ea>,D4
MULS.L <ea>,D4
MULS.L <ea>,D4:D5
Dn (An) (An)+ -(An) d16(An) d8(An,Ix)
mem.w mem.l #data d16(PC) d8(PC,Ix) ext(An) ext(PC)
--------------------------------------------------------------------------------
MULU (unsigned multiplication)
word multiplies a word with a word. The result is a long word stored
in register Dn.
long 1 multiplies a long with a long. The result is a long word stored
in register Dl, the upper 32-bits of the result are discarded.
MULU.W <ea>,D4
MULU.L <ea>,D4
MULU.L <ea>,D4:D5
Dn (An) (An)+ -(An) d16(An) d8(An,Ix)
mem.w mem.l #data d16(PC) d8(PC,Ix) ext(An) ext(PC)
--------------------------------------------------------------------------------
Subtracts the destination operand and the extend bit from zero, storing
the result at the destination. The operation is performed using binary
coded decimal arithmetic.
NBCD <ea>
Dn (An) (An)+ -(An) d16(An) d8(An,Ix) mem.w mem.l ext(An)
--------------------------------------------------------------------------------
NEG (negate)
--------------------------------------------------------------------------------
Subtracts the destination and the extend bit from zero, storing the
result at the destination.
--------------------------------------------------------------------------------
Syntax: NOP
Flags: -----
Size: unsized
NOP
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
ORs the source with the destination, storing the result in the
destination.
OR.B <ea>,D4 OR.W <ea>,D4 OR.L <ea>,D4
Dn (An) (An)+ -(An) d16(An) d8(An,Ix)
mem.w mem.l #data d16(PC) d8(PC,Ix) ext(An) ext(PC)
--------------------------------------------------------------------------------
ORs the immediate value with the destination, storing the result in the
destination.
--------------------------------------------------------------------------------
ORs the immediate value with the condition codes, storing the result in
the condition code register.
ORI #imm,CCR
--------------------------------------------------------------------------------
ORs the immediate value with the status register, storing the result in
the status register.
ORI #imm,SR
--------------------------------------------------------------------------------
Adjusts and packs the lower four bits of each of two bytes into a single
byte.
When both operands are data registers, the adjustment is added to the
value contained in the source register. Bits 11-8 and 3-0 of the
intermediate result are concatenated and placed in bits 7-0 of the
destination register. The remainder of the destination register is
unaffected.
When the predecrement addressing mode is specified, two bytes from the
source are fetched and concatenated. The adjustment word is added to the
concatenated bytes. Bits 0-3 of each byte are extracted. These eight
bits are concatenated to form a new byte, which is written to the
destination.
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
Computes the effective address and pushes it onto the stack. The
effective address is a long address.
PEA <ea>
(An) d16(An) d8(An,Ix) mem.w mem.l d16(PC) d8(PC,Ix) ext(An) ext(PC)
--------------------------------------------------------------------------------
Syntax: RESET
Flags: -----
Size: unsized
Asserts the RSTO signal for 512 (124 for MC68000, MC68EC000, MC68HC000,
MC68HC001, MC68008, MC68010 and MC68302) clock periods, resetting all
external devices.
RESET
--------------------------------------------------------------------------------
Rotate the destination by the specified count (Dx modulo 64, or #count
from 1 to 8), or by 1 if using ROL <ea>. Bits rotated out of the high
order bit go to the carry and also back into the low order bit.
ROL <ea>
(An) (An)+ -(An) d16(An) d8(An,Ix) mem.w mem.l ext(An)
--------------------------------------------------------------------------------
Rotate the destination by the specified count (Dx modulo 64, or #count
from 1 to 8), or by 1 if using ROR <ea>. Bits rotated out of the low
order bit go to the carry and also back into the high order bit.
ROR <ea>
(An) (An)+ -(An) d16(An) d8(An,Ix) mem.w mem.l ext(An)
--------------------------------------------------------------------------------
Rotate the destination by the specified count (Dx modulo 64, or #count
from 1 to 8), or by 1 if using ROXL <ea>. Bits rotated out of the high
order bit go to the carry and the extend; the previous value of the
extend rotates into the low order bit.
ROXL <ea>
(An) (An)+ -(An) d16(An) d8(An,Ix) mem.w mem.l ext(An)
--------------------------------------------------------------------------------
Rotate the destination by the specified count (Dx modulo 64, or #count
from 1 to 8), or by 1 if using ROXR <ea>. Bits rotated out of the low
order bit go to the carry and the extend; the previous value of the
extend rotates into the high order bit.
ROXR <ea>
(An) (An)+ -(An) d16(An) d8(An,Ix) mem.w mem.l ext(An)
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
Syntax: RTE
Flags: set according to the status register from the stack
Size: unsized
{68000} {68008}
Pulls the status register and program counter values from the stack. The
previous values are lost.
RTE
--------------------------------------------------------------------------------
Syntax: RTM Rn
Flags: set according to the content of the word on the stack
Size: unsized
A previously saved module state is reloaded from the top of stack. After
the module state is retrieved from the top of the stack, the caller's
stack pointer is incremented by the argument count value in the module
stack.
RTM Dn RTM An
--------------------------------------------------------------------------------
Syntax: RTR
Flags: set to the condition codes from the stack
Size: unsized
Pulls the condition code and program counter values from the stack. The
previous values are lost. The supervisor portion of the status register
is unaffected.
RTR
--------------------------------------------------------------------------------
Syntax: RTS
Flags: -----
Size: unsized
Pulls the program counter from the stack. The previous program counter
value is lost.
RTS
--------------------------------------------------------------------------------
Subtracts the source and the extend bit from the destination, storing
the result in the destination. Subtraction is performed using binary
coded decimal (BCD) arithmetic.
SBCD D4,D5
SBCD -(A4),-(A5)
--------------------------------------------------------------------------------
conditions:-
Scc <ea>
Dn (An) (An)+ -(An) d16(An) d8(An,Ix) mem.w mem.l ext(An)
--------------------------------------------------------------------------------
Moves the immediate word into the status register, advances the program
counter to the next instruction, and stops the fetching and executing of
instructions. A trace, interrupt, or reset exception causes the
processor to resume instruction execution. A trace exception occurs if
instruction tracing is enabled (T0=1, T1=0) when the STOP instruction
begins execution. If an interrupt request is asserted with a priority
higher than the priority level set by the new status register, an
interrupt exception occurs; otherwise, the interrupt request is ignored.
An external reset always initiates reset exception processing.
STOP #word
--------------------------------------------------------------------------------
SUB (subtract)
SUBtracts the source from the destination, storing the result in the
destination.
--------------------------------------------------------------------------------
SUBA (subtract from address register)
SUBtracts the source from the destination register, storing the result
in the destination address register. Word length operands are
sign-extended to 32-bits for subtraction.
--------------------------------------------------------------------------------
SUBtracts the immediate value from the destination, storing the result
in the destination.
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
SUBs the source and the extend from the destination, storing the result
in the destination.
--------------------------------------------------------------------------------
Syntax: SWAP Dn
Flags: -**00
Size: word
SWAP D4
--------------------------------------------------------------------------------
Tests and sets the byte operand addressed by the effective address. The
instruction tests the current value of the operand and sets the N and Z
condition codes appropriately. TAS then sets the high order bit of
the operand. The operation uses a locked or read-modify-write transfer
sequence. This instruction supports use of a flag or semaphore to
coordinate several processors.
TAS <ea>
Dn (An) (An)+ -(An) d16(An) d8(An,Ix) mem.w mem.l ext(An)
--------------------------------------------------------------------------------
The TBLS and TBLSN instructions allow the efficient use of piecewise
linear compressed data tables to model complex functions. There are two
modes of operation; table lookup and interpolate mode and data register
interpolate mode.
--------------------------------------------------------------------------------
The TBLU and TBLUN instructions allow the efficient use of piecewise
linear compressed data tables to model complex functions. There are two
modes of operation; table lookup and interpolate mode and data register
interpolate mode.
--------------------------------------------------------------------------------
TRAP (trap)
--------------------------------------------------------------------------------
conditions:-
TRAPF false, never trap
TRAPT true, always trap
TRAPCC TRAPHS trap if carry clear / higher or same (unsigned)
TRAPCS TRAPLO trap if carry set / lower (unsigned)
TRAPEQ trap if equal
TRAPGE trap if greater or equal (signed)
TRAPGT trap if greater than (signed)
TRAPHI trap if higher than (unsigned)
TRAPLE trap if less or equal (signed)
TRAPLS trap if lower or the same (unsigned)
TRAPLT trap if less than (signed)
TRAPMI trap if minus
TRAPNE trap if not equal
TRAPPL trap if plus
TRAPVC trap if overflow clear
TRAPVS trap if overflow set
TRAPEQ
TRAPEQ.W #word
TRAPEQ.L #long
--------------------------------------------------------------------------------
Syntax: TRAPV
Flags: -----
Size: unsized
TRAPV
--------------------------------------------------------------------------------
Compares the operand with zero and sets the condition codes accordingly.
--------------------------------------------------------------------------------
UNLK (unlink)
Syntax: UNLK An
Flags: -----
Size: unsized
Loads the stack pointer from the specified address register, the loads
the address register with the long word pulled from the top of the
stack.
UNLK A4
--------------------------------------------------------------------------------
Places the two binary-coded decimal digits in the source operand byte
into the lower four bits of two bytes and places zero bits in the upper
four bits. Adds the adjustment word to this unpacked value.
When both operands are data registers, the instruction unpacks the
source register contents, adds the adjustment word, and places the
result in the destination register. The high word of the destination is
not affected.
������������������������������������������������������������������������������Ŀ
� Unimplemented Instructions �
��������������������������������������������������������������������������������
������������������������������������������������������������������������������ͻ
� Address Modes �
������������������������������������������������������������������������������ͼ
������������������������������������������������������������������������������Ŀ
� Extended Addressing Modes (68020,68030,68040,CPU32) �
��������������������������������������������������������������������������������
The 68020, 68030, 68040 and CPU32 have an extended address mode capacity.
Here follows a list of all the new address modes. There are some duplicates with
the original address modes, with the original used instead of the new in these
cases. Examples of unique new address modes are given.
zPC (zero program counter, or suppress program counter) example :- (zPC,100) and
(100) are assembled differently, but operate in exactly the same way.
--------------------------------------------------------------------------------
(bd,An,Ix)
(bd,PC,Ix)
(bd,zPC,Ix)
examples:-
(PC) (PC) no offset
(zPC) (zPC)
(Ix) (D0.w) (D0.l) (A0.l*4)
(bd,An) 100.l(A0) (100.l,A0) (A0,100.l) long offset
(bd,PC) mem.l(PC) (mem.l,PC) long offset
(bd,zPC) 100(zPC) (100,zPC)
(bd,Ix) 100(D0.w) (100,D0.l) (A0.l*4,100)
(PC,Ix) (PC,D0.w) (D0.l,PC) (PC,A0.l*4) no offset
(zPC,Ix) (zPC,D0.w) (D0.l,zPC) (zPC,A0.l*4)
(bd,An,Ix) 100.w(An,D0.w) (100.l,A0,D0.l) word/long offset
(bd,PC,Ix) mem.w(PC,D0.w) (mem.l,PC,D0.l) word/long offset
(bd,zPC,Ix) 100.w(zPC,D0.w) (100.l,zPC,D0.l)
--------------------------------------------------------------------------------
([bd,An,Ix],od)
([bd,PC,Ix],od)
([bd,zPC,Ix],od)
examples:-
([bd]) ([100.w]) ([100.l])
([An]) ([A0])
([PC]) ([PC])
([zPC]) ([zPC])
([Ix]) ([D0.w]) ([D0.l]) ([A0.l*4])
--------------------------------------------------------------------------------
Memory Indirect With Postindex (not CPU32)
([],Ix) ***
([bd,An],Ix,od)
([bd,PC],Ix,od)
([bd,zPC],Ix,od)
examples:-
([bd],Ix) ([100],D0.w) ([100.w],D0.l) ([100.l],A1.w*4)
([An],Ix) ([A0],D0.w) ([A0],D0.l) ([A0],A1.w*4)
([PC],Ix) ([PC],D0.w) ([PC],D0.l) ([PC],A1.w*4)
([zPC],Ix) ([zPC],D0.w) ([zPC],D0.l) ([zPC],A1.w*4)
--------------------------------------------------------------------------------
the expression between [] is evaluated, a long from that memory address is read,
and the rest of the expression is added (I assume this is how it works, I have
never been able to test it).
postindex :- ([100.w,A0],D0.l*4,200.l)
������������������������������������������������������������������������������ͻ
� Acknowledgments, Disclaimer �
������������������������������������������������������������������������������ͼ
This file is part of the CrossFire package. Feel free to modify this file for
your own use, but if you distribute it, please distribute the whole unmodified
demonstration package (do NOT distribute the registered version). Add files if
you like, but try to keep them in the 'EXTRA' directory.
Disclaimer