addq
Add quick
Adds an immediate value from 1 to 8 to the second operand.
Sizes .b .w .l, .w by default
Used in
- Exceptions and the vector tableM68K assembly
- Interrupts and cyclesM68K assembly
- Fill an array with the numbers from 1 to 10M68K assembly
- The largest elementM68K assembly
- Length of a stringM68K assembly
- Bit tests, shifts, masks and counting set bitsM68K assembly
- Bubble sortM68K assembly
- Binary searchM68K assembly
- The snake gameM68K assembly
- Flappy ASMM68K assembly
XNZVC ●●●●●
- ● depends on the result
Forms
Operands
#imm- An immediate from
1to8, for example#1. More <ea>- An operand using one of the addressing modes listed for this form. The list determines whether it can be a register, memory or an immediate value. With
opt p=68020, an allowedd(An,Xn)ord(PC,Xn)mode also permits the corresponding 68020 indexed and memory indirect forms. See 68020 addressing. More
The first operand value must be between 1 and 8. If the destination is an address register, it is always treated as a long, and the condition codes are not affected.
move.l #0, d0
addq.l #8, d0
addq.l #1, d0
; addq.w #9, d0 ; error! immediate must be 1-8