A BBC machine code program calls the operating system (the MOS) through a table of jumps at the top of memory, and
reaches the machine's chips at $FE00 to $FEFF. These are the names the explorer puts in a disassembly
instead of the numbers. Addresses are written $FFEE here, as in the disassembly; BBC manuals write
&FFEE.
Operating system calls
The table at $FFB9 to $FFF7 is a series of three-byte jumps. The calls from OSFIND on are
JMP (vector): they jump through a pointer in page 2 (below), so a program or a filing
system can intercept them. The first seven are jumps into the OS. All of them were read from the OS ROM image that ships
with the jsbeeb emulator (os.rom, a Model B OS) and compared by a test.
| Address | Name | What it does |
|---|---|---|
$FFB9 | OSRDRM | Read a byte from a paged ROM (a JMP into the OS) |
$FFBC | VDUCHR | VDU character output routine (a JMP into the OS) |
$FFBF | OSEVEN | Generate an event (a JMP into the OS) |
$FFC2 | GSINIT | Start reading a string that may hold quotes and | escapes |
$FFC5 | GSREAD | Read a character of that string |
$FFC8 | NVRDCH | Non-vectored OSRDCH |
$FFCB | NVWRCH | Non-vectored OSWRCH |
$FFCE | OSFIND | Open or close a file, through FINDV ($021C) |
$FFD1 | OSGBPB | Read or write a block of bytes of a file, through GBPBV ($021A) |
$FFD4 | OSBPUT | Write one byte to an open file, through BPUTV ($0218) |
$FFD7 | OSBGET | Read one byte from an open file, through BGETV ($0216) |
$FFDA | OSARGS | Read or write the arguments of a file (its pointer, extent), through ARGSV ($0214) |
$FFDD | OSFILE | Load, save or read the catalogue information of a whole file, through FILEV ($0212) |
$FFE0 | OSRDCH | Read a character from the input stream, through RDCHV ($0210) |
$FFE3 | OSASCI | Write a character; $0D is written as a new line (this code falls through into OSNEWL) |
$FFE7 | OSNEWL | Write a line feed and a carriage return |
$FFEE | OSWRCH | Write the character in A, through WRCHV ($020E) |
$FFF1 | OSWORD | An operating system call with a parameter block, through WORDV ($020C) |
$FFF4 | OSBYTE | An operating system call with values in A, X and Y, through BYTEV ($020A) |
$FFF7 | OSCLI | Run a star command, through CLIV ($0208) |
The test also checks the code of OSASCI and OSNEWL in the ROM: OSASCI begins CMP #$0D, OSNEWL begins
LDA #$0A and calls OSWRCH. The CPU vectors at $FFFA (NMI), $FFFC (reset) and
$FFFE (IRQ and BRK) are named too. The parameters of OSBYTE, OSWORD and OSFILE (call numbers, blocks) are not given here.
Vectors (page 2)
Each is a two-byte address, low byte first, at the address shown; the OS calls above jump through them. The vectors from CLIV to FINDV are confirmed by the OS ROM's jump table; the rest are the standard list and were not checked against a file here.
| Address | Name | Address | Name | Address | Name |
|---|---|---|---|---|---|
$0200 | USERV | $0202 | BRKV | $0204 | IRQ1V |
$0206 | IRQ2V | $0208 | CLIV | $020A | BYTEV |
$020C | WORDV | $020E | WRCHV | $0210 | RDCHV |
$0212 | FILEV | $0214 | ARGSV | $0216 | BGETV |
$0218 | BPUTV | $021A | GBPBV | $021C | FINDV |
$021E | FSCV | $0220 | EVNTV | $0222 | UPTV |
$0224 | NETV | $0226 | VDUV | $0228 | KEYV |
$022A | INSV | $022C | REMV | $022E | CNPV |
$0230 | IND1V | $0232 | IND2V | $0234 | IND3V |
Hardware (SHEILA, $FE00)
The machine's chips sit in page $FE. Each block repeats inside its range; the first address is the one named. The map
is the standard one for the BBC Micro; it was not read from a document on this Mac. What was checked is that the OS ROM
addresses the 6845 ($FE00, $FE01), the 6850 ($FE08, $FE09), the serial ULA
($FE10), the video ULA ($FE20, $FE21), the ROM select ($FE30) and the system VIA
($FE40 to $FE4F, most registers) at those addresses, and the ADC at $FEC0. Of the user VIA only its interrupt enable register ($FE6E) is used by the OS ROM; the
8271 disc controller, the Econet ADLC and the Tube registers are not checked.
| Address | Chip | Registers named |
|---|---|---|
$FE00–$FE07 | 6845 CRTC (screen timing) | $FE00 address register, $FE01 data register |
$FE08–$FE0F | 6850 ACIA (RS423 and cassette) | $FE08 control (write) and status (read), $FE09 data |
$FE10–$FE17 | Serial ULA | $FE10 baud rate, cassette motor and RS423/cassette select |
$FE20–$FE2F | Video ULA | $FE20 control (mode, cursor width, flash), $FE21 palette |
$FE30–$FE3F | Paged ROM select | $FE30 the ROM number |
$FE40–$FE5F | System VIA (6522) | 16 registers from $FE40: ORB, ORA, DDRB, DDRA, T1C-L, T1C-H, T1L-L, T1L-H, T2C-L, T2C-H, SR, ACR, PCR, IFR, IER, ORA without handshake. Keyboard and sound chip lines |
$FE60–$FE7F | User VIA (6522) | the same 16 registers from $FE60. The user port and the printer port data |
$FE80–$FE9F | 8271 floppy controller (Model B) | $FE80 command and status, $FE81 parameter and result, $FE82 reset, $FE84 data |
$FEA0–$FEBF | Econet ADLC | $FEA0 control and status |
$FEC0–$FEDF | uPD7002 analogue-to-digital converter | $FEC0 status and control, $FEC1 high byte, $FEC2 low byte |
$FEE0–$FEFF | Tube interface | $FEE0 the first register |
The Master and the B+ differ here: a WD1770 disc controller, extra paged-ROM control ($FE34) and a different
address for some blocks. Those are not named. Page $FC (FRED) and page $FD (JIM) are for expansion
hardware, and the viewer names them only as regions.