The <flashapp.h> Header File

Routines, variables and structures related to FlashApps.

Functions

EV_quit
Switches from the current application to the Home application.
OO_GetEndOfAllFlashApps
Returns a pointer to the first word-aligned byte after the last FlashApp.
OO_GetFirstFlashAppSectorAddress
Fills given CFILE and returns a pointer to the first byte of the first sector reserved for FlashApps.
OO_GetFlashAppSize
Returns the size of a FlashApp given its task ID.

Predefined Types

CFILE
A structure representing the context of a memory-mapped file.

Note: this header is currently VERY incomplete.
On AMS 2.xx and 3.xx, FlashApps enable tighter integration to AMS than ASM programs enable: FlashApps can extend AMS, e.g. by exporting multiple TI-BASIC functions, and override various aspects of AMS (e.g. the language, or the font used by character drawing functions).

GCC4TI cannot currently generate FlashApps, but mixed mode operation with TIFS should be possible.


EV_quit

AMS 2.00 or higher

void EV_quit (void);

Switches from the current application to the Home application.


OO_GetEndOfAllFlashApps

AMS 2.00 or higher

unsigned char *OO_GetEndOfAllFlashApps(void);

Returns a pointer to the first word-aligned byte after the last FlashApp.

This function calls OO_GetFirstFlashAppSectorAddress, and then loops through the FlashApps, using the CFILE filled by OO_GetFirstFlashAppSectorAddress.
The first sector after the last sector reserved for FlashApps is the first archive memory sector.


OO_GetFirstFlashAppSectorAddress

AMS 2.00 or higher

unsigned char *OO_GetFirstFlashAppSectorAddress(CFILE *certfile);

Fills given CFILE and returns a pointer to the first byte of the first sector reserved for FlashApps.

After execution of this ROM_CALL, certfile contains the following information:

At least one 64 KB sector is reserved for FlashApps in the Flash Memory. The first such sector is the first sector after the end of the AMS code.

See also: EM_getArchiveMemoryBeginning, OO_GetEndOfAllFlashApps


OO_GetFlashAppSize

AMS 2.00 or higher

unsigned long OO_GetFlashAppSize(short TaskID);

Returns the size of a FlashApp given its task ID.

On AMS 2.xx, the task ID of a FlashApp can be retrieved with EV_getAppID.

See also: EV_getAppID


Return to the main index