.386
.model flat, stdcall
option casemap : none
includelib msvcrt.lib
printf PROTO C :dword, :vararg
.data
printResult byte 'result is % d, loop tot is %d', 0ah, 0
.code
start proc
push eax
push ebx
push ecx
push edi
push esi
xor esi, esi
mov ebx, 16
mov ecx, 10
a10:
inc esi
mov eax, ebx
mul eax
mov edi, eax
mov eax, ecx
mul ecx
sub edi, eax
cmp edi, 168
jb addEbx
ja addEcx
sub eax, 100
jmp showResult
addEbx:
inc ebx
jmp a10
addEcx:
inc ecx
jmp a10
showResult:
invoke printf, offset printResult, eax, esi
pop eax
pop ebx
pop ecx
pop edi
pop esi
ret
start endp
end start