mirror of
https://github.com/azur1s/bobbylisp.git
synced 2024-10-16 02:37:40 -05:00
18 lines
269 B
Plaintext
18 lines
269 B
Plaintext
my_add x y:
|
|
0:
|
|
v0 = iadd x y
|
|
ret v0
|
|
|
|
factorial x:
|
|
0:
|
|
v0 = eq x 1
|
|
jf v0 1
|
|
ret x
|
|
1:
|
|
v0 = isub x 1
|
|
v1 = call factorial v0
|
|
v2 = imul x v1
|
|
ret v2
|
|
|
|
v0 = call my_add 2 3
|
|
v1 = call factorial v0 |