EasyManuals Logo

Texas Instruments TI-89 Developer's Guide

Texas Instruments TI-89
1398 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #233 background imageLoading...
Page #233 background image
Chapter 17: Graphing
191
TI
-
89 / TI
-
92 Plus Developer Guide
Not for Distribution
Beta Version January 26, 2001
There is always an active graph, even when the Graph application is not
displayed. This allows access to the graph system variables and settings from
the Home screen or any other application. The graph system functions are stored
in the symbol table and appear on the VAR-LINK screen in the MAIN folder. All
other data needed by the active Graph application is stored in a GR_WIN_VARS
structure that is pointed to by the global variable
gr_active
. This struct also
contains pointers to the current Window variables, which are kept in system
memory, not part of the symbol table. The system routine
VarStore
must be
used to store to the graph system variables. This insures that the values are valid
and all necessary system flags will be set when appropriate. The following code
sample demonstrates how to define a graph function from an app or ASM and
shows an example of storing to the Window variables:
EStackIndex volatile old_top = top_estack;
EStackIndex name;
UCHAR buf[25];
TRY
/* buf = "Define y1(x)=x" */
memset(buf, 0, 25);
strcat((char *) buf, (const char *) XR_stringPtr(XR_DefineB));
strcat((char *) buf, (const char *) "y1(x)=x" );
/* Execute buf to define graph function y1(x) */
push_quantum( END_OF_SEGMENT_TAG );
push_parse_text( buf );
push_simplify_statements( top_estack );
/* store -10 to xmin */
push_parse_text( (UCHAR *) XR_stringPtr(XR_XMIN_STR));
name = top_estack;
push_Float( -10.0 );
VarStore( (BYTE *)name, STOF_ESI, 0, top_estack );
/* OK to access system variables directly, but not store. */
if((gr_active->rngp)[GR_XMAX] < 0.0 )
{ /* if xmax is negative, make it 10.0 instead */
push_parse_text( (UCHAR *) XR_stringPtr(XR_XMAX_STR));
name = top_estack;
push_Float( 10.0 );
VarStore( (BYTE *)name, STOF_ESI, 0, top_estack ); /* xmax=10 */
}
top_estack = old_top; /* restore top_estack */
ONERR
top_estack = old_top; /* restore top_estack */
PASS;
ENDTRY

Table of Contents

Other manuals for Texas Instruments TI-89

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Texas Instruments TI-89 and is the answer not in the manual?

Texas Instruments TI-89 Specifications

General IconGeneral
Display size (HxV)100 x 160 mm
Memory type639K FLASH ROM, 188K bytes RAM
Compatible operating systemsOperating System 2.09
Battery typeAAA

Related product manuals