format binary use32 org $1000000 jmp __global_0 ; CONST N -> integer, 20 ; DECL a -> integer, 0 ; DECL b -> integer, 0 ; DECL c -> integer, 0 ; DECL d -> integer, 0 ; DECL e -> integer, 0 __global_0: ; LET a <- 1 mov eax, 1 push eax pop eax mov [a], eax ; LET b <- 7 mov eax, 7 push eax pop eax mov [b], eax ; LET c <- 20 mov eax, 20 push eax pop eax mov [c], eax ; LET a <- b mov eax, [b] push eax pop eax mov [a], eax ; LET a <- a 1 + mov eax, [a] push eax mov eax, 1 push eax pop ebx pop eax add eax, ebx push eax pop eax mov [a], eax ; LET d <- a c * b + mov eax, [a] push eax mov eax, [c] push eax pop ebx pop eax mul ebx push eax mov eax, [b] push eax pop ebx pop eax add eax, ebx push eax pop eax mov [d], eax ; LET d <- a c b + * mov eax, [a] push eax mov eax, [c] push eax mov eax, [b] push eax pop ebx pop eax add eax, ebx push eax pop ebx pop eax mul ebx push eax pop eax mov [d], eax ; LET e <- 7 a * b + 2 b a + 3 + * + 2 * mov eax, 7 push eax mov eax, [a] push eax pop ebx pop eax mul ebx push eax mov eax, [b] push eax pop ebx pop eax add eax, ebx push eax mov eax, 2 push eax mov eax, [b] push eax mov eax, [a] push eax pop ebx pop eax add eax, ebx push eax mov eax, 3 push eax pop ebx pop eax add eax, ebx push eax pop ebx pop eax mul ebx push eax pop ebx pop eax add eax, ebx push eax mov eax, 2 push eax pop ebx pop eax mul ebx push eax pop eax mov [e], eax hlt e: dd $00000000 d: dd $00000000 c: dd $00000000 b: dd $00000000 a: dd $00000000