Amos Professional Manual  Contents  Index

The Parallel Port


PARALLEL OUT
instruction: send data from memory to the Parallel Port
Parallel Out address,length

This instruction is similar to the PRINTER OUT command, and transmits the specified number of characters defined by the length parameter, starting from a given address.

PARALLEL INPUT$
function: read a string from the Parallel Port
text$=Parallel Input$(length[,stop])

The PARALLEL INPUTS function waits for a specific number of characters from the Parallel Port. Because this port does not have an internal buffer area, the AMOS Professional program will halt completely until all characters have been successfully received. If the requested bytes have not arrived after a reasonable amount of time, a time-out error will be generated. This may be detected using the TRAP instruction, explained in Chapter 12.2.

The PARALLEL INPUTS parameters are as follows: length holds the number of characters to be received. The square brackets can hold an optional stop character, which will end the transmission as soon as it is encountered anywhere in an input string.

If you intend to devise a communications protocol using the Parallel Port, then the first item to send should be the total number of bytes to be transmitted!

PARALLEL ABORT
instruction: stop a parallel operation
Parallel Abort

This command is used to stop a PARALLEL SEND or PARALLEL OUT instruction from transmitting any additional information via the Parallel Port. Any characters that are currently in transit will be completely lost.

PARALLEL CHECK
function: report the availability of the Parallel Port
value=Parallel Check

The PARALLEL CHECK function is used to return the readiness of the Parallel Port. The status is returned by either a value of zero (False) if it is not available, or -1 (True) if the port is ready for use.

PARALLEL ERROR
function: check for an error in transmission via the Parallel Port
value=Parallel Error

To check for errors during the current transmission via the Parallel Port, use this function.
Back    Next
10.05.02