Compile Procedures as Overlay
OVERLAY 1
OVERLAY 0
OVERLAY 1 causes the compiler to compile all following procedures as one overlay group, until another OVERLAY command occurs. OVERLAY 1 starts a new overlay group, OVERLAY 0 ends compilation of overlays and returns to normal mode.
Overlays can be used as a meaning for reducing ram memory requirement. Compiling procedures as overlay group means, that they used the same memory. Only one of these procedures can be in the ram at one time, the others are stored in flash ram. If another of these procedures is called, then this procedure has to be loaded instead. This results in the following properties:
The memory (ram) requirement of the procedures is that of the largest of the overlayed procedures.
There has to be free flash ram for compiling and executing programs with overlayed procedures.
Compiling overlayed procedures requires more time, because storage in flash ram is time consuming.
A much smaller, but not negligable overhead is required for loading these procedures at runtime.
Procedures of one overlay group can't call each other.
|