Owner`s manual

63
INP@ (input)
Inputs data
at
110
ports
to
variables.
Format:
INP@
<port
number>,
<variable>
Abbreviated form:
I.@
Explanation:
Inputs 8-bit
data
from
<port
number>
input port and sets to
<variable>
the value
(0 - 255) converted to a decimal number .
From 0 to
127
($00 - $7F in hexadecimal), the
<port
number>
can be determined
freely. From
128
to
255
($FO
- $80 in hexadecimal), the use
is
exclusively
as
ports
for external devices.
Example:
1 0
FOR
I =0
TO
20
20
C
=1
+32
30
GOSUB
"SUB"
40
NEXT
50
END
60
LABEL
"SUB"
70
I
NP@
$FE,
A
80
I F
NOT
(A
AND
$OD)
=0
THEN
70
90
OUT@
$FF,C
100
OUT@
$FE,
$80
1 1 0
I
NP@
$FE,
A
120
I F
NOT
(A
AND
$ 0 D)
=1
THE
N 1 1 0
130
OUT@
FE,
0
140
RETURN
Reference:
OUT@ (page 64)