Storing Data into Variables
3–5
File name 33s-E-Manual-1008-Publication(1st).doc Page : 386
Printed Date : 2003/10/8 Size : 13.7 x 21.2 cm
For example, suppose you want to reduce the value in A(15) by the number in the
X–register (3, displayed). Press
e
Ã
A. Now A = 12, while 3 is still in the
display.
A
15
A
12
Result: 15 3
that is,A x
T
t
T
t
Z
z
Z
z
Y
y
y
X
3
X
3
Recall Arithmetic
Recall arithmetic uses
h
Ù
,
h
Ã
,
h
¸
, or
h
¯
to do
arithmetic in the X–register using a recalled number and to leave the result in the
display. Only the X–register is affected.
New x = Previous x {+, –,
×
,
÷
} Variable
For example, suppose you want to divide the number in the X–register (3,
displayed) by the value in A(12). Press
h
¯
A. Now x = 0.25, while 12 is
still in A. Recall arithmetic saves memory in programs: using
h
Ù
A (one
instruction) uses half as much memory as
h
A,
Ù
(two instructions).
A
12
A
12
T
t
T
t
Z
z
Z
z
Y
y
y
X
3
X
0.25
Result: 3 12
that is, x 12
Example:
Suppose the variables D, E, and F contain the values 1, 2, and 3. Use storage
arithmetic to add 1 to each of those variables.