forked from istrangeloop/TIS-100-solutions
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsignal-edge-detector
19 lines (19 loc) · 999 Bytes
/
signal-edge-detector
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
| MOV ACC, RIGHT | MOV LEFT, DOWN |
| MOV UP, ACC | |
| MOV ACC, DOWN | |
______________|_________________|________________|__________
| MOV UP, RIGHT | MOV UP, ACC |
| | SUB LEFT |
| | JLZ P |
| | JMP D |
| | P: NEG |
| | D: SUB 10 |
| | JLZ W |
| | MOV 1, DOWN |
| | JMP END |
| | W: MOV 0, DOWN |
| | END: NOP |
______________|_________________|________________|__________
COMMUNICATION | |MOV UP, DOWN |
FAILURE | | |
______________|_________________|________________|__________