Texas Instruments TI-89 Tip List page 409

Graphing calculator
Hide thumbs Also See for TI-89:
Table of Contents

Advertisement

/* Recommended that you maintain the same order as above */
APP_EXT_ENTRY const extEntries[] =
{
{<extensionroutine1>,
{<extensionroutine2>,
};
FRAME(tibasicextFrame, OO_SYSTEM_FRAME, 0, OO_APP_FLAGS, FRAME_LENGTH)
ATTR(OO_APP_FLAGS, APP_NONE)
ATTR(OO_APP_NAME, "My Flash App")
ATTR(OO_APP_TOK_NAME, "MyApp")
ATTR(OO_APP_EXT_COUNT, NUMBER_OF_EXTENSIONS)
functions
*/
ATTR(OO_APP_EXTENSIONS, extensions)
extensions table */
ATTR(OO_APP_EXT_ENTRIES, extEntries)
table
*/
ATTR(OO_APPSTRING+<EXTENSION1>_OFFSET, "MyExt1")
*/
ATTR(OO_APPSTRING+<EXTENSION2>_OFFSET, "MyExt2")
*/
description follows:
ATTR(OO_APPSTRING+HELP_OFFSET+<EXTENSION1>_OFFSET, "Help for MyApp.MyExt1")
ATTR(OO_APPSTRING+HELP_OFFSET+<EXTENSION2>_OFFSET, "Help for MyApp.MyExt2")
ENDFRAME
/* Frame pointer required as the first static value in app */
pFrame TIBasicExtensionFrame = (pFrame)&tibasicextFrame;
//Some defines that might be useful if you are used to TIGCC
#define GetArgType(p) (*(unsigned char*)(p))
#define malloc(sz)
#define calloc(NoOfItems,SizeOfItems)
#define HeapFreePtr(vr) HeapFree(HeapPtrToHandle(vr))
//This is how you use ROM calls directly.
//The number (291) after "tiamsapi_" is the ROM call number in decimal.
//For some ROM calls that don't have corresponding functions in the SDK,
//you can find the ROM call number (in hex) and the parameters from the
//TIGCC documentation.
void tiamsapi_291(BN*, const BN*, const BN*, const BN*);
#define BN_powerMod tiamsapi_291
void <extensionroutine1>(void)
{
void subroutine1(EStackIndex, float, float*, float);
EStackIndex argptr;
Access_AMS_Global_Variables;
argptr = top_estack;
...
push_Float(res);
return;
}
void subroutine1(EStackIndex ptr, float x, float* y, float z)
{
float subroutine2(float);
...
return;
//Returns result through pointer
}
float subroutine2(float x)
{
...
return result;
APP_EXT_FUNCTION},
APP_EXT_FUNCTION}
*/
HeapDeref(HeapAllocHigh(sz))
malloc(NoOfItems*SizeOfItems)
//Can push other types too; this is just an example.
/* export extension
/* address of
/* address of ext entries
/* TIOS function names
/* TIOS function names
/* Catalog
10 - 3

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Ti-92+

Table of Contents