INP
Format: var = INP (Z, X)
Supported by: Pecom 32 BASIC, RCA BASIC3 V1.1
Similar commands:
Quest Super BASIC 3.0, 5.0 and 6.0, Telmac SBASIC v 24.3: INP
If Z is not equal to 0 this function first outputs (8 bit) value Z to output port 1. After this the value of input port X is returned. If Z = 0 is used only the value of input port X is returned without performing any output instruction.
X | 1802 Instruction | Mnemonic code |
---|---|---|
1 | INP1 | 69 |
2 | INP2 | 6A |
3 | INP3 | 6B |
4 | INP4 | 6C |
5 | INP5 | 6D |
6 | INP6 | 6E |
7 | INP7 | 6F |
Table 1: Definition of INP instruction per X value
Examples:
PR INP (0, 3)
will print the value of input port 3
PR INP (10, 3)
will output value 10 to output port 0 and then print the value of input port 3