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 #117 background imageLoading...
Page #117 background image
Chapter 8: Integrating a Flash Application
75
TI
-
89 / TI
-
92 Plus Developer Guide
Not for Distribution
Beta Version January 26, 2001
F-Lines can also be used to convert long calls or jumps to relative jumps or calls
which reduces the app's relocation table and hence the app’s size. See section
7.1 File Format
for a description of the relocation table.
8.6. Optimizing Code Space
One of the optimizations involves reducing the apps relocation table. All
references to an app’s global variables made by an app require a relocation entry
to be stored with the app. If there are multiple references to a particular global
variable in an app, the global references can be replaced with local pointers as
shown in the example below.
static WINDOW appW;
static WIN_RECT appWRect;
void AP_EventHandler(pFrame self, PEvent e) {
WINDOW *winPtr = &appW;
switch (e->command) {
case CM_START:
appWRect = *(e->info.startInfo.startRect);
if (WinOpen( winPtr, &appWRect, WF_TTY | WF_DUP_SCR))
WinClr( winPtr );
else
EV_quit();
break;
case CM_ACTIVATE:
EV_defaultHandler(e);
WinBeginPaint( winPtr );
WinActivate( winPtr );
WinStr( winPtr, "Just activated\n" );
break;
.
.
.
}
}
In the preceding example, since there were several references to the global
variable
appW
the pointer winPtr was initialized to the address of
appW
at the
entry point to the
AP_EventHandler
routine and used instead of &appW. Since
there was only one additional reference to
appWRect
an additional pointer to
access that global was not created.

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