BBC MEMORY MAP (pt. 1)
----------------------
This memory map is for a BBC microcomputer model'B' fitted with
Operating System 1.20 and BASIC II. It also gives details of memory
usage by the Acorn DFS. If another language rom is in use other than
BASIC then the map will be different.
Compiled By Alan Coats Jan'1985
This memory map has been submitted to 8-Bit Software and is believed to
be Public Domain, I have made many alterations to the original file but
have not been able to check all the information, if you find any errors
or omissions please let me know.
Mick Needham (6EE)
PAGE ZERO (&00) : OS, BASIC & USER workspace
A large part of the contents of page zero may be altered if a language
rom other than BASIC is used.
0000-0001 LOMEM (LO-HI) pointer to start of BASIC variables
0002-0003 VARTOP (LO-HI) pointer to end of BASIC variables
0004-0005 Basic stack-pointer (LO-HI)
0006-0007 HIMEM (LO-HI)
0008-0009 ERL (LO-HI)
000A BASIC text pointer offset
000B-000C Text-pointer (LO-HI)
000D-0011 RND store (5 bytes)
0012-0013 TOP (LO-HI)
0014 Number of characters in PRINT field
0015 PRINT flag: bit 7 set if PRINT output in hex
0016-0017 ERROR vector default to &B443 (LO-HI)
0018 PAGE (high byte - low byte always &00)
0019-001A Secondary BASIC text-pointer
001B Offset for secondary BASIC text-pointer
001C-001D DATA pointer - reset to PAGE
001E COUNT
001F LISTO option
0020 TRACE flag: &00=ON &01=OFF
0021-0022 Maximum TRACE number
0023 WIDTH
0024 Number of REPEATs left
0025 Number of GOSUBs left
0026 15*number of FORs left
0027 Variable type:
&00=string
&40=integer
&05=floating-point
&A4=function
&F2=procedure
&FF=real
0028 OPT value for assembler
Bit 0 list flag
Bit 1 error flag
Bit 2 relocate flag
0029-002B Assembled code buffer (3 bytes)
002A-002D Integer accumulator (IAC) (4 bytes)
2A-2B Pointer to variable
2C Variable type
&00=8 bit byte
&04=32 bit integer variable
&05=40 bit floating point variable
&80=string at a defined address
&81=dynamic string
002E-0035 Floating-point accumulator 1 (FAC#1)
2E Sign/POINT parameter
2F overflow/underflow byte
30 exponent
31-34 mantissa
35 rounding byte
0036 Length of string
0037-0038 Object location in assembler
RENUMBER pointer
Pointer for variable name in DIM
Line-crunching pointer
Action address JMP vector
0039 Length of variable name
0039-003A Number of bytes into array to find variable
Pointer to keyword table
RENUMBER/DELETE line-number
003B-003C Pointer for RENUMBER
Number of inserted spaces in LISTO
003B-0042 Floating-point accumulator 2 (FAC#2)
3B sign
3C underflow/overflow byte
3D exponent
3E-41 mantissa
42 rounding byte
003C-003D Pointer used in DEF
003D-003E Pointer used in search for line and in line-crunching
003F Array type:
&05=floating-point
&04=string
003F-0047 Hex output nibbles
0042-0047 Numeric work area
0043 Temporary store for calculating exponents
0048 Counter in series evaluation
0049 Adjustment factor for ASCII/floating-point conversion
004A Temporary store for calculating exponents
004B-004C Pointer to current variable
004D File-number temporary store
004D-004E LISTO pointer
004F INPUT flags
0050-006F Not used
0070-008F Guaranteed unused (32 bytes) with BASIC
0090-009F Econet workspace
00A0-00A7 Allocated to current NMI owner
00A8-00AF OS command workspace
00B0-00BF Filing system scratch space
00C0-00CF Filing system private space
00D0 VDU status
Bit 0 VDU 2 enabled
Bit 1 Scrolling disabled
Bit 2 Paged scrolling selected
Bit 3 Soft scrolling
Bit 4 Not used
Bit 5 VDU 5 enabled
Bit 6 Set when edit and text cursor are separated
Bit 7 Set if VDU driver disabled
00D1 Byte mask for current graphics point
00D2-00D3 Text colour bytes to be ORed and EORed into memory, respectively
00D4-00D5 As D2-D3 except for graphics colour bytes
00D6-00D7 Address of top line of current graphics character cell
00D8 Caps-lock/shift-lock
No locks: 48
Caps lock: 32
Shift lock: 16
00DA-00DF Temporary workspace
00E0-00E1 Pointer to row multiplication table, high byte first
00E2 Cassette filing system status byte
Bit 0 Set if input file open
Bit 1 Set if output file open
Bit 2 Not used
Bit 3 Set if currently *CAT
Bit 4 Not used
Bit 5 Not used
Bit 6 Set if at end of file
Bit 7 Set if end of file warning given
00E3 Cassette filing system options byte (*OPT)
00E4-00E6 General OS workspace
00E7 Auto repeat countdown timer
00E8-00E9 Pointer to input buffer used by OSWORD &01
00EA RS423 timeout counter
=1 Cassette filing system using 6850
=0 RS423 system holds 6850 but has timed out
<0 RS423 system holds 6850 but has not yet timed out
00EB Cassette critical flag
00EC Internal key number of most recently pressed key
00ED Internal key number of first key pressed of those still pressed
00EE Internal key number of character to be ignored when scanning keyboard
NOTE : EE also RAM copy of 1MHz bus register
00EF Accumulator value for most recent OSBYTE/OSWORD
00F0 X reg for most recent OSBYTE/OSWORD
00F1 Y reg for most recent OSBYTE/OSWORD
00F2-00F3 Text pointer for processing OS commands or filenames
00F4 RAM copy of currently selected ROM number
00F5 Current logical speech PHROM or ROM filing system ROM number
00F6-00F7 Address pointer into paged ROM or speech PHROM
00F8-00F9 Not used
00FA-00FB General OS workspace
00FC Accumulator saved here in IRQ routine
00FD-00FE Pointer to error message
00FF Flag: bit 7 set if ESCAPE pressed
PAGE 1 (&01) : 6502 STACK
0100-01FFProcessor stack (256 bytes)
PAGE 2 (&02) : OS workspace
0200-0201 User vector(USERV)
0202-0203 BRK vector(BRKV)
0204-0205 Interrupt-request vector 1(IRQ1V)
0206-0207 Interrupt-request vector 2(IRQ2V)
(User interrupt routines vectored here)
0208-0209 OSCLI vector(CLIV)
020A-020B OSBYTE vector(BYTEV)
020C-020D OSWORD vector(WORDV)
020E-020F OSWRCH vector(WRCHV)
0210-0211 OSRDCH vector(RDCHV)
0212-0213 OSFILE vector(FILEV)
0214-0215 OSARGS vector(ARGSV)
0216-0217 OSBGET vector(BGETV)
0218-0219 OSBPUT vector(BPUTV)
021A-021B OSGBPB vector(GBPBV)
021C-021D OSFIND vector(FINDV)
021E-021F File system control entry vector(FSCV)
0220-0221 Event interrupt vector(EVNTV)
0222-0223 User's print routine vector(UPTV)
0224-0225 Used by ECONET to take control of computer(NETV)
0226-0227 Unrecognised VDU23 and PLOT commands(VDUV)
0228-0229 For all keyboard access(KEYV)
022A-022B Insert into buffer vector(INSV)
022C-022D Remove from buffer vector(REMV)
022E-022F Count/purge buffer vector(CNPV)
0230-0231 Spare vector(IND1V)
0232-0233 Spare vector(IND2V)
0234-0235 Spare vector(IND3V)
0236-0237 Start address of OS variables
0238-0239 Address of ROM pointer table
023A-023B Address of ROM information table
023C-023D Address of key translation table
023E-023F Start address of OS VDU variables
0240 CFS timeout counter
0241 Input source
0242 Keyboard semaphore
0243 Primary OSHWM
0244 Current OSHWM
0245 RS423 mode
0246 Character definition explosion state
0247 Cassette/ROM filing system switch
0248 RAM copy of video ULA control reg
0249 RAM copy of video ULA palette reg
024A ROM number active at last BRK
024B Number of ROM socket containing BASIC
024C Current ADC channel
024D Maximum ADC channel number
024E ADC conversion type
024F RS423 use flag
0250 RS423 control flag
0251 Flashing colours counter
0252 Mark period counter
0253 Space period counter
0254 Keyboard auto-repeat delay
0255 Keyboard auto-repeat period
0256 *EXEC file handle
0257 *SPOOL file handle
0258 ESCAPE/BREAK effect
0259 Econet keyboard disable
025A Keyboard status byte
025B RS423 handshake extent
025C RS423 input supression flag
025D RS423/cassette selection flag
025E Econet OS call interception status
025F Econet OSRDCH interception status
0260 Econet OSWRCH interception status
0261 Speech supression status
0262 Sound supression status
0263 BELL channel
0264 BELL envelope number/volume
0265 BELL frequency
0266 BELL duration
0267 Startup message and !BOOT options
0268 Length of soft key string
0269 Number of lines printed since last page
026A Number of items in VDU queue
026B TAB character value
026C ESCAPE character value
026D Character &C0 to &CF status
026E Character &D0 to &DF status
026F Character &E0 to &EF status
0270 Character &F0 to &FF status
0271 Function key status
0272 SHIFT+function key status
0273 CTRL+function key status
0274 CTRL+SHIFT+function key status
0275 ESCAPE key status
0276 ESCAPE effect flag
0277 IRQ bit mask for user 6522
0278 IRQ bit mask for 6850
0279 IRQ bit mask for system 6522
027A Tube presence flag
027B Speech processor presence flag
027C Write character destination status
027D Cursor editing status
027E Not used
027F Not used
0280 Not used
0281 Used by *FX1
0282 RAM copy of serial processor ULA
0283 Timer switch state
0284 Soft key consistancy flag
0285 Printer destination flag
0286 Character ignored by printer
0287-0289 BREAK intercept code
028A Not used
028B Not used
028C Current language ROM number
028D Last BREAK type
028E Available RAM
028F Start up option flag
0290 VDU vertical adjust, as set by *TV
0291 Interlace toggle flag, as set by *TV
0292-0296 First copy of system clock values
0297-029B Second copy of system clock values
029C-02A0 Countdown interval timer value
02A1-02B0 Paged ROM type table
02B1-02B2 INKEY countdown timer
02B3-02B5 OSWORD &01 workspace
02B6-02B9 Low bytes of most recent analogue converter values
02BA-02BD High bytes of most recent analogue converter values
02BE Analogue system flag
02BF-02C8 Event enable flags
02C9 Soft key expansion pointer
02CA First auto repeat count
02CB-02CD Two key rollover processing workspace
02CE Sound semaphore
02CF-02D7 Buffer busy flags
02D8-02E0 Buffer start indices
02E1-02E9 Buffer end indices
02EA-02EB Block size of currently resident block of open cassette input file
02EC Block flag of currently resident block of open cassette input file
02ED Last character in currently resident block of open cassette input file
02EE-02FF Used as area to build OSFILE control blocks for *LOAD and *SAVE
PAGE 3 (&03) : OS workspace
0300-0301 X co-ordinate: right side of graphics window
0302-0303 Y co-ordinate: bottom of graphics window
0304-0305 X co-ordinate: left side of graphics window
0306-0307 Y co-ordinate: top of graphics window
0308 X co-ordinate: left side of text window
0309 Y co-ordinate: bottom of text window
030A X co-ordinate: right side of text window
030B Y co-ordinate: top of text window
030C-030D X co-ordinate: graphics origin
030E-030F Y co-ordinate: graphics origin
0310-0313 Current graphic origin in external co-ordinates
0314-0317 Current graphics cursor in external co-ordinates
0318 Text cursor X co-ordinate
0319 Text cursor Y co-ordinate
031A Line within current graphics character of current graphics point
031B-031E Graphics workspace OR first part of VDU queue
031F-0323 VDU queue
0324-0327 Current graphics cursor in internal co-ordinates
033C-033D Graphics cursor Y co-ordinate
033E-033F Graphics cursor X co-ordinate
034A-034B Text cursor address
034C-034D Text window width in bytes
034E High byte of screen memory start address (low byte assumed to be &00)
034F Number of bytes per character
0350-0351 Address of top-left of screen (true address when hardware-scroll
in operation)
0352-0353 Number of bytes per line
0354 Screen memory length
0355 Mode
0356 Screen memory map type
0357 Foreground text colour
0358 Background text colour
0359 Graphics foreground mask
035A Graphics background mask
035B Graphics foreground modifier
035C Graphics background modifier
035D-035E General VDU jump vector
035F Record of last setting of 6845 cursor start reg
0360 Number of colours available
0361 Number of pixels per byte
0362-0363 Left and right colour masks
0364-0365 X and Y co-ordinates of text input cursor
0366 Teletext output cursor character
0367 Font 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
0368-036E Font location bytes
036F-037E Palette 16 bytes containing actual colour for each logical colour
0380-039C Header block for BPUT file store
039D Offset of next byte to be output into BPUT buffer
039E Offset of next byte to be read from BGET buffer
039F-03A6 Not used
03A7-03B1 Filename of file being BGETed
03B2-03D0 Block header of most recent block read
B2-BD Filename terminated by zero
BE-C1 Load address
C2-C5 Execution address
C6-C7 Block number
C8-C9 Length of block
CA Block flag byte
CB-CE Four spare bytes
CF-D0 Checksum byte
03D1 Sequential block gap as set by *OPT3
03D2-03DC Filename of file being searched for
03DD-03DE Number of next block expected for BGET
03DF Copy of block flag of last block read
03E0-03FF Run-time keyboard buffer (32 bytes)
PAGE 4 (&04) : BASIC workspace
0400-046B System integer variables @% to Z% :4 bytes each (LO-HI)
046C-047F Floating point temporary area
0480-04F5 Variables catalogue
80-81 Pointer to first variable @...
82-83 Pointer to first variable A...
...and so on to Z..., then a... and so on to...
F4-F5 Pointer to first variable z...
(Each pointer starts a linked list of all variables beginning with its letter)
04F6-04F7 Pointer to procedures list
04F8-04F9 Pointer to functions list
04FA-04FF Not used
PAGE 5 (&05) : BASIC workspace
0500-0595 FOR stack
0596-05A3 Not used
05A4-05CB REPEAT stack
05CC-05FF GOSUB stack
PAGE 6 (&06) : BASIC workspace
0600-06FF String buffer
PAGE 7 (&07) : BASIC workspace
0700-07FF Line input buffer
PAGE 8 (&08) : SOUND & PRINTER BUFFER
0800-083F Sound workspace
0840-084F Sound channel 0 buffer
0850-085F Sound channel 1 buffer
0860-086F Sound channel 2 buffer
0870-087F Sound channel 3 buffer
0880-08BF Printer buffer
08C0-08FF Envelope storage area, envelopes 1-4
PAGE 9 (&09) : RS423, SPEECH & TAPE BUFFER
0900-09BF Envelope storage area, envelopes 5-16
09C0-09FF Speech buffer
OR
0900-09BF RS423 output buffer
09C0-09FF Speech buffer
OR
0900-09FF Cassette output buffer
PAGE 10 (&0A) : RS423 & TAPE BUFFER
0A00-0AFF RS423 input buffer
OR
0A00-0AFF Cassette input buffer
PAGE 11 (&0B) : FUNCTION KEYS
0B00 Pointer to *KEY0 text
0B01 Pointer to *KEY1 text
0B02 Pointer to *KEY2 text
0B03 Pointer to *KEY3 text
0B04 Pointer to *KEY4 text
0B05 Pointer to *KEY5 text
0B06 Pointer to *KEY6 text
0B07 Pointer to *KEY7 text
0B08 Pointer to *KEY8 text
0B09 Pointer to *KEY9 text
0B0A Pointer to *KEY10 text
0B0B Pointer to *KEY11 text
0B0C Pointer to *KEY12 text
0B0D Pointer to *KEY13 text
0B0E Pointer to *KEY14 text
0B0F Pointer to *KEY15 text
0B10-0BFF Function keys text
PAGE12 (&0C) : USER-DEFINED CHARACTERS
0C00-0CFF Characters 224-255 definitions
PAGE 13 (&0D) : OS workspace
0D00-0D9E NMI routines (disk and Econet)
0D9F-0DEF Expander vector set
0DF0-0DFF Paged ROM workspace storage locations
PAGE 14 (&0E) : DFS or USER workspace
0E00-0EFF Workspace in disk systems : Contains copy of track 0, sector 0 on
the currently accessed disk (catalogue data)
PAGE 15 (&0F) : DFS or USER workspace
0F00-0FFF Workspace in disk systems : Contains copy of
track 0, sector 1 on the currently accessed disk (catalogue data)
PAGE 16 (&10) : DFS or USER workspace
1000-10FF Workspace in disk systems
PAGE 17 (&11) : DFS or USER workspace
1100-11FF Parameter-blocks for files/SPOOL/EXEC
PAGE 18 (&12) : DFS or USER workspace
1200-12FF EXEC/SPOOL workspace - First file buffer
Programs which do not use data-files, SPOOL or EXEC may use this space
PAGE 19 (&13) : DFS or USER workspace
1300-13FF Second file buffer : Programs which do not use
more than one data-file may use this space
PAGE 20 (&14) : DFS or USER workspace
1400-14FF Third file buffer : Programs which do not use
more than two data-files may use this space
PAGE 21 (&15) : DFS or USER workspace
1500-15FF Fourth file buffer : Programs which do not use
more than three data-files may use this space
PAGE 22 (&16) : DFS or USER workspace
1600-16FF Fifth file buffer : Programs which do not use
more than four data files may use this space
PAGE 23 (&17) : DFS or USER workspace
PAGE 24 (&18) : DFS or USER workspace
PAGE 25 (&19) : USER workspace
PAGE 26 (&1A) : USER workspace
PAGE 27 (&1B) : USER workspace
PAGE 28 (&1C) : USER workspace
PAGE 29 (&1D) : USER workspace
PAGE 30 (&1E) : USER workspace
PAGE 31 (&1F) : USER workspace
PAGE 32 (&20) : USER workspace
PAGE 33 (&21) : USER workspace
PAGE 34 (&22) : USER workspace
PAGE 35 (&23) : USER workspace
PAGE 36 (&24) : USER workspace
PAGE 37 (&25) : USER workspace
PAGE 38 (&26) : USER workspace
PAGE 39 (&27) : USER workspace
PAGE 40 (&28) : USER workspace
PAGE 41 (&29) : USER workspace
PAGE 42 (&2A) : USER workspace
PAGE 43 (&2B) : USER workspace
PAGE 44 (&2C) : USER workspace
PAGE 45 (&2D) : USER workspace
PAGE 46 (&2E) : USER workspace
PAGE 47 (&2F) : USER workspace
PAGE 48 (&30) : USER workspace or SCREEN memory (HIMEM 0,1,2)
PAGE 49 (&31) : USER workspace or SCREEN memory
PAGE 50 (&32) : USER workspace or SCREEN memory
PAGE 51 (&33) : USER workspace or SCREEN memory
PAGE 52 (&34) : USER workspace or SCREEN memory
PAGE 53 (&35) : USER workspace or SCREEN memory
PAGE 54 (&36) : USER workspace or SCREEN memory
PAGE 55 (&37) : USER workspace or SCREEN memory
PAGE 56 (&38) : USER workspace or SCREEN memory
PAGE 57 (&39) : USER workspace or SCREEN memory
PAGE 58 (&3A) : USER workspace or SCREEN memory
PAGE 59 (&3B) : USER workspace or SCREEN memory
PAGE 60 (&3C) : USER workspace or SCREEN memory
PAGE 61 (&3D) : USER workspace or SCREEN memory
PAGE 62 (&3E) : USER workspace or SCREEN memory
PAGE 63 (&3F) : USER workspace or SCREEN memory
PAGE 64 (&40) : USER workspace or SCREEN memory (HIMEM 3)
PAGE 65 (&41) : USER workspace or SCREEN memory
PAGE 66 (&42) : USER workspace or SCREEN memory
PAGE 67 (&43) : USER workspace or SCREEN memory
PAGE 68 (&44) : USER workspace or SCREEN memory
PAGE 69 (&45) : USER workspace or SCREEN memory
PAGE 70 (&46) : USER workspace or SCREEN memory
PAGE 71 (&47) : USER workspace or SCREEN memory
PAGE 72 (&48) : USER workspace or SCREEN memory
PAGE 73 (&49) : USER workspace or SCREEN memory
PAGE 74 (&4A) : USER workspace or SCREEN memory
PAGE 75 (&4B) : USER workspace or SCREEN memory
PAGE 76 (&4C) : USER workspace or SCREEN memory
PAGE 77 (&4D) : USER workspace or SCREEN memory
PAGE 78 (&4E) : USER workspace or SCREEN memory
PAGE 79 (&4F) : USER workspace or SCREEN memory
PAGE 80 (&50) : USER workspace or SCREEN memory
PAGE 81 (&51) : USER workspace or SCREEN memory
PAGE 82 (&52) : USER workspace or SCREEN memory
PAGE 83 (&53) : USER workspace or SCREEN memory
PAGE 84 (&54) : USER workspace or SCREEN memory
PAGE 85 (&55) : USER workspace or SCREEN memory
PAGE 86 (&56) : USER workspace or SCREEN memory
PAGE 87 (&57) : USER workspace or SCREEN memory
PAGE 88 (&58) : USER workspace or SCREEN memory (HIMEM 4,5)
PAGE 89 (&59) : USER workspace or SCREEN memory
PAGE 90 (&5A) : USER workspace or SCREEN memory
PAGE 91 (&5B) : USER workspace or SCREEN memory
PAGE 92 (&5C) : USER workspace or SCREEN memory
PAGE 93 (&5D) : USER workspace or SCREEN memory
PAGE 94 (&5E) : USER workspace or SCREEN memory
PAGE 95 (&5F) : USER workspace or SCREEN memory
PAGE 96 (&60) : USER workspace or SCREEN memory (HIMEM 6)
PAGE 97 (&61) : USER workspace or SCREEN memory
PAGE 98 (&62) : USER workspace or SCREEN memory
PAGE 99 (&63) : USER workspace or SCREEN memory
PAGE 100 (&64) : USER workspace or SCREEN memory
PAGE 101 (&65) : USER workspace or SCREEN memory
PAGE 102 (&66) : USER workspace or SCREEN memory
PAGE 103 (&67) : USER workspace or SCREEN memory
PAGE 104 (&68) : USER workspace or SCREEN memory
PAGE 105 (&69) : USER workspace or SCREEN memory
PAGE 106 (&6A) : USER workspace or SCREEN memory