virt2/assets/vendor_plugins/ace-builds-master/demo/kitchen-sink/docs/maze.mz

24 lines
401 B
Plaintext
Raw Permalink Normal View History

## ## () ## ^^ ## ## ## ##
## H1 C2 S1 <> S2 H2 DN ##
## %U <> %D *2 %L IZ .. ##
## ## ## .. ## DN *3 ## ##
## ## ## %R C1 IZ () ## ##
## ## ## ## >/ *1
## () *3 *1 %L ()
// Set divisor and dividend
S1-> = 9
S2-> = 24
// Holding cells
H1-> IF *1 THEN %R ELSE %N
H2-> IF *2 THEN %R ELSE %N
// Arithmetic
DN-> -= 1
IZ-> IF <= 0 THEN %D ELSE %U
C1-> IF *3 THEN %D ELSE %R
C2-> IF *3 THEN %U ELSE %D