undar-lang/test/hello.ul.ir

28 lines
624 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_address message -> hello;
call pln hello;
exit 0;
function pln (str message $0)
plex term $1;
int msg_length $2;
str nl $3;
int nl_length $4;
int mode $5;
str term_ns $6;
load_immediate 0 -> mode;
load_address terminal_namespace -> term_ns;
syscall OPEN term_ns mode -> term;
string_length message -> msg_length;
syscall WRITE term message msg_length;
load_address new_line -> nl;
string_length nl -> nl_length;
syscall WRITE term nl nl_length;
return;