Series 2000 BRT (Binary Run Tape) Format

BRT records are organized with a header followed by load data which is formated as a control character followed by zero or more data characters, defined as follows:
Control CodesSeries 200/2000 MeaningVirtual Extensions
00undefined
01-17Load 1-15 characters at DIST, clear punctuation
20undefined
21-37Load 1-15 characters at DIST, set Word Mark
40undefined
41-57Load 1-15 characters at DIST, set Item Mark
60set DIST with next 3 characters
61End Load, next 3 characters are START
62Clear memory using next 7 characters
63set WM at DIST-1
64set IM at DIST-1
65-76undefinedT.B.D.
77End record, read next

Record headers have a common format in the first 7 characters:
CharSeries 200/2000 MeaningVirtual Extensions
1Banner (controls rest of record)
2-4Record length (incl. header?)Length includes header
5-6Sequence number
7Length of header (7 or 24)

In addition, Segment records (Banner char 50 or 54) contain:
CharSeries 200/2000 MeaningVirtual Extensions
8-10Revision number
11-16Program name
17-18Segment name
19-24Visibility key

Banner characters are defined as follows:
BannerSeries 200/2000 MeaningVirtual Extensions
50First record of multi-record segment
54Only record of single-record segment
41Second record of multi-record segment
44Last record of multi-record segment
22Unformatted (no header) bootstrap recordRecord may be >250
42Unformatted (no header?) boot imageSee notes
46UndefinedT.B.D.

A valid program segment may be comprised of: A) A single 54 record, B) A 50 record followed by a 44 record, or C) a 50 record followed by onr or more 41 records followed by a 44 record.

Records are said to have a maximum size of 250 characters. Unclear whether short records are padded to 250 or not. For the Punch Card version of BRT, record size is fixed at 80. Punch Card BRT records do not use (ignore) characters 2-6.

The Sequence number is meant to facilitate backwards searching through the tape. It indicates the number of Tape BACKSPACE operations required to locate the *previous* Segment header record (Banner 50 or 54). Since backpsaces are performed *after* loading the given record, the sequence number includes an extra backspace to account for the tape position. The first segment header on the tape has a sequence number of 0. The minimum value for all other records is 2.

Note, the bootstrap record banner character (22) is the same as the opcode for the SW instruction, and this is no coincidence. The contents of this record must be directly loaded into memory and executed (via the BOOTSTRAP function). Such code must establish punctuation on at least instructions and so must begin with a series of SW (and possibly SI) instructions. This code must be sufficient to load the subsequent "banner 42" records and possibly setup their punctuation. TODO: Find a definition of "banner 42" records.

NOTE: SW and SI instructions, when coded for both addresses, are the only ones that do not require punctuation.

A complete BRT image (self-loading, possibly containing multiple programs) begins with a "1HDRΔ" record (unknown length) and terminates with a "1EOFΔ" record and two "1ERIΔ" records. It is not clear whether these records, on Magnetic Tape, are 5 characters long or padded to some other length.

In addition, a tape may be a "card image" tape in which case, presumably, all records are 80 characters.

4-Character Addressing

This BRT format supports a maximum memory address of 18 bits (262144 characters), and 4-character mode requires 19 bits. Unclear whether control codes 60-62 have alternate interpretations or if there were additional control codes defined, or possibly some 19th bit manipulation was done. As-is, BRT images may only be located in the first 262144 characters of memory. The loader/monitor code is currently being run in 4-character mode and is located high in memory (well above 262144). Proposed extension is to interpret the "10" bit as the 19th address bit, so control codes 70-72 have the same meaning as the corresponding codes 60-62 except that the 19th bit is set to "1" (CLEAR cannot span the boundary).

Banner 42 Records

Characters 2-EOR are loaded, w/o punctuation, to successive regions or memory. The bootstrap program is hard-coded for load/run address and number of records. Loading aborts (fatal) if a non-42 record is encountered.

It is assumed that the 42 banner code is not related to the CAM instruction opcode, but rather is a variation of the 41/44 code scheme. This could imply that these records contain a formal header, similar to 41/44 records. It may also allow for a "terminal record" notation, such as 44 (or 46).

Current assumption is that 42 records do not contain BRT control codes, instead they contain straight code. It would seem difficult to write a bootstrap program that could fit in a reasonable tape record size and still decode BRT control codes. Current bootstrap code simply loads records into memory and branches to the start address. This means that 42 records (the loader program image) must contain sufficient code to restore punctuation. The current bootstrap code ensures that punctuation is cleared for the loaded image.