| enter_ghost_space | Function (tigcc.a)

system.h

void enter_ghost_space (void);

Transfers the execution into the "ghost address space".

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 launcher FAQ entry for the only example where you should really use this function. You should not to know anything more about it.
However, be sure to call enter_ghost_space only from the `_main` 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 ASM_call or ROM calls.
Moreover, enter_ghost_space doesn't work on HW3 (the TI-89 Titanium).
Note: Because of these limitations, enter_ghost_space is deprecated. You can use the newer `EXECUTE_IN_GHOST_SPACE` directive instead. EXECUTE_IN_GHOST_SPACE will handle the TI-89 Titanium appropriately.