Amos Professional Manual  Contents  Index

Accessing a Serial Port


Here is the Chapter which explains how AMOS Professional is used as the gateway to the world of computerised communications.

The I/O Extension provides you with all the commands needed to exploit the Amiga's serial port for the following purposes:

Opening the Serial Port
A serial device refers to any machine that can communicate with the Amiga via its Serial Port. These devices include modems, MIDI systems and of course, other Amigas.

SERIAL OPEN
instruction: open a channel for Serial Input/Output
Serial Open Channel number,Port number
Serial Open Channel number, Port number,Shared,Xmode,7wires

The SERIAL OPEN command is used to open a communication channel between the Amiga and a serial device. The following parameters can be given with this instruction:

The Channel number is an identification number that will be used for all subsequent communication commands. The values for this number range from zero to 3.

The Port number is normally set to zero, and it specifies the logical device number of the Serial Port. For Amigas equipped with a Multi-Serial card that offers additional Serial Ports, these extra ports can be accessed by specifying a Port number from 1 upwards.

There are three optional parameters that can also be given, as follows:

The Shared parameter refers to a value which acts as a flag, telling AMOS Professional that the serial device can be shared with other tasks that are currently running on the computer. In other words, this parameter is used for multi-tasking. A value of zero (False) will grab the specified channel for AMOS Professional programs, and will deny access to any other programs. A value of -1 (True) will allow the Serial Port to be shared between several programs in memory. You are warned to use this system with great care, to avoid crashing your Amiga.

The Xmode is a val.-Lie which is used to toggle the checking system known as XON/XOFF. This system makes checks during the transmission of data over a serial line. It is essential to set this flag when the device is first opened, even if the device will not be required until later. The default value is zero (False), and this means that the system is normally disabled. To enable the checking system, a value of -1 (True) must be set. Once the port has been opened, the XON and XOFF characters must be set using a SERIAL X command, which is explained later.

The last of the three optional parameters concerns the "7 wires system" of communication. The default value for this parameter is set to zero (False), and a value of -1 (True) tells the device to use this system.

Back    Next
10.04.01