Memory Map & Technical Details

For the advanced user, here is a summary of some technical details of Z88 CamelForth v3.00. Note that these are version-specific, and subject to change.

Memory Map

Z88 CamelForth divides the memory space of the Z88 into the following areas:

OZ system usage and data stack
CamelForth dynamic data (detailed later)
RAM region
RAM/ROM1 regions
RAM/ROM2 regions
CamelForth application

CamelForth Dynamic Data

The area from $2000-$24FF is used as detailed below. If you know your application won't be using a particular area, you can allocate it either by simply having a constant point to it, or by using RAM DP ! to alter the RAM region pointer, doing some allocations, and then using RAM DP ! to reset the pointer.

Far memory allocation structures.
Internal "user" variables.
Pictured numeric output area (34 bytes).
PAD (84 bytes).
Return stack (93 cells).
TIB (80 bytes).
0PAD - used for filenames and other OZ stuff (256 bytes).
File line input area (128 bytes).
Interpretive string scratch space (128 bytes).

Register Usage

The Z80 registers are used as follows, and must be preserved. Unmentioned registers may be used freely and are not preserved by any words.

Top of data stack (TOS).
Interpretive pointer (IP).
Data stack pointer (PSP).
Return stack pointer (RSP).
User pointer (UP).

More about CamelForth

Back to the Z88 home page