Created
October 29, 2016 08:38
-
-
Save akamah/eda787b19e38fa54a8f86bb15055755b to your computer and use it in GitHub Desktop.
This file contains 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
wrote_R0: | |
if (A == 0) { | |
T0 = !T0; // 自動ターンアウトレールなのでトグルする | |
if (T0 == 1) { // 1回目 | |
R0 = 0; goto wrote_R0; | |
} else { // 2回目 | |
R1 = 0; goto wrote_R1; | |
} | |
} else { | |
T1 = !T1; | |
if (T1 == 1) { // 1回目 | |
R0 = 1; goto wrote_R0; | |
} else { // 2回目 | |
R1 = 1; goto wrote_R1; | |
} | |
} | |
wrote_R1: | |
if (B == 0) { | |
if (R0 == 0) { // A == 0, B == 0 | |
X = 0; goto wrote_X; | |
} else { // A == 1, B == 0 | |
X = 1; goto wrote_X; | |
} | |
} else { | |
if (R1 == 0) { // A == 0, B == 1 | |
X = 1; goto wrote_X; | |
} else { // A == 1, B == 1 | |
X = 0; goto wrote_X; | |
} | |
} | |
wrote_X: ; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment