This the multi-page printable view of this section.Click here to print.

Return to the regular view of this page.

BBC Micro Memory Map

BBC Micro Memory Map

Table of Contents

The following table shows the memory map for the BBC Micro & BBC Master microcomputers.

Docs Address All machines BBC Master 128
Page 00 0000 Current Language Zero Page Master maps main ram even in shadow mode
0090 Operating System Zero Page
0100 Processor Stack
Page 02 0200 Operating System Workspace
Page 03 0300
0400 Current Language Workspace
0500
0600
0700
Page 08-0D 0800 Sound & Printer Buffer
0900 RS423, Speech & Tape output Buffer
0A00 RS423 & Tape input Buffer
0B00 Function Keys
0C00 User defined graphics
0D00 NMI routines (Disk/Econet)
0D9F Expander vector set
0DF0 Paged ROM workspace storage locations
Page 0E-18 0E00 USER workspace DFS workspace (not Master)
1900
3000 Screen (Mode 0, 1, 2) USER workspace with shadow Mode 128…134
Screen memory is in shadow ram at same addresses as on normal machines
4000 Screen (Mode 3)
5800 Screen (Mode 4, 5)
6000 Screen (Mode 6)
7B00 Screen (Mode 7)
Paged Rom 8000 Paged Roms Private Ram
C000 OS ROM Paged rom workspace
DC00 MOS CLI Buffer
DD00 *MOVE workspace
DF00 MOS private workspace
E000 OS ROM
FC00 FRED 1MHz bus
FD00 JIM 1MHz bus
FE00 SHIELA I/O Memory
FF00 OS ROM Vectors

1 - Page 00

AddressLenDescription
0000144Allocated to current language
007032Guaranteed unused with BASIC
009016Econet workspace
00A08Allocated to current NMI owner
00A88OS command workspace
00B016File system scratch space
00C016File system private space
00D01VDU status
Bit 0 VDU 2 enabled
Bit 1 Scroll disabled
Bit 2 Paged scroll selected
Bit 3 Soft scrolling
Bit 4 unused
Bit 5 VDU 5 enabled
Bit 6 Set when edit/text cursors are separated
Bit 7 Set if VDU driver disabled
00D11Byte mask for current graphics point
00D22Text colour to be ORed & EORed into memory respectively
00D42Graphics colour to be ORed & EORed into memory respectively
00D62Address of top line of current graphics character cell
00D81Caps-lock/shift-lock
16 Shift lock
32 Caps lock
48 No locks
00DA6Temp workspace
00E02Pointer to row multiplication table, high byte first
00E21Cassette filing system status
Bit 0 Input file open
Bit 1 Output file open
Bit 2 Unused
Bit 3 Set if currently *CAT
Bit 4 Unused
Bit 5 Unused
Bit 6 Set if at end of file
Bit 7 Set if end of file warning issued
00E31Cassette filing system options *OPT
00E43General OS workspace
00E71Auto repeat countdown timer
00E82Pointer to input buffer used by OSWORD 0x01
00EA1RS423 timeout counter
<0 RS423 system holds 6850 but has not yet timed out
=0 RS423 system holds 6850 but has timed out
=1 Cassette filing system using 6850
00EB1Cassette critical flag
00EC1Internal key no of most recently pressed key
00ED1Internal key no of first key pressed of those still pressed
00EE1Internal key number of character to be ignored when scanning keyboard
Note 0xEE is also RAM copy of 1MHz bus register
00EF1Accumulator value for most recent OSBYTE/OSWORD
00F01X register for most recent OSBYTE/OSWORD
00F11Y register value for most recent OSBYTE/OSWORD
00F22text pointer for processing OS commands/filenames
00F41RAM copy of currently selected Paged ROM
00F51Current logical speech PHROM or ROM filing system ROM number
00F62Address pointer into paged ROM or speech PHROM
00F82Unused
00FA2General OS workspace
00FC1Accumulator saved in IRQ routine
00FD2Pointer to error message
00FF1Escape status
Bit 7 set if ESCAPE pressed

On the BBC Micro addresses 0x0000…0x008F are reserved for the current language. The table above lists the known BASIC II memory map for those addresses.

BBC Basic reserves 0x0070…0x008F for user programs. User code should not use addresses outside that range unless they have replaced BASIC.

2 - Page 02

AddressLenNameDescription
02002USERVUser Vector
02022BRKVBRK Vector
02042IRQ1VInterrupt request Vector 1
02062IRQ2VInterrupt request Vector 2
02082CLIVOSCLI Vector
020A2BYTEVOSBYTE Vector
020C2WORDVOSWORD Vector
020E2WRCHVOSWRCH Vector
02102RDCHVOSRDCH Vector
02122FILEVOSFILE Vector
02142ARGSVOSARGS Vector
02162BGETVOSBGET Vector
02182BPUTVOSBPUT Vector
021A2GBPBVOSGBPB Vector
021C2FINDVOSFIND Vector
021E2FSCVFile system control entry vector
02202EVNTVEvent interrupt vector
02222UPTVUser print routine vector
02242NETVUsed by ECONET to take control of computer
02262VDUVUnrecognised VDU23 & PLOT commands
02282KEYVFull keyboard access
022A2INSVInsert into buffer vector
022C2REMVRemove from buffer vector
022E2CNPVCount/purge buffer vector
02302IND1VSpare Vector
02322IND2VSpare Vector
02342IND3VSpare Vector
02362Start address of OS variables
02382Address of ROM pointer table
023A2Address of ROM information table
023C2Address of key translation table
023E2Start address of VDU variables
02401CFS timeout counter
02411Input source
02421Keyboard semaphore
02431Primary OSHWM
02441Current OSHWM
02451RS423 mode
02461Character definition explosion state
02471Cassette/ROM filing system switch
02481RAM copy of ULA control reg
02491RAM copy of ULA palette reg
024A1ROM number active at last BRK
024B1ROM number containing BASIC
024C1Current ADC channel
024D1Max ADC channel
024E1ADC conversion type
024F1RS423 user flag
02501RS423 control flag
02511Flashing colours counter
02521Mark period counter
02531Space period counter
02541Keyboard auto-repeat delay
02551Keyboard auto-repeat period
02561*EXEC file handle
02571*SPOOL file handle
02581ESCAPE/BREAK effect
02591ECONET keyboard disable
025A1Keyboard status
025B1RS423 handshake extent
025C1RS423 input supression flag
025D1RS423/cassette selection flag
025E1Econet OS call interception status
025F1Econet OSRDCH interception status
02601Econet OSWRCH interception status
02611Speech suppression status
02621Sount suppression status
02631BELL channel
02641BELL envelope number/volume
02651BELL frequency
02661BELL duration
02671Startup message & !BOOT options
02681Length of soft key string
02691No of lines printed since last page
026A1No of items in VDU queue
026B1TAB character value
026C1ESCAPE character value
026D1Character 0xC0 to 0xCF status
026E1Character 0xD0 to 0xDF status
026F1Character 0xE0 to 0xEF status
02701Character 0xF0 to 0xFF status
02711Function key status
02721SHIFT+Function key status
02731CTRL+Function key status
02741CTRL+SHIFT+Function key status
02751ESCAPE key status
02761ESCAPE key effect
02771IRQ bit mask for user 6522
02781IRQ bit mask for 6850
02791IRQ bit mask for system 6522
027A1Tube presence flag
027B1Speech processor presence flag
027C1Write character destination status
027D1Cursor editing status
027E3Unused
02811Used by *FX1
02821RAM copy of serial processor ULA
02831Timer switch state
02841Soft key consistancy flag
02851Printer destination flag
02861Character ignored by printer
02873BREAK intercept code
028A2Unused
028C1Current language ROM number
028D1Last BREAK type
028E1Available RAM
028F1Start up option flag
02901VDU vertical adjust, set by *TV
02911Interlace toggle flag, set by *TV
02925First copy of system clock values
02975Second copy of system clock values
029C5Countdown interval timer value
02A116Paged ROM type table
02B12INKEY countdown timer
02B33OSWORD 0x01 workspace
02B64Low bytes of most recent analogue converter values
02BA4High bytes of most recent analogue converter values
02BE1Analogue system flag
02BF10Event enable flags
02C91Soft key expansion pointer
02CA1First auto repeat count
02CB3Two key rollover processing workspace
02CE1Sound semaphore
02CF9Buffer busy flags
02D89Buffer start indices
02E19Buffer end indices
02EA2Block size of current resident block of open cassette input file
02EC1Block flag of current resident block of open cassette input file
02ED1Last character in currently resident block of open cassette input file
02EE18Used as area to build OSFILE control blocks for *LOAD & *SAVE

3 - Page 03

AddressLenDescription
03002X/Right coordinate of graphics window
03022Y/Bottom coordinate of graphics window
03042X/left coordinate of graphics window
03062Y/Top coordinate of graphics window
03081X/left of text window
03091Y/bottom of text window
030A1X/right of text window
030B1Y/top of text window
030C2X coordinate of graphics origin
030E2Y coordinate of graphics origin
03104Current graphics origin in external coordinates
03144Current graphics cursor in external coordinates
03181Text cursor X coordinate
03191Text cursor Y coordinate
031A1Line within current graphics char of graphics point
031B4Graphic workspace or start of VDU queue
031F5VDU queue
03244Current graphics cursor in internal coordinates
033C2Graphics cursor Y coordinate
033E2Graphics cursor X coordinate
034A2Text cursor address
034C2Text window width in bytes
034E1High byte of screen memory start address, Low is 0x00
034F1Bytes per character
03502Address of top-left of screen
03522No bytes per line
03541Screen memory length
03551Mode
03561Screen memory map type
03571Foreground text colour
03581Background text colour
03591Graphics foreground mask
035A1Graphics background mask
035B1Graphics foreground modifier
035C1Graphics background modifier
035D2General VDU jump vector
035F1Record of last setting of 6845 cursor start reg
03601No colours available
03611No of pixels per byte
03622left/right colour masks
03642Text input cursor coordinates
03661Teletext output cursor character
03671Font flag (RAM or ROM)
Bit 1 Characters 224-255
Bit 2 Characters 192-223
Bit 3 Characters 160-191
Bit 4 Characters 128-159
Bit 5 Characters 96-127
Bit 6 Characters 64-95
Bit 7 Characters 32-63
03687Font location bytes
036F16Palette mapping actual colour for each logical colour
038029Header block for BPUT file store
039D1Offset of next byte to be output into BPUT buffer
039E1Offset of next byte to be read from BGET buffer
039F8Unused
03A711Filename of file being BGETed
03B231Block header of most recent block read
03B212Filename terminated by zero
03BE4Load address
03C24Exec address
03C62Block number address
03C82Block length
03CA1Block flag byte
03CB44 spare bytes
03CF2Checksum
03D11Sequential block gap, *OPT3
03D211Filename of file being searched for
03DD2Number of next block expected for BGET
03DF1Copy of block flag of last block read
03E032Runtime keyboard buffer

4 - Page 08-0D

AddressLenDescription
080064Sound workspace
084016Sound channel 0 buffer
085016Sound channel 1 buffer
086016Sound channel 2 buffer
087016Sound channel 3 buffer
088064Printer buffer
08C064Envelope storage area, envelopes 1-4
0900192RS423 output buffer or Envelope storage area, envelopes 5-16
09C064Speech buffer
0900256Cassette output buffer (takes entire page if used)
0A00256RS423 or Cassette input buffer
0B00161 byte pointer to *KEY text for soft keys 0-15
0B10240Function key text
0C00256Character 224-255 definitions
0D00159NMI routines (disk & econet)
0D9F121Expander vector set
0DF016Paged ROM workspace storage locations

5 - Page 0E-18 DFS

AddressLenDescription
0E00256Copy of track 0 sector 0 catalogue data
0F00256Copy of track 0 sector 1 catalogue data
1000256Workspace
1100256Parameter blocks for files/SPOOL/EXEC
1200256First file/SPOOL/EXEC buffer
1300256Second file buffer
1400256Third file buffer
1500256Fourth file buffer
1600256Fifth file buffer
1700256Workspace
1800256Workspace

This table relates to a BBC Model B with Acorn DFS active. This will use pages 0x0E to 0x18 with the USER workspace starting at page 0x19.

This does NOT apply when either the Cassette or ROM filesystem is active, or on a BBC Master 128. In those cases USER workspace starts at page 0x0E.

6 - Paged Roms

Paged roms exist within the 16K address block 0x8000…0xBFFF.

The following table shows the layout of the Paged Roms on a Standard Machines

Rom # BBC A & B BBC B+ Master 128 Master Compact Acorn Electron
15 F IC101 AUX ROM, usually
Basic or Basic II
IC71 BASIC II
or Sideways RAM
(B+ 128K only)
Terminal Utilities External ROM
+1, Slogger etc
14 E IC100 AUX ROM
usually empty
View BASIC IV
13 D IC88 "Disk & Net ROM"
typically empty
Sideways RAM
(B+ 128K only)
ADFS ADFS 2.10
12 C IC52 BASIC ROM
typically containing DFS
Basic System top 16k
11 B Mapped to slot 0xF IC68 DFS 2.26
+ SRAM 1.05
Edit System 2nd 16k IC 2 BASIC II
10 A Mapped to slot 0xE Viewsheet System 3rd 16k
9 9 Mapped to slot 0xD IC62 RAM DFS System 4th 16k Keyboard is
mapped here
8 8 Mapped to slot 0xC IC62 RAM IC27 Internal Socket IC29
7 7 Mapped to slot 0xF IC57 RAM RAM or IC37 RAM External ROM
Internal rom must be disabled
use *FX142,n to select
6 6 Mapped to slot 0xE IC57 RAM RAM or IC37 RAM
5 5 Mapped to slot 0xD IC44 RAM RAM or IC41 RAM
4 4 Mapped to slot 0xC IC44 RAM RAM or IC41 RAM
3 3 Mapped to slot 0xF IC35 RAM SK4 Front
Cartridge slot
IC17
2 2 Mapped to slot 0xE IC35 RAM IC23
1 1 Mapped to slot 0xD Sideways RAM (B+128K only) or
BASIC II (alternate location)
SK3 Rear
Cartridge slot
IC38 or expansion port
0 0 Mapped to slot 0xC IC38 or expansion port