I have a problem, and it's starts with doing two loops. I do not know how to do it. Could anyone just show me how to use 2 loops. Could you show me how to use a nested loop that will add numbers.

Title COLOR MATRIX

include Irvine32.inc

.code
main PROC

mov eax, 0
mov ecx,3

              OUTER:
                   
               inc eax
               call Writeint
                  
				  INNER:

				  inc eax
                  call Writeint
				  loop INNER
               loop OUTER;
exit
main ENDP
END main
Outer:   inc eax
            call Writeint
            push ecx
            mov  ecx, 3
Inner:   inc eax
            call Writeint
            loop Inner
            pop  ecx
            loop Outer

Your not very specific with iterators, so I assume you want to loop 3 times inner for every outer. If not, you just have to change the value of ECX before entering inner loop

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.