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 Codes | Series 200/2000 Meaning | Virtual Extensions |
|---|---|---|
| 00 | undefined | |
| 01-17 | Load 1-15 characters at DIST, clear punctuation | |
| 20 | undefined | |
| 21-37 | Load 1-15 characters at DIST, set Word Mark | |
| 40 | undefined | |
| 41-57 | Load 1-15 characters at DIST, set Item Mark | |
| 60 | set DIST with next 3 characters | |
| 61 | End Load, next 3 characters are START | |
| 62 | Clear memory using next 7 characters | |
| 63 | set WM at DIST-1 | |
| 64 | set IM at DIST-1 | |
| 65-76 | undefined | T.B.D. |
| 77 | End record, read next |
Record headers have a common format in the first 7 characters:
| Char | Series 200/2000 Meaning | Virtual Extensions |
|---|---|---|
| 1 | Banner (controls rest of record) | |
| 2-4 | Record length (incl. header?) | Length includes header |
| 5-6 | Sequence number | |
| 7 | Length of header (7 or 24) |
In addition, Segment records (Banner char 50 or 54) contain:
| Char | Series 200/2000 Meaning | Virtual Extensions |
|---|---|---|
| 8-10 | Revision number | |
| 11-16 | Program name | |
| 17-18 | Segment name | |
| 19-24 | Visibility key |
Banner characters are defined as follows:
| Banner | Series 200/2000 Meaning | Virtual Extensions |
|---|---|---|
| 50 | First record of multi-record segment | |
| 54 | Only record of single-record segment | |
| 41 | Second record of multi-record segment | |
| 44 | Last record of multi-record segment | |
| 22 | Unformatted (no header) bootstrap record | Record may be >250 |
| 42 | Unformatted (no header?) boot image | See notes |
| 46 | Undefined | T.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.
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).
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.