Yep, Looping. This is most similar to a FOR loop in High Level Languages.
Patater GBAGuy Mirror
The LOOP Instruction
The LOOP instruction works like so:
mov cx,200 ; note that without 'h' that 200 is a decimal value (base 10).
loop AdditionLoop ; will add 3 to AX, 200 times.
Each time LOOP is executed, CX is decremented and if it's not zero, the label specified is
DEC and INC Instructions
Now would be a great time to tell you about DEC and INC.
DEC subtracts 1 from a register or memory location and INC adds 1.
inc ax ; AX++; or AX = AX + 1;
dec dx ; DX--; or DX = DX - 1;
var dw 0
dec var ; should work, I think. var--; or var = var - 1;
This Day In Review
I'm running out of easy instructions. Look for output oriented stuff soon!
Intro - Day 11