Programming the RPN-25


A program is nothing more than a sequence of manual keystrokes that is remembered by the calculator. You can then execute the program as often as you like – typically with just one keystroke. The answer displayed at the end of execution is the same one you would have obtained by pressing the keys one at a time manually. No prior programming experience is necessary for RPN-25 calculator programming.

To get you started, try entering and executing the sample program shown on the Info screen of RPN-25 CE (tap the Info button or double-tap "Continuous Memory" at the bottom).


Entering and running a program







Reviewing your program






Debugging your program






Editing your program






Adding or removing steps will automatically adjust all affected GTO and GSB commands.
For example, if you enter GTO 10 after step 03 to branch to line 10, what gets stored is GTO 11, since the GTO instruction caused the rest of program memory to move down one line.
However, if the GTO's target lies in the unused program area past your last program step, no adjusting takes place.





Example program 1 – Sum of 1 to x




Example: Find the sum of all integers from 1 to 100.

Solution: Enter 100, tap R/S. Result: 5050




Example program 2 – Quadratic Equation





Find solutions to the three equations below:

1.  x² + x - 6 = 0
2.  2.25x² + 3x + 1 = 0
3.  2x² - 3x + 5 = 0

1.
6 CHS ENTER 1 ENTER R/S → 6.2500 (D > 0, so solutions are real)
After 2 seconds:
→ -3.0000 (x₁)
R/S
→ 2.0000 (x₂)


2.
1 ENTER 3 ENTER 2.25 R/S → 0.0000 (D = 0, so solutions are real and equal)
After 2 seconds:
→ -0.6667 (x₁)
R/S
→ 0.6667 (x₂)


3.
5 ENTER 3 CHS ENTER 2 R/S → -1.9375 (D < 0, so solutions are complex)
After 2 seconds:
→ 0.7500 (u)
R/S
→ 1.3919 (v)
x₁,x₂ = 0.7500 ± 1.3919 i






Indirect Addressing (STi, RCi)





Note that the indirection register R.9 may be incremented, decremented and tested by the loop control instructions DSE and ISG.





Using GTOs and GSBs correctly

When inserting or deleting program steps, RPN-25 automatically readjusts all affected GTO and GSB branch instructions. This huge time-saver is not entirely free of pitfalls.

Consider the following simple program that takes the square root of x.
If x is negative, 1 is added to its positive value first.
Negative values of x are handled in the subroutine starting at step 05.

Deleting CHS at step 05 causes the GSB in step 02 to address the preceding step 04 instead.

Restoring the deleted step doesn't change the target of the GSB – the program will not work anymore.

The cure:

Start the target of any GTO or GSB branch instruction with a NOP instruction.

Doing so will also allow you to easily insert an instruction before the
first target instruction.

Re-targeting the GSB to the original step 05 fixes the program.

RPN-25 identifies NOPs used as branch targets, renaming them to LBL nn (where nn is the step number) and assigning them their own keycode 98.

Deleting the GSB instruction transforms the LBL instruction back into an ordinary NOP.

To re-insert the GSB instruction after step 01, enter GSB 04 (not GSB 05, since step 04 is where the NOP is currently located.)

      Managing programs on RPN-25 CE
       
      Use the mode switch to select PRGM mode.
Tap the display to open the program listing.
Note that the current step is highlighted:
     
       
      Steps may be deleted by swiping left across the line:
     
       
      Tap Save to copy the changed program to the calculator.
To exit without changing the program, tap Cancel.

If you select a line before exiting, the line will be shown on the calculator display.
     

       
      Exporting a program
     
A program may be saved for later use or archiving purposes.







     
     
       
     
Importing a program
     
To import a program from the Documents folder:







Note:
An empty program saved with registers will only replace the registers, leaving the program memory untouched.
This feature may be used to create pure data files.
       
     
Deleting the current program
     
A. To delete the currently stored program and all metadata:




B. To delete the currently stored program, but keep title and description:

       
     
Deleting an exported program
     

 

 


Copyright © 2020. All rights reserved.