moveq

Move quick

Moves a byte immediate from -128 through 255 into a data register, sign extended to long.

Size .l

Used in
XNZVC –●●00
  • ● set from the result
  • 0 always 0
  • – not changed

Forms

  • moveq ,

Operands

#imm
An 8-bit immediate, -128 to 255, sign-extended to 32 bits, for example #-1 or #$7F. Values 128 to 255 represent -128 to -1. More
Dn
A data register, d0 to d7. More

Values 128 through 255 are the unsigned spellings of -128 through -1.

moveq #100, d0
moveq #-1, d1
moveq #255, d2 ; the encoded byte is $ff, so d2 becomes -1
moveq #-128, d3
; moveq #256, d4 ; error! the encoded value must be -128..255