From 12679f9be4bd3a924ca0859a7ad133178513bace Mon Sep 17 00:00:00 2001 From: Kyle Gunger Date: Mon, 25 Mar 2024 21:56:52 -0400 Subject: Better tmp handling --- tnslc/main.tnsl | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) (limited to 'tnslc/main.tnsl') diff --git a/tnslc/main.tnsl b/tnslc/main.tnsl index c7e8c95..cf2e8ac 100644 --- a/tnslc/main.tnsl +++ b/tnslc/main.tnsl @@ -1,15 +1,30 @@ :import "c_wrap_linux.tnsl" :import "vector.tnsl" -/; main [int] +/; push_char(Vector` a, uint8 c) + a.push(~c) +;/ +/; main [int] Vector a a.init(1) - + push_char(~a, 'h') + push_char(~a, 'e') + push_char(~a, 'l') + push_char(~a, 'l') + push_char(~a, 'o') + push_char(~a, ' ') + push_char(~a, 'w') + push_char(~a, 'o') + push_char(~a, 'r') + push_char(~a, 'l') + push_char(~a, 'd') + push_char(~a, '\n') + push_char(~a, 0) + _printf(a.data) a.end() - return 0 ;/ -- cgit v1.2.3