text stringlengths 0 99.6k |
|---|
still do not handle EOF without ^Zs. |
* The last block sent is no different |
from others, i.e., there is no "short |
block". |
3. MESSAGE BLOCK LEVEL PROTOCOL Each |
block of the transfer looks like: |
<SOH> <blk #> <255-blk #> <--128 data |
bytes--> <cksum> in which: <SOH> = 01 |
hex <blk #> = binary number, starts at |
01 increments by 1, and wraps 0FFH to |
00H (not to 01) <255-blk #> = blk # |
after going thru 8080 "CMA" instr, |
i.e., each bit complemented in the |
8-bit block number. Formally, this is |
the "ones complement". <cksum> = the |
sum of the data bytes only. Toss any |
carry. |
4. FILE LEVEL PROTOCOL |
---- 4A. COMMON TO BOTH SENDER AND |
RECEIVER: All errors are retried |
10 times. For versions running with an |
operator (i.e., NOT with XMODEM), a |
message is typed after 10 errors asking |
the operator whether to "retry or |
quit". Some versions of the protocol |
use <CAN>, ASCII ^X, to cancel |
transmission. This was never adopted |
as a standard, as having a single |
"abort" character makes the |
transmission susceptible to false |
termination due to an <ACK> <NAK> or |
<SOH> being corrupted into a <CAN> and |
cancelling transmission. The protocol may be considered "receiver driven", |
that is, the sender need not |
automatically re-transmit, although it |
does in the current implementations. |
---- 4B. RECEIVE PROGRAM |
CONSIDERATIONS: The receiver has |
a 10-second timeout. It sends a <NAK> |
every time it times out. The |
receiver's first timeout, which sends a |
<NAK>, signals the transmitter to |
start. Optionally, the receiver could |
send a <NAK> immediately, in case the |
sender was ready. This would save the |
initial 10 second timeout. However, |
the receiver MUST continue to timeout |
every 10 seconds in case the sender |
wasn't ready. Once into a receiving a |
block, the receiver goes into a |
one-second timeout for each character |
and the checksum. If the receiver |
wishes to <NAK> a block for any reason |
(invalid header, timeout receiving |
data), it must wait for the line to |
clear. See "programming tips" for |
ideas. Synchronizing: If a valid |
block number is received, it will be: |
1) the expected one, in which case |
everything is fine; or 2) a repeat of |
the previously received block. This |
should be considered OK, and only |
indicates that the receiver's <ACK> got |
glitched, and the sender |
re-transmitted; 3) any other block |
number indicates a fatal loss of |
synchronization, such as the rare case |
of the sender getting a line-glitch |
that looked like an <ACK>. Abort the |
transmission, sending a <CAN>. |
---- 4C. SENDING PROGRAM |
CONSIDERATIONS. While waiting for |
transmission to begin, the sender has |
only a single very long timeout, say |
one minute. In the current protocol, |
the sender has a 10 second timeout |
before retrying. I suggest NOT doing |
this, and letting the protocol be |
completely receiver-driven. This will |
be compatible with existing programs. |
When the sender has no more data, it |
sends an <EOT>, and awaits an <ACK>, |
resending the <EOT> if it doesn't get |
one. Again, the protocol could be |
receiver-driven, with the sender only |
having the high-level 1-minute timeout |
to abort. |
5. DATA FLOW EXAMPLE INCLUDING ERROR |
RECOVERY |
Here is a sample of the data flow, |
sendin' a 3-block message. It includes |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.