mov r1,N loop: // do something with r1 dec r1 // must set/clear zero flag depending on value of r1 jnz loop