Asynchronous Protocols

Note

In this section, ‘host’ means the device communicating with HUNTER, whether it be computer, printer, modem or otherwise.

These protocols may be used by Basic application programs, user assembly code, CP/M programs or directly in ‘Terminal Emulation’ mode.

NONE

RECEPTION
As implied, this selection does nothing to control the incoming data. It behaves as a simple teletype. Characters are placed into the reception buffer and a calling program may read them out asynchronously.
TRANSMISSION
Each character is transmitted as the calling program requests it (except when waiting for the previous character to be sent). There is no buffering of the output data.

XON/XOFF (DC1/DC3)

RECEPTION
If an incoming character causes the receive buffer to have 90 or more unread characters then an XOFF character (DC3, 19 Decimal or Control S) is transmitted, which should prevent the host sending further characters to HUNTER. When the buffer is reduced to 10 pending characters, an XON (17 Decimal or Control Q, DCl) is transmitted to re-enable the host to HUNTER transmission. Subsequent XONs or XOFFs are never transmitted without an intervening XOFF or XON respectively.
TRANSMISSION
The input data line is also examined for XON or XOFF characters.

If an XOFF or stream of XOFFs are received then transmission is stopped as soon as the character being transmitted is finished. The protocol requires an XON to restart transmission. This protocol procedure strips ‘XON’ or ‘XOFF’ Control characters, thus returning only valid data.

It should be noted that following the host transmitting an XOFF, it is possible, depending on data link speed, to have a further two characters sent out by HUNTER. This is due to the time taken to receive the XOFF and the possibility of just missing the start of the next character.

At the start of transmission a received XON is assumed, to avoid lock-up.

ETX/ACK

RECEPTION In this protocol HUNTER will send an ACK character (06 Decimal or Control F) after reception of an ETX character terminating a line that has been ready by Basic. The ETX is stripped from incoming data and not sent to Basic. This protocol causes the host device to wait at the end of each block of data, which should not exceed 130 characters, for an acknowledgement that the block has been read. The ETX/ACK acknowledgement is only transmitted when the block has been fetched from the buffer by Basic.

TRANSMISSION
This protocol will send out an ETX (03 Decimal or Control C) character after any transmitted carriage return. Transmission is then halted until an ACK (06 Decimal or Control F) is received from the host. This enables individual data blocks to be sent and an acknowledgement awaited. If transmission is to another HUNTER the blocks should not exceed 130 characters or the input buffer may be exceeded. If an ACK is not received within thirty seconds then communication failure is assumed and an error message is put up on the screen.

The ACKs are not returned to the user program.

By the very nature of this protocol, indeterminate handshaking situations may occur if any conditions are altered during transmission.

ACK/NAK

RECEPTION
In this mode HUNTER will receive a complete block of data, terminated with a carriage return. It will then check for parity errors. If one exists then a NAK (21 Decimal or Control U) is sent out to the host and the data block ignored.

If the block is error-free then the received block is sent character by character to Basic. When the carriage return is sent to Basic an ACK (06 Decimal or Control F) is sent out to the host to indicate successful data block reception.

TRANSMISSION
Data blocks are first placed into a transmission buffer. Upon receipt of a carriage return from Basic, the entire buffer is transmitted. HUNTER then awaits an acknowledgement. If an ACK is received then the next data block is assembled into the buffer and sent. If a NAK (21 Decimal or Control U) is received then a failure is indicated and the entire buffer is sent again. If nothing is received after three seconds a NAK is assumed and the buffer sent again. The NAKs may be sent a maximum of three times. If an ACK is still not received then the communications failure message is put on the screen.

Systime

HUNTER to Systime communications Protocol Specification

This protocol is provided to facilitate communication between HUNTER and Systime model S500 minicomputers. The protocol embodies a checksum in addition to parity checks.

Data is sent in the form of messages which are subdivided into one or more fixed length blocks. Each block is individually checked and acknowledged before any further blocks are sent.

DATA BLOCKS

Each block consists of:- :1 start character
:64 data characters
:3 checksum
:1 stop character

The purpose of each character group is as follows:-

Start Character
The first block of a message uses SOH (01 Decimal). Further blocks use STX (02H) as the start character.
Stop Character
The last block of a message uses EOT (04 Decimal), previous blocks use ETX (03H) as the stop character.
Data Character
The data characters may consist of any 7 bit pattern with the exception of the handshake characters : ACK (06 Decimal), NAK (15H) and WACK (13H).
Checksum
The checksum is formed as the modulo 256 addition of all data characters, with parity reset. The number formed is transmitted in ASCII as three decimal digits. Leading zeros are not suppressed. The most significant digit is sent first.
Insufficient Data Characters
If there are less than 64 characters for the data block, then the remainder of the block is filled with NULLS (00 Decimal). The characters are ignored on reception.

Handshaking Each block of data must be acknowledged by the receiving device. After a successful reception and if the receiver is ready to receive another block, then it returns an ACK (06 Decimal). If the transfer is deemed unsuccessful for any of the following reasons:-

  1. parity fault on any character

  2. Incorrect start or end characters

  3. wrong number of characters

  4. checksum error

  5. timeout (waiting for characters for 4 secs)

then a failure is returned as a NAK (21 Decimal). If the receiver accepts the block, but is not ready for further data, then a wait acknowledge WACK (19 Decimal) character delaying the transmitter’s time out is transmitted. Further delays can be accumulated by transmitting WACK’s at the rate of one every 2 secs. The message is finally accepted with an ACK.

Communications Failure

If a failure occurs on transmission and a timeout activates then HUNTER will display ‘Communications Failure’ on the top line of the display. This message may be overriden by pressing ‘X’ on the keyboard. This will force transmission for ETX/ACK or XON/XOFF; in the case of ACK/NAK then the buffer will be sent another three times.

A timeout can be prevented from occurring after a transmission failure by re-initialising the communications.