EasyManuals Logo
Home>Texas Instruments>Calculator>TI-83-Plus

Texas Instruments TI-83-Plus User Manual

Texas Instruments TI-83-Plus
188 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 #59 background imageLoading...
Page #59 background image
Chapter 2: TI-83 Plus Specific Information 49
TI-83 Plus Developer Guide Third Release May 28, 2002
Resizing AppVar, Program, and Equation Variables
These data types can be resized in place without having to make an additional copy of
the variable. Following are the two routines, with examples, used to increase the data
size and to decrease the data size.
Increasing the data size.
InsertMem Increases the size of an existing variable by inserting space at a given
address.
For example, insert 10 bytes at the beginning of an existing AppVar. If there is not
enough free RAM, the AppVar does not exist, or if the AppVar is archived, CA = 1 is
returned.
Insert_10:
LD HL,10 ; number bytes to insert
B_CALL EnoughMem ; check for free RAM
RET C ;retCA=1ifnot
;
LD HL,AppVarName
B_CALL Mov9ToOP1 ; OP1 = name of AppVar
B_CALL ChkFindSym ; DE = pointer to data if exists
RET C ; ret if not found
LD A,B ; archived status
ADD 0FFh ; if archived then CA = 1
RET C ; ret if archived
;
PUSH DE ; save pointer to size bytes of
; data
INC DE
INC DE ; move DE past size bytes
;
LD HL,10 ; number bytes to insert
B_CALL InsertMem ; insert the memory
POP HL ; HL = pointer to size bytes
PUSH HL ; save
;
B_CALL ldHLind ; HL = old size of AppVar,
; number bytes
LD BC,10
ADD HL,BC ; increase by 10, amount inserted
EX DE,HL ; DE = new size
POP HL ; pointer to size bytes location
LD (HL),E
INC HL
LD (HL),D ; write new size.
OR A ; CA = 0
RET
AppVarName:
DB AppVarObj,'AVAR',0
See the System Routine Documentation for details on InsertMem.

Table of Contents

Other manuals for Texas Instruments TI-83-Plus

Questions and Answers:

Question and Answer IconNeed help?

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

Texas Instruments TI-83-Plus Specifications

General IconGeneral
BrandTexas Instruments
ModelTI-83-Plus
CategoryCalculator
LanguageEnglish

Related product manuals