moveq

Sizes

long

Default Size

long

Affected Flags

X
N
Z
V
C
-
✱
✱
0
0

Operands

Op 1
Im
Op 2
Dn

Moves an 8-bit encoded value from -128 through 255 into a data register and sign extends it to 32 bits. 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