First commit
This commit is contained in:
11
examples/99.mga
Normal file
11
examples/99.mga
Normal file
@ -0,0 +1,11 @@
|
||||
INT i
|
||||
INT im
|
||||
SET i 99
|
||||
:beg
|
||||
OUT bottles of beer on the wall,$i$ bottles of beer\n
|
||||
CP im i
|
||||
DEC im 1
|
||||
OUT Take one down and pass it around, $im$ bottles of beer on the wall\n
|
||||
DEC i 1
|
||||
JME beg i 1
|
||||
END
|
19
examples/rect.mga
Normal file
19
examples/rect.mga
Normal file
@ -0,0 +1,19 @@
|
||||
OUT I will draw a rectangle\n
|
||||
INT w
|
||||
INT h
|
||||
IN INT w l
|
||||
IN INT h h
|
||||
INT wr
|
||||
INT hr
|
||||
SET wr 0
|
||||
SET hr 0
|
||||
:wrc
|
||||
:wf
|
||||
OUT *
|
||||
INC wr
|
||||
JL wf wr w
|
||||
OUT \n
|
||||
SET wr 0
|
||||
INC hr
|
||||
JL wrc hr h
|
||||
END
|
Reference in New Issue
Block a user