Initial commit
This commit is contained in:
43
test.src
Normal file
43
test.src
Normal 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
|
||||
Reference in New Issue
Block a user