“Arithmetical”
Project – Calculations (Picture 5)
•eax := address a
•[eax] := 1 ; [a] = 1
•ebx := address b
•[ebx] := 1 ; [b] = 1
•[ebx] := [ebx] + [eax]
• ; [b] = 2
•[ebx] := [ebx] * 2
• ; [b] = 4
lea eax, a
mov [eax], 1
lea ebx, b
mov [ebx], 1
mov eax,
[eax]
add [ebx],
eax
inc eax
imul [ebx]
mov [ebx], eax