Commands:
Each condition consists of 6 characters. 1-3 character represent when the current "memory" is 0, while 4-6 character represent when the current "memory" is 1. It is divided into 2 divisons.
For each divison, the first character is the shift pointer direction operator, the second character is the action operator and the last character is the transit-to operator.
Between each condition, remember to add a ';'.
Shift Pointer Direction Operator:
Left:
L
Right:
R
Action Operator:
Set current "memory" to 0:
0
Set current "memory" to 1:
1
Do nothing to current "memory":
N
Terminate program:
S
Transit-To Operator:
Be reminded that the first condition is 0.
Go to the first condition:
0
Here is an example:
We assume 3 to be 3 consecutive '1's, and 4 to be 4 consecutive '1's.To separate them, we are going to place a '0' between them. So we are going to add those two numbers together by combining them into 1 large consecutive '1's which has 7 '1's.
Input:
1110111100000000
Code:
LN0R01;L12R11;R03L12;LN0RS0
If you still have anything regarding this syntax, feel free to email to sy10236@syss.edu.hk