Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ () — UMIPS/BSD System Programmer's Package 2.1

Media Vault

Software Library

Restoration Projects

Artifacts Sought

 

protocol − serial line protocol routines

#include <saio/protocol.h>
#include <saio/protoio.h>
void init_proto(fd)
pdev_t fd;

void proto_enable(fd)
pdev_t fd;

void proto_disable(fd)
pdev_t fd;

int len = getpkt(fd, buf, cnt, pkt_typep)
pdev_t fd;
char *buf;
unsigned cnt;
int *pkt_typep;

void putpkt(fd, buf, cnt, pkt_type)
pdev_t fd;
char *buf;
unsigned cnt;
int pkt_type;
These routines implement the serial line protocol used by the debug monitor
for remote debugging mode;
and the prom monitor download command
must be called to initiate the protocol sequence counters before any
other protocol routines are invoked.  It should be invoked each time
a protocol connection is attempted.  The argument
should be the descriptor for the serial port that will be used for
communication.
must be called to configure the serial port indicated by
for use by the protocol routines.
puts the line in "raw" mode and flushes any pending input and output
on the serial port.
should be the descriptor for the the serial port that will be used for
communication.
should be called after the protocol session is complete to restore
the line to "cooked" mode.
should be the descriptor for the the serial port that was used for
communication.
blocks until it receives a properly sequenced and checksummed packet
on the serial line indicated by
The packet will be returned in the buffer pointed to by
The buffer is assumed to be
bytes long.  If the received packet is longer than
bytes it is discarded.
is a pointer to a integer variable that should be initialized to
Other values for
are used internally by the protocol code.
acknowledges the reception of the packet to its remote partner and
returns the length of the packet.
transmits a packet on the descriptor
and waits until the packet is acknowledged by its remote partner.
will periodically retransmit the packet until the packet is acknowledged.
The packet to transmitted should be pointed to by the character pointer
and be of length
bytes.
should be
This code may with reasonable effort be incorporated into host system
programs to act as the remote partner for the standalone code utilizing
the protocol.  In order to accomplish this the macros defined in
protoio.h must be altered to fit the host environment and timer support
along the lines of
must be provided.
protocol(5spp)

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026