Integer Instructions
4-128 M68000 FAMILY PROGRAMMER’S REFERENCE MANUAL MOTOROLA
MOVEM Move Multiple Registers MOVEM
(M68000 Family)
Operation: Registers → Destination; Source → Registers
Assembler MOVEM < list > , < ea >
Syntax: MOVEM < ea > , < list >
Attributes: Size = (Word, Long)
Description: Moves the contents of selected registers to or from consecutive memory
locations starting at the location specified by the effective address. A register is
selected if the bit in the mask field corresponding to that register is set. The instruction
size determines whether 16 or 32 bits of each register are transferred. In the case of a
word transfer to either address or data registers, each word is sign-extended to 32 bits,
and the resulting long word is loaded into the associated register.
Selecting the addressing mode also selects the mode of operation of the MOVEM
instruction, and only the control modes, the predecrement mode, and the postincre-
ment mode are valid. If the effective address is specified by one of the control modes,
the registers are transferred starting at the specified address, and the address is incre-
mented by the operand length (2 or 4) following each transfer. The order of the regis-
ters is from D0 to D7, then from A0 to A7.
If the effective address is specified by the predecrement mode, only a register-to-mem-
ory operation is allowed. The registers are stored starting at the specified address
minus the operand length (2 or 4), and the address is decremented by the operand
length following each transfer. The order of storing is from A7 to A0, then from D7 to
D0. When the instruction has completed, the decremented address register contains
the address of the last operand stored. For the MC68020, MC68030, MC68040, and
CPU32, if the addressing register is also moved to memory, the value written is the ini-
tial register value decremented by the size of the operation. The MC68000 and
MC68010 write the initial register value (not decremented).
If the effective address is specified by the postincrement mode, only a memory-to-reg-
ister operation is allowed. The registers are loaded starting at the specified address;
the address is incremented by the operand length (2 or 4) following each transfer. The
order of loading is the same as that of control mode addressing. When the instruction
has completed, the incremented address register contains the address of the last oper-
and loaded plus the operand length. If the addressing register is also loaded from
memory, the memory value is ignored and the register is written with the postincre-
mented effective address.