GEMREL - release memory.

Usage:

mme     gemrel
tra     FAIL_RTN

Where:

A register
contains a return address in bits 0-17. MME GEMREL will return to this address if memory is released successfully.
Q register
tells how much memory should be released. The upper half of the register gives the number of words of memory that should be released from the lowest addresses of the program. The lower half gives the number of words of memory that should be released from the highest addresses of the program.
FAIL_RTN
is a routine that should be invoked if the MME GEMREL action fails. If the MME GEMREL is successful, it will return to the location specified in the A register.

Description:

MME GEMREL releases memory that has been allocated for the current program. Memory is released in chunks of 1024 words (1K). If the requested number of words is not an exact multiple of 1024, the number will be truncated down to the nearest multiple.

If memory is released from low addresses in the program, the base address register for the program will be changed. In this case, the return address in the A register is assumed to be relative to the new value of the base address register. Because of the change in the base address register, release of lower memory should only be attempted by "load" type routines.

The value of word 37 (octal) of the slave program prefix is not changed by MME GEMREL. MME GEMREL may not be used in a courtesy call.

Copyright © 2000, Thinkage Ltd.