moveq
Move quick
Moves a byte immediate from -128 through 255 into a data register, sign extended to long.
Size .l
Used in
- trap #15 and its tasksM68K assembly
- Binary searchM68K assembly
- A 2D arrayM68K assembly
- Flappy birdM68K assembly
- Play a WAV and a MIDI fileM68K assembly
- Sampled soundM68K assembly
XNZVC –●●00
- ● set from the result
- 0 always 0
- – not changed
Forms
moveq ,
Operands
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