OUT
(Statement)
Outputs data to the I/O port designated by an I/O variable.
OUT <I/O variable> = <Output data>
This statement outputs the value of <Output data> to the port address designated by <I/O variable>.
<I/O variable> is declared using a DEFIO statement or I/O variable.
DEFINT Li1, Li2
|
|
DEFIO samp1 = INTEGER, 220
|
|
|
'Declares samp1 as an INTEGER type I/O variable
'beginning at port 220.
|
IN Li1 = samp1
|
'Assigns the samp1 data to Li1.
|
IN Li2 = IO[240]
|
'Assigns the port 240 data to Li2.
|
OUT samp1 = Li1
|
'Outputs the Li1 data from the port declared in samp1.
|
OUT IO[240] = Li2
|
'Outputs the Li2 data from port 240.
|