Chapter 2: TI-83 Plus Specific Information 39
TI-83 Plus Developer Guide Third Release May 28, 2002
• Error checking is done to make sure that the data type being stored to the variable is
valid for that variable.
• If the variable being stored to is archived, a system error is generated.
• Since system errors can be generated by these routines, an error handler should be
placed around calls to them. See the Error Handlers section.
The details on inputs and outputs for these routines can be found in the System Routine
Documentation.
Note: The following example uses the routine PushRealO1. See the Floating Point Stack section for
details.
Example: Store a value of 1.5 to variable Z
return CA = 0 if successful
CA = 1 if failed to store
Sto_Z:
B_CALL OP1Set1 ; OP1 = 1
LD A,15h
LD (OP1+2),A ; OP1 = 1.5
;
B_CALL PushRealO1 ; 1.5 -> FPST
B_CALL ZeroOP1 ; OP1 = 00000000000
LD A,’Z’
LD (OP1+1),A ; OP1 = Z VAR NAME
;
AppOnErr Fail ; install error handler
;
B_CALL StoOther ; attempt to store, RET if no error
;
AppOffErr ; remove error handler
OR A ; CA = 0 for store is good
RET
Fail:
SCF ; CA = 1 for no store
RET
Recalling Variables
There are system routines that can be used to recall the contents of real and complex
variables to OP1/OP2.
RclVarSym RclY RclN RclX RclAns
Attributes of these routines include:
• If the variable does not exist or if it is archived, a system error is generated.
• If the variable is real, OP1 = the value.
• If the variable is complex, OP1 = real part; OP2 = imaginary part.
Note: Since system errors can be generated by these routines, an error handler should be placed
around calls to them.