Stack commands: DUP, SWAP and DROP
Copy, reorder and remove items on the Power 48 stack.
The stack is a pile of numbered levels, with level 1 at the bottom. Three commands do most of the housekeeping. SWAP exchanges levels 1 and 2. DUP makes a second copy of level 1. DROP removes level 1.
Programs lean on these a lot. For example, DUP followed by multiplication squares a number.
RPN Power 48
Start on the main screen: Press ON to cancel what you are typing, then use the stack view. Open the MODE or VAR menu any time; the stack is always shown above the menu row.
Put 3 and 4 on the stack: 3, ENTER, 4, ENTER. Level 1 is 4 and level 2 is 3.
3ENTER4ENTERPress the right shift key, then 0 (SWAP). The two numbers change places: level 1 is now 3.
▶SWAP0Type DUP with the alpha lock: press alpha twice, then F4, the plus-minus key and the square-root key. Press alpha once to unlock, then ENTER. Level 1 is copied.
ααF4+/−√xαENTERMultiply the two copies. 3 times 3 is 9, and the 4 is still waiting at level 2.
×Press the left-arrow key (←). With nothing typed it works as DROP and removes the 9.
←
You should see1: 4
Stop after the multiply step if you want to see the 9 with the 4 above it.
Tips
- Typed commands need ENTER. Keys that already carry a command name (like +) run immediately.
- Other handy ones to type: OVER copies level 2 to the top, ROT cycles the top three levels.