Down East Engineering: the art of science
Down East Engineering: the art of science
A New England Heritage Company
Down East Engineering: the art of science

Trapped for the HP-25/25C

The program presented below will play a game called "Trapped" for the HP-25 and HP-25C. It was written by Rich Messeder and appeared in PPC Journal V5N6P25 (July 1978). It's basically a high-low type of game, but it's small enough that you might even key it into an HP-25 without continuous memory.

Instructions:
  1. Load the program into the calculator and change back to RUN mode.
  2. Store the initial decimal seed into memory 0 (type STO 0).
  3. Press f PRGM (this resets the program pointer to the start of the program memory).
  4. Press R/S to start. Display shows 0.1000 as the starting boundaries.
  5. Enter your guess for the number and press R/S.
  6. The display now shows the new upper and lower boundaries depending on whether your guess was too high or too low.
  7. Continue playing until you correctly guess the secret number. When you do, the secret number will be flashed and your score (the number of guesses you took) will be left flashing in the display.
  8. For a new game, go to step 3.
Program Listing:
      Line  Instruction  Keycode(s)
      01    f FIX 4      14 11 04
      02    RCL 0        24 00
      03    9            09
      04    9            09
      05    7            07
      06    *            61
      07    g FRAC       15 01
      08    STO 0        23 00
      09    EEX          33
      10    3            03
      11    STO 5        23 05
      12    1            01
      13    STO 4        23 04
      14    STO 6        23 06
      15    -            41
      16    *            61
      17    f INT        14 01
      18    STO + 6      23 51 06
      19    f STK        14 34
      20    SIGMA+       25
      21    RCL 4        24 04
      22    RCL 5        24 05
      23    EEX          33
      24    4            04
      25    /            71
      26    +            51
      27    R/S          74
      28    STO 7        23 07
      29    f X < Y      14 41
      30    GTO 43       13 43
      31    RCL 5        24 05
      32    f X < Y      14 41
      33    GTO 43       13 43
      34    RCL 6        24 06
      35    RCL 7        24 07
      36    f X = Y      14 71
      37    GTO 46       13 46
      38    f X < Y      14 41
      39    STO 4        23 04
      40    f X > = Y    14 51
      41    STO 5        23 05
      42    GTO 20       13 20
      43    CHS          39
      44    f SQRT       14 02
      45    GTO 20       13 20
      46    f FIX 0      14 11 00
      47    f PSE        14 74
      48    RCL 3        24 03
      49    ST0 - 3      23 41 03