[img] Z80 BBC BASIC for the Sinclair Z88
MDFS::Software.BBCBasic.Z88 Search

Technical Information

In its Z88 incarnation, BASIC occupies a memory map in the following form:
$C000 - $FFFF           BBC BASIC interpreter
$4000 - $BFFF           (additional 32K of program/workspace, expanded Z88)
$2000 - $3FFF           BASIC program/workspace
$0000 - $1FFF           Operating system use (and occasional application stack)
Memory is fixed at the bottom and variable at the top. BASIC workspace occupies &2000 to &22FF. PAGE starts at &2300.

BASIC's program/workspace is arranged in the following manner:
 

            +-------------------+   $FFFF
            | BASIC interpreter |
            .                   .
            .                   .
HIMEM       +-------------------+   $BFFF or $3FFF
            | Stack             |
            +-------------------+   Current limit of the stack
            .                   .   (Stack expands downwards)
            . Unused memory     .
            .                   .
            +-------------------+   Current limit of the heap
            | Heap              |   (Heap expands upwards)
LOMEM       +-------------------+
            .                   .
            .                   .
TOP         +-------------------+
            | Program           |
PAGE        +-------------------+   $2300
            | Workspace for     |
            | interpreter       |
            +-------------------+   $2000
            | Operating system  |
            | system usage      |
            +-------------------+   $0000
When BASIC is swapped out, then unused memory above the end of the heap and below the stack is used by other applications. When BASIC is returned to its contents may have changed.

HOME   DOCUMENTS   LINKS   RECENT CHANGES
Best viewed with Any Browser Valid HTML 4.0! Authored by J.G.Harston - Last update: 20-Aug-2003