Amos Professional Manual  Contents  Index

Accessing a Serial Port


SERIAL CHECK
function: report current serial device activity
status=Serial Check(Channel number)

This function obtains a report on the status of the current serial device. It can be used to check whether all of the information to be transmitted by a previous SERIAL SEND command has been sent. If a value of zero (False) is returned, the last Serial command is still being executed. If the value is -1 (True) the transmission has been completed.

SERIAL STATUS
function: report status of the serial port
bit-map=Serial Status(channel number)

The SERIAL STATUS function provides detailed information concerning the current status of the serial port. The channel number parameter refers to an open channel that has been previously assigned to the serial port with a SERIAL OPEN command. The report is returned in the form of a bit-map holding the status of fifteen different parameters. Here is a table of the various possibilities. If the relevant bit is set to the value under the "Active" column, the associated status has been successfully detected. Any other value indicates that the option is currently idle.

Bit   Active    Status
0       -       Reserved
1       -       reserved
2       1       Parallel "select" for A1000 machines. For the A500 and A2000,"select" is
                also connected to the serial port "Ring Indicator".
3       0       DSR (Data Set Ready)
4       0       CTS (Clear To Send)
5       0       Carrier Detect
6       0       RTS (Ready To Send)
7       0       DTR (Data terminal Ready)
8       1       Hardware overru
9       1       Break sent (most recent output)
10      1       Break received (as latest input)
11      1       Transmit x-OFF
12      1       Receive x-Off
13      -       Reserved
14      -       Reserved
15      -       Reserved

SERIAL ERROR
function: report success of the last data transfer
status=Serial Error(Channel number)

The SERIAL ERROR function is used to look for the Error byte in the serial device. A value of zero (False) confirms that all is well, whereas 4 (True) indicates that there was an error in the last transmission.

Back    Next
10.04.05