[Main]
Name=EM_getArchiveMemoryBeginning
Type=Function
Subtype=ROM Call
Header Files=flash.h
Definition=unsigned char * EM_getArchiveMemoryBeginning(void);
MinAMS=2.00
See Also=flashapp.h/OO_GetFirstFlashAppSectorAddress, flash.h/CappedHW1ArchiveMemoryBeginning

[ROM Call]
Index=$3CF

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

[Explanation]
This ROM_CALL first calls <A HREF="$$LINK(flashapp.h/OO_GetEndOfAllFlashApps)">OO_GetEndOfAllFlashApps</A>
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 reduce the amount of usable
archive memory:
<UL>
<LI>on 89 HW1 and 92+ HW1, capping to <CODE>ROM_base+0x190000</CODE> (see
<A HREF="$$LINK(flash.h/CappedHW1ArchiveMemoryBeginning)">CappedHW1ArchiveMemoryBeginning</A>)</LI>
<LI>on V200, capping to <CODE>0x500000</CODE> (<CODE>ROM_base+0x300000</CODE>).</LI>
</UL>
Finally, it returns the result to the user.<BR>
<BR>
The capping described above can be defeated on both hardware models. This ROM_CALL and
<A HREF="$$LINK(flashapp.h/OO_GetEndOfAllFlashApps)">OO_GetEndOfAllFlashApps</A> can be used to
detect whether the capping was defeated.

[References]
In=alloc.h/HeapShuffle, alloc.h/HeapUnlock, flash.h/EM_abandon, flash.h/EM_findEmptySlot, flash.h/EM_survey, flash.h/EM_write, unknown.h/_ROM_CALL_3CE
Out=flash.h/FL_getHardwareParmBlock, system.h/AB_getGateArrayVersion, flashapp.h/OO_GetEndOfAllFlashApps, flash.h/CappedHW1ArchiveMemoryBeginning
