summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKyle Gunger <kgunger12@gmail.com>2023-05-13 23:22:48 -0400
committerKyle Gunger <kgunger12@gmail.com>2023-05-13 23:22:48 -0400
commit87fe73831fd1967b0ed48f8664305061dd0f34c5 (patch)
tree7c110141abe2dc7dc70081d515528859ba5c39e4
parent4a5751ef9fa7775732d749d6d9688131f2aaa199 (diff)
Hello world in tnsl
-rw-r--r--tnslc/tnslc_wrapped.tnsl11
1 files changed, 5 insertions, 6 deletions
diff --git a/tnslc/tnslc_wrapped.tnsl b/tnslc/tnslc_wrapped.tnsl
index 398db47..8643a01 100644
--- a/tnslc/tnslc_wrapped.tnsl
+++ b/tnslc/tnslc_wrapped.tnsl
@@ -1,5 +1,8 @@
:include "c_wrap.tnsl"
+{}uint8 _name = "Hello World!"
+int _stop = 0
+
/; main (int argc, ~~uint argv) [int]
# On windows, the first two arguments are passed in RCX and RDX, so we need to
# update their positions here or else tnsl will have garbage values in r8 and r9
@@ -11,10 +14,6 @@
# asm "mov r8, rdi"
# asm "mov r9, rsi"
- Vector vec
- vec.start(1)
- uint8 a = 1
- vec.push(~a)
- ~uint8 v = vec.get(0)
- return v`
+ _printf(~_name{0})
+ return 0
;/ \ No newline at end of file