Read an input port and compare to a value. If the values are equal, then jump to a label somewhere else in the program.
This command operates by reading all four bits of the input port.
|
Code Example |
Meaning |
|
P2?[0 0 0 1]:label1 |
If input port P2 is equal to 0 0 0 1, then jump to label1 |
|
P2?[0 1 0 0]:label2 |
If input port P2 is equal to 0 1 0 0, then jump to label2 |
|
P2?[1 0 1 0]:label3 |
If input port P2 is equal to 1 0 1 0, then jump to label3 |
|
P2?[1 0 x x]:label4 |
|
This command works with ports P1, P2, and P3.