IO Object (V1.1)

Top  Previous  Next

The io objects encompasses all I/O lines available on your platform. The set of lines is different for each platform, so check your platform specification for details on that. You will then know how many I/O lines are there to control, which lines can be used as inputs, outputs, or inputs/outputs; which lines are available at all times and which- only under certain conditions.

IO line control is straightforward. First, you select the line with the io.num property. Then, you can read or set this line's status through the io.state property.

On certain platforms you also need to explicitly control whether the output buffer of the line is off or on. For such platforms you also have io.enabled property. See "Platform-dependent Programming Information" topic inside your platform specifications section to find out if explicit output buffer control is required on your platform.

Here is an example in which we copy the state of I/O line 0 to the I/O line 1 (notice how we enable line 1):

 

 

dim x as byte

 

io.num=1

io.enabled=YES 'if necessary on your platform

 

...

io.num=0

x=io.state

io.num=1

io.state=x

...