Implemented substitute-number, restore-frame and save-frame on MIPS
[voodoo-lang.git] / test / goto.voo
blob2b98a40eb318810802d0fec6334474d43bd9041b
1 #### Test program for goto
3 section data
4 format:
5 string "%d\x0a\x00"
7 section functions
8 import exit printf
9 export main
11 main:
12 function argc argv
13     let n 10
14 lbl:
15     call printf format n
16     set n sub n 1
17     ifgt n 0
18         goto lbl
19     end if
21     let x ok
22     goto x
24     call exit 9
26 ok:
27     return 0
28 end function