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