[Main]
Name=enter_ghost_space
Type=Function
Subtype=tigcc.a
Header Files=system.h
Definition=void enter_ghost_space (void);
Attributes=__attribute__((deprecated))

[Library Call]
Asm=1

[Description]
Transfers the execution into the "ghost address space".

[Explanation]
enter_ghost_space transfers the program control into the "ghost address space" (i.e. into the
area above the address 0x40000, which does not exist physically on the calculator, but represents
a shadow of the regular RAM space). This function is introduced to bypass some protections
introduced in AMS 2: The protection device does not protect the "ghost space",
so you have greater rights there. From the logical aspect of view, enter_ghost_space simply
adds 0x40000 to the program counter. In practice, this is performed in a very awkward way,
because some new protections in AMS 2 do not allow us to do this directly
under all conditions. See the <A HREF="$$INFOLINK(faq/49)">launcher</A> FAQ entry for the
only example where you should really use this function. You should not to know anything more
about it.
<BR><BR>
However, be sure to call enter_ghost_space only from the <CODE>_main</CODE> function.
Once you have called it, you may not call any functions from the TIGCC library or from
your program without explicitly adding 0x40000 to their address. This does not affect macros
like <A HREF="$$LINK(ASM_call)">ASM_call</A> or ROM calls.
<BR><BR>
Moreover, enter_ghost_space doesn't work on HW3 (the TI-89 Titanium).
<BR><BR>
<B>Note:</B> Because of these limitations, enter_ghost_space is deprecated.
You can use the newer
<CODE><A HREF="$$INFOLINK(httigcc/advanced_ghostspace)">EXECUTE_IN_GHOST_SPACE</A></CODE>
directive instead. EXECUTE_IN_GHOST_SPACE will handle the TI-89 Titanium appropriately.
