Croissant Runtime
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
crsn/examples/factorial.csn

15 lines
239 B

(
(proc main
(call fac 5)
(ld r0 res0)
(halt)
)
(proc fac
(cmp arg0 2
(eq? (ret 2)))
(sub r0 arg0 1)
(call fac r0)
(mul r0 arg0 res0)
(ret r0)
)
)