EM_getArchiveMemoryBeginning Function (ROM Call 0x3CF)

AMS 2.00 or higher flash.h

unsigned char * EM_getArchiveMemoryBeginning(void);

Returns a pointer to the first byte of the archive memory area.

This ROM_CALL first calls OO_GetEndOfAllFlashApps and rounds the result up to the next Flash sector boundary (multiple of 64 KB). Then, it calls a subroutine which, on two hardware models, increases the address to artificially reduce the amount of usable archive memory (MaxMem, XPand and tiosmod+amspatch nullify this code):

Finally, it returns the result to the user.

The capping described above can be defeated on both hardware models. This ROM_CALL and OO_GetEndOfAllFlashApps can be used to detect whether the capping was defeated.


Uses: FL_getHardwareParmBlock, AB_getGateArrayVersion, OO_GetEndOfAllFlashApps, CappedHW1ArchiveMemoryBeginning
Used by: HeapShuffle, HeapUnlock, EM_abandon, EM_findEmptySlot, EM_survey, EM_write, ROM Call 0x3CE


See also: OO_GetFirstFlashAppSectorAddress, CappedHW1ArchiveMemoryBeginning