Initial commit

This commit is contained in:
Lucia Ceionia
2023-05-12 16:54:29 -05:00
commit 1f6da72364
14 changed files with 1783 additions and 0 deletions

43
test.src Normal file
View File

@@ -0,0 +1,43 @@
extern printfd;
extern puts;
fn ack(m i32 n i32) endvar
if m 0 eq then
n 1+ ret;
elif n 0 eq then
(m 1- 1)ack ret;
else
(m 1- (m n 1-)ack)ack ret;
end
endfn
fn foo(ptr pi32) endvar
ptr* ptr* 1+:=
endfn
fn main(argc i32 argv ppi8)
x y u32;
ptr ppi8;
endvar
0 y=:;
loop
y 4 eq breakif;
0 x=:;
loop
x 4 eq breakif;
((y x)ack)printfd;
(x&)foo
end
y 1 + y=:;
end
x argc :=;
ptr argv :=;
loop
x 0 eq ptr* 0 eq or breakif;
(ptr*)puts;
x 1 - x=:;
ptr 4+ ptr=:;
end
endfn