marble/programs/adder.mbl

28 lines
378 B
Text
Raw Normal View History

(print sum of 123 and 45)
o
> 123 B
vo A-+
> 45 B|
o --+
> * B
o
(check if 0)
1
v < B=- 0
v o * D- (div/10)
v B * <
v> * 1 o ^
F -R0 * 4 B
*| # < -A8 v
| # <
#|
-| v <
| *-|
F +B * ^
#< \F----
(ascii digit s)
(printed in)*-|
(reverse) P-
B