Asynchronous Character Handling

HUNTER's asynchronous serial data communications are handled by a communications software package totally separate to the user's program or the Basic interpreter.

The user needs no detailed knowledge of data communication to be able to utilise HUNTER's powerful facilities. The required configuration is selected from 'menus' and operation of the package is virtually invisible.

Buffers

Characters are transferred to and from the serial interface via invisible 'buffers' that effectively disconnect the application program from the outside world. These buffers ensure a smooth flow of data and correct reaction to protocol responses even when HUNTER is busy doing something quite different!

Because the communication package is interrupt driven, the execution of user programs is not affected by communication. However, the user program may slow down if the serial line is busy. HUNTER's communication buffers are available whenever the machine is powered up, even if the application program is not requesting communication. Incoming messages will be received and held in the buffer, while any outgoing data remaining will continue to be sent down the line. Any protocols selected will continue to be observed.

Communicating With User Programs

A user program can transmit and receive characters either singly or in blocks. The program may be written in HUNTER BASIC (see LPRINT, LINCHR, etc) or a compiled language using the standard CP/M calls.

Irrespective of the content of the user program, all data rates, protocols and other selections previously made will be observed invisibly by HUNTER's communication software package.

Transmission

When transmitting, HUNTER writes the characters into a buffer. If the buffer becomes full, then the user program (BASIC or CP/M) is held up until the characters or block are sent.

If a 'communication failure' is detected, execution of the user program will be suspended until manually overridden.

Receiving

When receiving characters, data receiving commands (LINCHR and LINPUT in Basic) will fetch any characters or blocks currently held in the reception buffer.

This data may have been received prior to execution of the input command.

If data is already in the buffer, then it will be returned immediately. If no data is present, HUNTER will wait for incoming data, and will return when characters or blocks are available.

Reception of data is completely transparent to the user Basic program being run by HUNTER. Data may be sent at any time to HUNTER, communications protocols being implemented as selected.

Use is made of a 256 character input buffer. Received characters are placed into the buffer in a 'barrel' fashion. If more characters are received than this, without any being read by a calling program then the earliest characters are overwritten. This is true even if RTS or XON/XOFF handshaking is used and is ignored by the sending device.

The effect of this buffering is to permit reception characters of to carry on steadily through calling programs which process characters intermittently. This can give a greater overall throughput.

The buffer is needed by definition for the XON/XOFF and ETX/ACK protocols.