Assembly Language for Beginners

(Jeff_L) #1

1.20. ARRAYS


xor eax, eax
mov esp, ebp
pop ebp
ret 0
_main ENDP


Nothing very special, just two loops: the first is a filling loop and second is a printing loop. Theshl ecx,
1 instruction is used for value multiplication by 2 inECX, more about below1.18.2 on page 217.


80 bytes are allocated on the stack for the array, 20 elements of 4 bytes.

Free download pdf