1
0
mirror of https://github.com/pkimpel/retro-220.git synced 2026-04-29 21:18:09 +00:00

Commit correction to BALGOL compiler tape layout for I/O routines.

Paul Kimpel
2018-10-23 13:18:56 -07:00
parent a2783cead8
commit 37ba5ce242

@@ -191,7 +191,7 @@ The layout of the final Generator tape produced by the procedure above is:
1. Lane 0 (pre-formatted as 100-word blocks):
* 50 blocks (1..50) of the compiler Main program. These are written in groups of 10 blocks containing 999 words of object code followed by a one-word checksum. It is literally a sum, stored as the negative of the sum (as the 220 would do it) of the 999 other words, discarding overflow. Therefore, summing all 1000 words in the group should yield a zero result. Note that only the low-order bit of the sign digit participates the the sum and indicates that the other 10 digits represent a negative value. The high-order three bits of the sign digit are ignored by 220 integer addition.
* 2 blocks (51..52) reserved for compiler patches. These are also checksummed in the same fashion, but the checksum word is stored at the beginning of the first block, not the end of the second.
* 2 blocks (51..52) reserved for compiler patches. More importantly, this is where the INPUTMEDIA and OUTPUTMEDIA routines for the compiler are stored, which is why these routines are limited to 200 words in the aggregate. These blocks are prepared by the Generator, then read into high memory addresses by the compiler Main's loader routine located at its addresses 0000-0059. These blocks are checksummed in the same fashion as above, but the checksum word is stored at the beginning of the first block, not the end of the second.
* 3 blocks (53..55) containing a copy of words 3996-4295 from Main, not checksummed. This range of addresses is originally from blocks 41-43 of the assembled compiler tape, and contains in part the compiler's initial symbol table, before entries for the standard library routines have been inserted. It is used by the Generator when the library is being replaced to form a new symbol table for the compiler, updated with entries for the new library, and is then overwritten back to the generated compiler tape. This was the most obtuse part of the tape to figure out.
* 3 blocks (56..58) containing addresses 0000-0299 of the Overlay program, not checksummed.
* 29 blocks (59..87) containing addresses 0700-3599 of the Overlay program, not checksummed. The 32 blocks of the Overlay program will be checksummed as one 3200-word unit by the Generator before being written to the generated compiler tape, with the checksum stored in word 99 of block 84 of the compiler tape.