undar-lang/test/hello.ul.ir

28 lines
600 B
Plaintext

global str terminal_namespace = "/dev/term/0"
global str new_line = "\n"
global str message = "nuqneH 'u'?"
function main ()
str hello $0;
load_immediate message -> hello;
call pln hello -> void;
exit 0;
function pln (str message $0)
str ts $1;
int mode $5;
int msg_length $2;
str nl $3;
int nl_length $4;
load_immediate terminal_namespace -> ts;
load_immediate 0 -> mode;
syscall OPEN ts mode -> ts;
string_length message -> msg_length;
syscall WRITE ts message msg_length;
load_immediate new_line -> nl;
string_length nl -> nl_length;
syscall WRITE ts nl nl_length;
return;