summaryrefslogtreecommitdiff
path: root/ecomp-c/tests/variable_assign_from_variable.easm
blob: d40e87b473abe109769ae57220b65c626821c742 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
format binary
use32
org $1000000
jmp __global_0
; CONST N -> integer, 20
; DECL a -> integer, 0
; DECL b -> integer, 0
__global_0:
; LET a <- 20 
mov eax, 20
push eax
pop eax
mov [a], eax
; LET b <- a 
mov eax, [a]
push eax
pop eax
mov [b], eax
hlt
b: dd $00000000
a: dd $00000000