Include Irvine32.inc
.data
count dword ?
string byte 0ah , "it is internal loop",0ah,0
string1 byte 0ah , "it is middle loop",0ah,0
string2 byte 0ah , "it is external loop",0ah,0
.code
main PROC
mov ebx,0
mov ecx,3 ;external loop value
L1:
mov edx,offsetstring2
call writestring
mov eax , ecx
call writedec
mov count, ecx
mov ecx, 2 ;middle loop value
add ebx , 1
L2:
mov edx, offsetstring1
call writestring
mov eax, ecx
call writedec
mov count, ecx
mov ecx, 1 ;internal loop value
add ebx , 2
L3:
mov edx, offsetstring
call writestring
mov eax , ecx
call writedec
;call dumpregs
loop L3
mov ecx , count
loop L1
call dumpregs
main endp
end main
please run this program
What I have tried:
Include Irvine32.inc
.data
count dword ?
string byte 0ah , "it is internal loop",0ah,0
string1 byte 0ah , "it is middle loop",0ah,0
string2 byte 0ah , "it is external loop",0ah,0
.code
main PROC
mov ebx,0
mov ecx,3
L1:
mov edx,offsetstring2
call writestring
mov eax , ecx
call writedec
mov count, ecx
mov ecx, 2
add ebx , 1
L2:
mov edx, offsetstring1
call writestring
mov eax, ecx
call writedec
mov count, ecx
mov ecx, 1
add ebx , 2
L3:
mov edx, offsetstring
call writestring
mov eax , ecx
call writedec
loop L3
mov ecx , count
loop L1
call dumpregs
main endp
end main