4 ms·
On the Motorola 68000, the MOVE instruction is used to move data from one location (memory or a register) to another location (memory or register). The size of
by spc476 10y ago
On the Motorola 68000, the MOVE instruction is used to move data from one location (memory or a register) to another location (memory or register). The size of the move is encoded in the instruction (two bits, only three patterns are legal). The instruction will affect the flags (set the Zero and Negative flags, clear the Carry and Overflow flags) based on value moved, except if the destination is an address register, in which case, the flags are not affected (and only two of the four bit patterns for size are valid).
In fact, Motorola defined two instructions because of this, MOVE and MOVEA (move to address register). So, is this really one instruction (since both follow basically the same pattern)? Two instructions (because one sets the flags, the other doesn't)? Five (size and flags)?
Also, the invalid bits (for size) are used to indicate other instructions, so there's a bit of overlap in decoding instructions.