EasyManuals Logo
Home>Texas Instruments>Calculator>TI-89

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 #349 background imageLoading...
Page #349 background image
Appendix A: System Routines — Apps
307
TI
-
89 / TI
-
92 Plus Developer Guide
Not for Distribution
Beta Version January 26, 2001
OO_appSetPublicStorage
Declaration:
void
OO_appSetPublicStorage
(ULONG
ps
)
Category(ies):
Apps
Description:
Save a value in the running app’s public storage.
The application control block of each app has a place to store user data.
This public storage is large enough to contain a 32-bit value, typically a
memory handle, but can be a pointer or integer.
Garbage collecting Flash memory may involve moving an app. When this
happens, the app is reinitialized after it is moved to its new location.
Consequently, the contents of the app’s data segment (static and global
variables) are reset to their initial values. Public storage is a convenient
place to save data which is preserved through app reinitialization.
Inputs:
ps
Value to save in the app’s public storage.
Outputs:
None
Assumptions:
This routine assumes you want to store user data in the application control
block indicated by the app ID in OS global variable
EV_runningApp
. This
may not be the case with TI
-
BASIC extension functions and shared-code
libraries. These types of routines are often called as subroutines from other
applications, in which case
EV_runningApp
contains not the ID of your
app, but the ID of the calling application. This is an instance when your
routines should not modify the calling app’s public storage.
Side Effects:
None
Availability:
On AMS 2.00 and higher
TI
-
89 / TI
-
92 Plus
Differences:
None
See Also: OO_appGetPublicStorage
Example:
This example illustrates how to save your global variables during Flash
memory garbage collection. The idea is to group all your global variables
into a single structure. Then when it is time to garbage collect, it is easy to
allocate a block of memory from the heap large enough to hold your
globals, and store the memory block’s handle in public storage.
(continued)

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