MEMORY MAP

Back to:
index E97 Intel

A details of "COMPAS" memory planning is discussed on this page. They are different for "E97" and Intel compilers.


This is memory map for "E97" compiler.

All operative memory, available in "E97", have addresses in a range between LoRAM = 0 and HiRAM = 100 (hex-value). The upper area of memory is used for system purposes: stack and buffer for integer output are located here. So when compiler begins his work, it gets only part of memory: from LoMem = 0 to HiMem = HiMem0. HiMem0 is a constant of the compiler; "COMPAS" uses HiMem0 = E0.

When "COMPAS" plans memory for variables, it reserves them addresses from HiMem, so this value is decreasing.

Typed constants are created not in variable, but in the program region (it is done to save their initial values together with program code). To jump over type constants, "COMPAS" generates jump instruction, which is shown on the bottom left part of picture as little white arrow.

Then translation of operators begins. While "COMPAS" builds a program, LoMem value is growing. So as it is clearly seen from the picture, free memory between LoMem and HiMem is expended. For some program "E97" memory size will not be enough.

Note, that "E97" ROM with subroutines, used by "COMPAS", are not shown on the picture; the low ROM address is equal to 4000 (hex-value).

Memory map for E97



Back to:
index top Intel


And now look at the memory map for Intel compiler. It has some differences.

MS DOS always automatically sets stack pointer to the upper part of 64K segment, so there is no special system memory region as in "E97".

You can see also a new area at the bottom of the picture - it is Run-Time Library (RTL). RTL is a piece of code with subroutines, used by "COMPAS" (input/output interchange, some standard functions like ABS). RTL plays the same role as ROM in "E97".

Other regions work the same way as described above for "E97".

You may ask, why I take so small HiRAM value in 64K segment. The only reason for it is the following: I wanted to make the power of "E97" and Intel compilers similar.

Memory map for Intel



Back to:
index top E97