A Crash Course in x86 Assembly for Reverse Engineers

(Jeff_L) #1

1.7.5 Loops


1.7.5.1 C


c = 0;
while (c < 1000) {
array[c] = c;
c++;
}


1.7.5.2 x86 assembly


*mov ecx, DWORD PTR [array]
xor eax, eax
LoopStart:
mov DWORD PTR [ecx+eax
4], eax
add eax, 1
cmp eax, 1000
jl LoopStart**

Free download pdf