2023-01-02 11:06:24 +00:00
|
|
|
extern function say_hello
|
|
|
|
|
|
|
|
extern function print
|
|
|
|
|
|
|
|
extern function println
|
|
|
|
|
|
|
|
extern function print
|
|
|
|
|
|
|
|
extern function println
|
|
|
|
|
|
|
|
fac:
|
|
|
|
Load Arg x
|
|
|
|
Load Int 1
|
|
|
|
NotEq Int
|
|
|
|
Unless
|
|
|
|
Load Int 1
|
|
|
|
Yield
|
|
|
|
Load Arg x
|
|
|
|
Load Int 1
|
|
|
|
Sub Int
|
|
|
|
Call fac
|
|
|
|
Load Arg x
|
|
|
|
Mul Int
|
|
|
|
Yield
|
|
|
|
|
2022-12-06 14:02:03 +00:00
|
|
|
main:
|
|
|
|
Load Int 0
|
2022-12-06 21:48:52 +00:00
|
|
|
Store Int x
|
|
|
|
Loop
|
2023-01-02 11:06:24 +00:00
|
|
|
Loopstart
|
2022-12-06 21:48:52 +00:00
|
|
|
Load Var x
|
2023-01-02 11:06:24 +00:00
|
|
|
Load Int 9
|
|
|
|
Gt Int
|
|
|
|
While
|
|
|
|
Load Var x
|
|
|
|
Load Int 5
|
|
|
|
NotEq Int
|
|
|
|
Unless
|
|
|
|
Load Var x
|
|
|
|
Load Int 1
|
|
|
|
Add Int
|
|
|
|
Store Int x
|
|
|
|
Continue
|
|
|
|
Load String ""
|
|
|
|
Load Var x
|
|
|
|
Cat Str
|
|
|
|
Call println
|
|
|
|
Load Var x
|
|
|
|
Load Int 1
|
|
|
|
Add Int
|
|
|
|
Store Int x
|
|
|
|
Break
|
|
|
|
Load Int 0
|
2022-11-14 16:50:34 +00:00
|
|
|
Yield
|
2022-12-06 14:02:03 +00:00
|
|
|
|