Skip to main content

mov

The move instructions copy data from one register or memory location to another.

InstructionEncodingSemanticsCycles
mov reg8, imm800 rrr 010 imm8reg8imm8\mathit{reg8} \gets \mathit{imm8}2/33/54/65
mov dreg8, sreg8110 ddd rrrdreg8sreg8\mathit{dreg8} \gets \mathit{sreg8}2/33,6/44,7/55
mov [imm16], acc10 111 110 imm16mem[imm16]acc\mathit{mem}[\mathit{imm16}] \gets \mathit{acc}6/78
mov acc, [imm16]10 110 111 imm16accmem[imm16]\mathit{acc} \gets \mathit{mem}[\mathit{imm16}]6/78
mov [reg16], acc11 00 00wwmem[reg16]acc\mathit{mem}[\mathit{reg16}] \gets \mathit{acc}3/48
mov [reg16++], acc11 00 01wwmem[reg16]acc;reg16reg16+1\mathit{mem}[\mathit{reg16}] \gets \mathit{acc};\\\mathit{reg16} \gets \mathit{reg16} + 14/58
mov [--reg16], acc11 00 10wwreg16reg161;mem[reg16]acc\mathit{reg16} \gets \mathit{reg16} - 1;\\\mathit{mem}[\mathit{reg16}] \gets \mathit{acc}4/58
mov [reg16+imm8s16], acc11 00 11ww imm8mem[reg16+sext(imm8)]acc\mathit{mem}[\mathit{reg16} + \mathit{sext}(\mathit{imm8})] \gets \mathit{acc}6/78/89/98 and 9
mov acc, [reg16]11 01 00wwaccmem[reg16]\mathit{acc} \gets \mathit{mem}[\mathit{reg16}]3/48
mov acc, [reg16++]11 01 01wwaccmem[reg16];reg16reg16+1\mathit{acc} \gets \mathit{mem}[\mathit{reg16}];\\\mathit{reg16} \gets \mathit{reg16} + 14/58
mov acc, [--reg16]11 01 10wwreg16reg161;accmem[reg16]\mathit{reg16} \gets \mathit{reg16} - 1;\\\mathit{acc} \gets \mathit{mem}[\mathit{reg16}]4/58
mov acc, [reg16+imm8s16]11 01 11ww imm8accmem[reg16+sext(imm8)]\mathit{acc} \gets \mathit{mem}[\mathit{reg16} + \mathit{sext}(\mathit{imm8})]6/78/89/98 and 9
mov reg16, imm1611 10 11ww imm16reg16imm16\mathit{reg16} \gets \mathit{imm16}3
mov dreg16, sreg16211 11 vvwwdreg16sreg16\mathit{dreg16} \gets \mathit{sreg16}3
  1. no identity movs (ddd = rrr), no mov [pi], acc (ddd = 110 and rrr = 111), and no mov acc, [pi] (ddd = 111 and rrr = 110)
  2. no identity movs (vv = ww)
  3. if the destination register is acc
  4. if the destination is [pi] and without prefix_a16
  5. if the destination is [pi] and with prefix_a16 (the cycle of prefix_a16 itself is not included)
  6. if the source is [pi] and without prefix_a16
  7. if the source is [pi] and with prefix_a16
  8. with prefix_a16
  9. if (reg16+sext(imm8))[8:15]reg16[8:15](\mathit{reg16} + \mathit{sext}(\mathit{imm8}))[8:15] \neq \mathit{reg16}[8:15]