Speculation on early Acorn sideways ROM format ---------------------------------------------- The BBC MOS version 0.10 did not have a *BASIC command to select BASIC. On Break it just entered the first ROM it found with a language in it, with ROM type byte bit 6 set. The BASIC ROM has the title "BASIC". The later MOS 1.00 and full-release MOS 1.20 have the *BASIC command to select BASIC. On Break ROMs with a ROM type byte with bit 7 set are called at &8000 with A holding the ROM type byte - so with A bit 7 set. When the language is entered at &8000 in MOS 1.20 the A register holds &01, in MOS 0.10 the A register holds &00. From this, the layout of the code in the 0.10 MOS and other snippets and rumours I speculate that it was originally intended that a language ROM would be selected by a *command that matched its ROM title. Many ROMs do have a title that matches their selection command, and some actually use the ROM title as the string to match when parsing a command. I further speculate that the ROM header was intended to be a full command table, the first entry also being the ROM title, and that the ROM would be entered with A holding the command number. In MOS 0.10 languages are entered with A=0 and that would match with the ROM title also being the first command in the command table. From this speculation, BASIC's ROM header can be looked at in this way: .L8000:JMP ENTER1 .L8003:JMP ENTER2 .L8006:EQUB ROMTYPE .L8007:EQUB COPYRIGHT-L8000-1 ; Pointer to (C) and end of command table .L8008:EQUB VERSION .L8009 EQUS "BASIC":EQUB 0 ; Command 0 and ROM title .COPYRIGHT EQUS "(C)1981 Acorn":EQUB 0 .ENTER1 ; On entry, A=0 With this layout, a ROM with a larger command table could look something like the following: .L8000:JMP ENTER1 .L8003:JMP ENTER2 .L8006:EQUB ROMTYPE .L8007:EQUB COPYRIGHT-L8000-1 ; Pointer to (C) and end of command table .L8008:EQUB VERSION .L8009 EQUS "DISC DOCTOR":EQUB 0 ; Command 0 and ROM title EQUS "DIS":EQUB 0 ; Command 1 EQUS "DISKTAPE":EQUB ; Command 2 EQUS "DSEARCH":EQUB 0 ; Command 3 EQUS "DZAP":EQUB 0 ; Command 4 EQUS "FORMAT":EQUB 0 ; Command 5 EQUS "TAPEDISK":EQUB 0 ; Command 6 EQUS "VERIFY":EQUB 0 ; Command 7 .COPYRIGHT EQUS "(C)1983 Computer Concepts":EQUB 0 .ENTER1 ; On entry, A.b7=0, command number A.b7=1, initialisation In the version 1 BBC MOS (and later versions) the language entry is entered with A=1 instead of A=0. This could give the ROM an indication of what OS has called it. Also, in updating the BBC MOS to version 1 to fully support sideways ROMs it's clear that a decision was taken to delegate command matching to sideways ROMs themselves instead of taking up space in the MOS. This has the downside of command matching code having to be in every sideways ROM. It's interesting that Amstrad CPC sideways ROMs do use a command table very similar to this, and the RISC OS modules also puts the command matching code back in the MOS.