Created
June 4, 2015 08:47
-
-
Save geraintwhite/b1913e03a1d7955b9986 to your computer and use it in GitHub Desktop.
Modulus calculator maze module for use with https://github.com/olls/maze-interpreter-v2
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ## ## () ## ^^ ## ## ## ## | |
| ## 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 | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment