Section 3: The Memory Stack, LAST X, and Data Storage 33

Any number that is keyed in or results from the execution of a numeric function is placed into the display (X-register). This action will cause numbers already in the stack to lift, remain in the same register, or drop, depending upon both the immediately preceding and the current operation. Numbers in the stack are stored on a last-in, first-out basis. The three stacks drawn below illustrate the three types of stack movement. Assume x, y, z, and t represent any numbers which may be in the stack.

 

Stack Lift

 

 

 

 

No Stack Lift or Drop

 

 

 

lost

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

T

t

 

z

 

 

 

 

T

 

t

 

t

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Z

z

 

y

 

 

 

 

Z

 

z

 

z

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Y

y

 

x

 

 

 

 

Y

 

y

 

y

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

π

 

 

 

 

 

 

 

 

 

 

 

 

X

x

 

 

 

 

 

X

 

x

 

 

x

Keys:

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

$

 

 

 

 

 

 

 

 

 

¤

 

 

 

 

 

 

 

Stack Drop

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

T

t

 

 

 

 

t

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Z

z

 

 

 

 

t

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Y

y

 

 

 

 

z

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

X

x

 

 

 

 

x + y

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Keys:

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

+

 

 

 

 

 

 

 

 

Notice the number in the T-register remains there when the stack drops, allowing this number to be used repetitively as an arithmetic constant.

Stack Manipulation Functions

v. Pressing v separates two numbers keyed in one after the other. It does so by lifting the stack and copying the number in the display (X-register) into the Y-register. The next number entered then writes over the value in the X-register; there is no stack lift. The example below shows what happens as the stack is filled with the numbers 1, 2, 3, 4. (The