Assembly
Compiler Optimizations
mov esi, source_address
mov ebx, ecx
shr ecx, 2 // length divided by four
mov edi, eax // destination address
repe movsd // copy four byte blocks
mov ecx, ebx
and ecx, 3 // remainder size
repe movsb // copy it
Example from The Shellcoder's Handbook Chapter 21mov edi, string
or ecx, 0xffffffff
xor eax, eax
repne scasb //scans edi for the lowbyte in eax (looking for null terminator) and decriments ecx for each charecter not == 0
not ecx
dec ecx
Example from The Shellcoder's Handbook Chapter 21Calling Convention
Last updated