dbra
Decrement and branch
Decrements the first operand by 1 and branches to the specified address if the first operand is not -1.
Size .w
XNZVC –––––
- Changes no flag
Forms
dbra ,
Operands
dbra is the same as dbf (will decrement until it reaches -1)
* --- Loops d0+1 times (counter goes 5,4,3,2,1,0,-1 then stops) ---
move.l #5, d0
move.l #0, d1
loop:
addq.l #1, d1
dbra d0, loop
; d1 = 6 (looped 6 times)