loops can probably also be determined by looking for comparisons followed by conditional jumps to a previously defined label, for example if there are labels with matching conditional jumps (i.e. after a comparison), a loop can be derived:
start: nop ; entry point
mvi a,250 ; 250 iterations
loop: nop ; loop entry point
dcr a ; decrement loop counter by 1
cpi 0 ; compare against 0
jnz loop ; if comparison is not true, jump to beginning of loop
; loop exit
hlt
Logged In: NO
loops can probably also be determined by looking for comparisons followed by conditional jumps to a previously defined label, for example if there are labels with matching conditional jumps (i.e. after a comparison), a loop can be derived:
start: nop ; entry point
mvi a,250 ; 250 iterations
loop: nop ; loop entry point
dcr a ; decrement loop counter by 1
cpi 0 ; compare against 0
jnz loop ; if comparison is not true, jump to beginning of loop
; loop exit
hlt