The document discusses how a for loop can be recognized in assembly code. It notes that a for loop contains instructions for changing a counter, comparing the counter, and making jumps. Specifically, a for loop in assembly would contain instructions that increment a counter, compare the counter to a limit, and make jumps to repeat the loop based on the comparison.
17. by the presence of the
instructions of…
Counter changing
Counter comparison
Jumps
18. by the presence of the
instructions of…
Counter changing
Counter comparison
Jumps
19. _main proc near
push esi
xor esi, esi
loc_401003:
push esi
push offset “%xquot;
call _printf
add esp, 8
inc esi
cmp esi, 0FFh
jl short loc_401003
xor eax, eax
pop esi
retn
_main endp
20. _main proc near
push esi
xor esi, esi
loc_401003:
push esi
push offset “%xquot;
call _printf
add esp, 8
inc esi
cmp esi, 0FFh
jl short loc_401003
xor eax, eax
pop esi
retn
_main endp
21. by the presence of the
instructions of…
Counter changing
Counter comparison
Jumps
22. by the presence of the
instructions of…
Counter changing
Counter comparison
Jumps
23. _main proc near
push esi
xor esi, esi
loc_401003:
push esi
push offset “%xquot;
call _printf
add esp, 8
inc esi
cmp esi, 0FFh
jl short loc_401003
xor eax, eax
pop esi
retn
_main endp
24. _main proc near
push esi
xor esi, esi
loc_401003:
push esi
push offset “%xquot;
call _printf
add esp, 8
inc esi
cmp esi, 0FFh
jl short loc_401003
xor eax, eax
pop esi
retn
_main endp
25. by the presence of the
instructions of…
Counter changing
Counter comparison
Jumps
26. by the presence of the
instructions of…
Counter changing
Counter comparison
Jumps
27. _main proc near
push esi
xor esi, esi
loc_401003:
push esi
push offset “%xquot;
call _printf
add esp, 8
inc esi
cmp esi, 0FFh
jl short loc_401003
xor eax, eax
pop esi
retn
_main endp
28. _main proc near
push esi
xor esi, esi
loc_401003:
push esi
push offset “%xquot;
call _printf
add esp, 8
inc esi
cmp esi, 0FFh
jl short loc_401003
xor eax, eax
pop esi
retn
_main endp
29. by the presence of the
instructions of…
Counter changing
Counter comparison
Jumps