summaryrefslogtreecommitdiff
path: root/ecomp-c/tests/variable_initialization.easm
diff options
context:
space:
mode:
Diffstat (limited to 'ecomp-c/tests/variable_initialization.easm')
-rw-r--r--ecomp-c/tests/variable_initialization.easm16
1 files changed, 16 insertions, 0 deletions
diff --git a/ecomp-c/tests/variable_initialization.easm b/ecomp-c/tests/variable_initialization.easm
new file mode 100644
index 0000000..facf5d4
--- /dev/null
+++ b/ecomp-c/tests/variable_initialization.easm
@@ -0,0 +1,16 @@
+format binary
+use32
+org $1000000
+; CONST N -> integer, 1
+; DECL a -> integer, 0
+; DECL b -> integer, 1
+; DECL c -> integer, 0
+; LET c <- 2
+mov eax, 2
+push eax
+pop eax
+mov [c], eax
+hlt
+c: dd $00000000
+b: dd $00000001
+a: dd $00000000