Skip to main content

MOVE

Set the left register to the value of the right operand (register or literal value).

OpcodeBytesCyclesFormExample
$4032MOVE B:_, {BYTE}MOVE B:1, 123
$4132MOVE P:_, {S_BYTE}MOVE P:2, 123
$B242MOVE P:_, {PAIR}MOVE P:2, 12345
$4232MOVE I:_, {S_BYTE}MOVE I:4, 123
$B342MOVE I:_, {S_PAIR}MOVE I:4, 12345
$E252MOVE I:_, {U_TRIO}MOVE I:4, $12_3ABC
$4332MOVE I:_, XHEX {XINT}MOVE I:4, XHEX $D000_0000
$4433MOVE B:_, B:_MOVE B:1, B:2
$4533MOVE P:_, P:_MOVE P:2, P:4
$4633MOVE I:_, I:_MOVE I:4, I:8
$2622MOVE SP, I:_MOVE SP, I:4
$2722MOVE I:_, SPMOVE I:4, SP
$B441MOVE FP, {U_TRIO}MOVE FP, $12_3ABC
$1411MOVE FP, SPMOVE FP, SP
$1511MOVE SP, FPMOVE SP, FP

Notes

  • The left operand is the target where the output will go.

  • For example, MOVE P:0, 123 puts the literal value 123 into register P:0.

  • For example, MOVE B:1, B:2 copies the value of B:2 into the register B:1.

  • For example, MOVE I:4, XHEX $D000_0000 puts the value $D000_0000 into I:4. Large numbers must be compatible with XHEX encoding.

  • This instruction does not affect the CPU condition flags.

Jump forms

Two forms of the JUMP pseudo-instruction are actually implemented as MOVE instructions involving the IP register:

OpcodeBytesCyclesRaw formJump example
$B541MOVE IP, {U_TRIO}JUMP FIXED $12_3ABC
$2822MOVE IP, I:_JUMP I:4