
Commands - 60
INP
I/O Function
SYNTAX: n = INP(I/O addre ss)
OUT I/O a ddress, data
PURPOSE: INP returns a byte from an I/O address.
OUT writes a byte to an I/O address.
REMARK S: I/O address is in the range of 0 to 65,536 (&FFFF).
data is in the range of 0 to 255 (&FF).
INP and OUT are used to read and write to hardware devices, such as digital I/O and counters.
INP is the complementar y function to the O UT statement.
WARNING: Some I/O address are used internally and should not be written to with the OUT
statement. Generally, these are from &80 to &CF . See your har dware manual for
these addresses.
RELATED: BIT
EXAMPLE: 100 A = INP(255)
120 OUT &40,12
ERROR: < Data negative> – for I/O address and data
< Illegal argument> – if I/O address > 65,535
< Data > 255> – if data > 255
Commentaires sur ces manuels