35
The 68000's Instruction Set
MOVEM Move multiple registers
Operation 1 : REPEAT
[destination_register]
← [source]
UNTIL all registers in list moved
Operation 2: REPEAT
[destination]
← [source_register]
UNTIL all registers in list moved
Syntax 1: MOVEM <ea>,<register list>
Syntax 2: MOVEM <register list>,<ea>
Sample syntax: MOVEM.L D0-D7/A0-A6,$1234
MOVEM.L (A5),D0-D2/D5-D7/A0-A3/A6
MOVEM.W (A7)+,D0-D5/D7/A0-A6
MOVEM.W D0-D5/D7/A0-A6,-(A7)
Attributes: Size = word, longword
Description: The group of registers specified by <register list> is copied to
or from consecutive memory locations. The starting location is
provided by the effective address. Any combination of the 68000s
sixteen address and data registers can be copied by a single MOVEM
instruction. Note that either a word or a longword can be moved,
and that a word is sign-extended to a longword when it is moved
(even if the destination is a data register).
When a group of registers is transferred to or from memory
(using an addressing mode other than pre-decrementing or post-
incrementing), the registers are transferred starting at the specified
address and up through higher addresses. The order of transfer
of registers is data register D0 to D7, followed by address register
A0 to A7.
For example, MOVEM.L D0-D2/D4/A5/A6,$1234 moves registers
D0,D1,D2,D4,A5,A6 to memory, starting at location $1234 (in
which D0 is stored) and moving to locations $1238, $123C,... Note
that the address counter is incremented by 2 or 4 after each move
according to whether the operation is moving words or
longwords, respectively.
If the effective address is in the pre-decrement mode (i.e.,
-(An)), only a register to memory operation is permitted. The
registers are stored starting at the specified address minus two
(or four for longword operands) and down through lower
addresses. The order of storing is from address register A7 to
address register A0, then from data register D7 to data register