Creating Variables - Texas Instruments TI-83 Plus Manual

Third release
Hide thumbs Also See for TI-83 Plus:
Table of Contents

Advertisement

36
Example: Search for list L1 and set DE = to the number of elements in the list.
Assume it is not archived.
;
;
.
.
.
L1Name:
A pointer to the variable's Symbol Table entry.
The HL register = address of the variable's Symbol Table entry.
This is returned for both archived and unarchived variables. The Symbol Table
entries for all variables reside in RAM.

Creating Variables

There are two ways that variables can be created.
Use system routines that create them directly.
Use system routines that store a value to a variable, creating that variable if it does
not already exist.
This section addresses the first method, and the following section deals with the second
method.
Variables can only be created in RAM. Once created, they can be archived to the
Flash ROM.
A variable that already exists, even if archived, should not be recreated without first
deleting the current one. See Deleting Variables section below.
Routines that create variables do not check to see if a variable currently exists
before creating it. An application must check by searching the Symbol Table for the
variable. See routines FindSym and ChkFindSym. If this is not done, multiple
versions of the same variable exist leading to unpredictable side effects.
The graphing equations always exist, and therefore must be deleted before
recreating them. Always create the equation immediately after deleting it to avoid
system crashes.
Do not create variables with sizes outside of their specified limits. For example, do
not create a list with 1000 elements. The system does not check for these types of
errors when creating a variable.
TI-83 Plus Developer Guide
LD
HL,L1Name
B_CALL
Mov9ToOP1
B_CALL
FindSym
JR
C,NotFound
EX
DE,HL
LD
E,(HL)
INC
HL
LD
D,(HL)
DB
ListObj, tVarLst, tL1, 0
Chapter 2: TI-83 Plus Specific Information
; OP1 = list L1 name
; look up list variable in OP1
; jump if it is not created
; HL = pointer to data structure
; get the LSB of the number elements
; move to MSB
; DE = number elements in L1
Third Release May 28, 2002

Advertisement

Table of Contents
loading

Table of Contents