aboutsummaryrefslogtreecommitdiff
path: root/tests/bytecode.amal
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2019-08-18 06:25:52 +0200
committerdec05eba <dec05eba@protonmail.com>2020-07-25 14:36:46 +0200
commitc1bea102df3f2907f345b89ff0f66f5055ac4767 (patch)
tree309d26329d190e24e9b4ebc36e89c42e369f0560 /tests/bytecode.amal
parent81c5f8e750fcda6a2451fb54604130431434f88f (diff)
Add extern funcs, parameter registers, fix asm_rm RSP bug
Diffstat (limited to 'tests/bytecode.amal')
-rw-r--r--tests/bytecode.amal9
1 files changed, 6 insertions, 3 deletions
diff --git a/tests/bytecode.amal b/tests/bytecode.amal
index dd9bd3d..096f921 100644
--- a/tests/bytecode.amal
+++ b/tests/bytecode.amal
@@ -1,4 +1,5 @@
-extern const printf: fn;
+extern const print_extern: fn;
+extern const print_extern_num: fn(num: i32);
const main = fn {
var value = 23;
@@ -6,9 +7,8 @@ const main = fn {
const value2: i64 = 23;
const value3 = 2 + 5 - 1 * 10 / 2;
const str_value = "hello, world";
- //printf();
print();
- const result = print_num(value3);
+ const result = print_num(1337);
}
const print = fn {
@@ -16,5 +16,8 @@ const print = fn {
}
const print_num = fn(num: i32) i32 {
+ print_extern();
+ print_extern_num(num);
+ print_extern_num(8080);
return num;
} \ No newline at end of file