Texas Instruments TI-89 Developer's Manual page 92

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

Advertisement

50
void vars(void)
/* Return on the estack a list of variables in current or given folder */
{
Access_AMS_Global_Variables;
BYTE folder[SYM_LEN+1];
BYTE tfolder[MAX_SYM_LEN];
BYTE *fname;
SYM_ENTRY *pSym;
EStackIndex e = top_estack;
/* Get folder name */
if (ESTACK(e) == END_TAG)
{
/* Use current folder */
FolderGetCur(folder);
fname = StrToTokN(folder, tfolder);
}
else
{
if (ESTACK(e) != STR_DATA_TAG)
fname = e-1;
}
push_quantum (END_TAG);
pSym = SymFindFirst(fname, FO_NONE);
while (pSym != NULL)
{
push_zstr((char *)pSym->Name);
pSym = SymFindNext();
}
push_quantum (LIST_TAG);
}
The extensions table has an entry for each extension function or program. The first field of
each entry is the string number of the name of the function. The second field is the string
number of the function's help message. The third entry is an index into the following
extEntries table. The entries in this table must be alphabetized by the function name.
Each entry in the extEntries table cross-references a function number from the
extensions table with the function's actual address. The C name of a function need not be
the same as its TI-BASIC name — a language localizer may, in fact, override the exported
name. The second field of each entry specifies whether the extension is a function
(APP_EXT_FUNCTION) which returns a value on the estack, or a program
(APP_EXT_PROGRAM) which does not return a value.
The OO_APP_TOK_NAME attribute specifies the short name of the application to use when
referencing its extension functions. In this example, TI-BASIC programs can call
memutil.folders() and memutil.vars().
The first initialized variable in your application must be a pointer to the app frame. Even
though extensions and extEntries appear to be allocated before MemutilFrame, they
are declared const and are not allocated with variables in the .data section. You cannot see it,
but memutilFrame is also declared const by the FRAME macro.
TI-89 / TI-92 Plus Developer Guide
ER_throw(ER_DOMAIN);
Not for Distribution
Chapter 7: Flash Application Layout
Beta Version January 26, 2001

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Ti-92 plusTi-92 plus

Table of Contents