1
Programming with NASM / Re: How many for loops are possible in nasm ?
« Last post by Roddy MacPhee on May 24, 2024, 05:14:21 PM »I would think that you can use as many loops as you want. It's down to the programmer to write appropriate code and algorithms.
Code: [Select]
mov <register>,1
loop:
inc <register>
cmp <register> <limit>
jne loop
Code: [Select]
mov <register>,1
loop:
add <register>,1
cmp <register> <limit>
jne loop
With 20+ registers and then some. Unlike what you thought they can't all be used at once( at least without complex additions) . Some have uses doing other things. You can also have a decreasing version. Another factor is replacing jne with other conditional jumps ...