First a little background. The z80 CPU has an instruction called DJNZ which can be used in a similar manner as a for
loop. Basically DJNZ decrements the B register and jumps to a label if not zero. For example:
ld b,96 ; erase all of the line
disp_version_erase_loop:
call _vputblank ; erase pixels at cursor (uses b reg)
djnz disp_version_erase_loop ; loop
Of course you can do the same thing using regular comparison and jump instructions, but often it is handy to use the single instruction.
With that out of the way, my question is, do other CPU architectures include a similar control instruction?