3.7. Expanded Memory

On the 1750A, GCC-1750 can support up to 1M word of code by using a memory management unit (MMU). The MMU switches the 64K words of code visible to the CPU as byte addresses 0x00000000 to 0x0001ffff among 16, 64K blocks of real memory under the control of the executing program.

The GCC-1750 scheme simply switches the address state, (and the 64K block) on each inter-module function call. The switch is performed in the run-time system (which must be in address state zero), and the compiler generates BEX instructions to call the run-time system on each function call and return.

The 64K words of data are shared among all address states by initializing the page tables so that they point to the same 64K of RAM. If your system has more than 64K words of RAM, then you can access the rest using a custom function that modifies just part of the data address space (just one 4K word page), and then sets that page table entry to point to the appropriate address in RAM.

If you have a 1750B that supports the long load and store instructions, then you can directly access any RAM location using its long address. The GCC-1750 assembler includes a pseudo instruction (long load immediate, LLIM) to load a long address into a register pair.

It is the responsibility of the application programmer to initialize the MMU to reflect his memory organization, and to write a linker script file that locates program segments in the appropriate 64K blocks of memory.

Note that the linker supports different logical and physical addresses as required by the 1750 using the AT and OVERLAY commands. See the User's Guide for more information.