[Coco] DLOAD/DLOADM Communications Protocol
John W. Linville
linville at tuxdriver.com
Tue Jan 14 15:23:16 EST 2020
Microsoft 6809 Extended Color BASIC
DLOAD/DLOADM Communications Protocol
Copyright (c) 1982 by Microsoft Corporation
Prepared by Mark L. Chamberlin
August 31, 1982
Attached -- see what you can do with it!
John
--
John W. Linville Someday the world will need a hero, and you
linville at tuxdriver.com might be all we have. Be ready.
-------------- next part --------------
Microsoft 6809 Extended Color BASIC
DLOAD/DLOADM Communications Protocol
Copyright (c) 1982 by Microsoft Corporation
Prepared by Mark L. Chamberlin
August 31, 1982
DLOAD and DLOADM send and receive packets of
information to and from the host computer in order to
download BASIC and machine language files. The protocol
used for sending these packets was designed to facilitate
detection and correction of transmission errors.
The process of downloading a file from the host
involves opening a file, and then reading blocks of data
from the file. The details of this protocol follow.
*note*
The DLOAD protocol is only supported by Extended Color Basic 1.1
or older. It has been removed from 1.2 and newer as it was
determined that there was no demand for it.
Burt Mitchell 28 Jan 88
OPEN FILE -
1. BASIC to host - P.FILR
2. Host to BASIC - P.FILR
3. BASIC to host -
1. 8 byte filename, left justified, blank filled
2. XOR of the bytes in the filename
4. Host to BASIC -
a) If no errors detected -
1. P.ACK
2. file type (0=BASIC program, 2=machine language,
FF=file not found)
3. ASCII flag (0=binary file, FF=ASCII)
4. XOR of file type and ASCII flag.
b) If errors detected, P.NAK.
5. BASIC - If errors then return to step 1.
READ BLOCK -
1. BASIC to host - P.BLKR
2. Host to BASIC - P.BLKR
3. BASIC to host -
1. Block number (most significant 7 bits)
2. Block number (least significant 7 bits)
3. XOR of block number bytes
NOTE: The block number is a fourteen bit,
unsigned integer in the range 0 through
16383. It is split into two seven bit
values, each of which is transmitted in
the least significant 7 bits of a byte.
This insures that the most significant
bit is not set except for the protocol
control characters (e.g., P.BLKR). For
example, a block number of 511 is
transmitted as binary 00000011 and
01111111.
4. Host to BASIC -
a) If no errors detected -
1. P.ACK
2. Block length in bytes (0 through 128, 0
indicating end of file)
3. 128 bytes of data
NOTE: 128 bytes of data must be sent,
regardless of the block length. If the
block length is less than 128 the extra
bytes are read by BASIC but not used,
so their values are of no concern.
4. XOR of block length and data bytes
b) If errors detected, P.NAK.
5. BASIC - If errors then return to step 1.
The control character definitions are:
1. P.ACK - Acknowledge - C8 hex.
2. P.ABRT - Abort - BC hex.
3. P.BLKR - Block request - 97 hex.
4. P.FILR - File request - 8A hex.
5. P.NAK - Negative Acknowledge - DE hex.
Additional rules:
1. If errors occur during an OPEN or READ sequence,
BASIC will retry the operation. For each sequence,
a maximum of 5 tries is attempted. After 5
unsuccessful attempts, BASIC transmits a P.ABRT to
the host and aborts the download, causing a BASIC
IO error to occur.
2. If more than 10.4 seconds pass while BASIC is
waiting for a byte from the host, a timeout error
occurs. The operation is retried or aborted as
described above.
3. If the host receives any unsolicited data, it quits
transmitting and wait for BASIC to restart the
sequence.
4. The host should never time out. It should just
continue to wait.
More information about the Coco
mailing list