Home

Hewlett Packard

HighLow Game
MasterMind Game
Memory Allocation

Caving Program
Calculator Museum
Calculator Reference

HP-15C HighLow Game

This HP-15C HighLow Game lets you play 4 rounds of HighLow against the computer. The computer will generate a number between 0 and 999. You have to guess the number. The computer will tell you if your guess is higher or lower than the actual number. After you guess the correct number, you get to enter a number for the computer to guess. I usually give it the same number it gave me, but you can enter any number between 0 and 999.

    19 38 57 76 95
1 f  LBL . 1 R/S STO + 1 2 RCL 1 f  REG
2 g CF 9 1 x~y ÷ STO + 5 .
3 f  FIX 0 STO + 1 RCL 8 RCL 2 g SF 1 0
4 f  RAN # x~y x~y + f  LBL . 8 0
5 EEX RCL 0 g TEST 7 g INT RCL 4 4
6 3 x~y GTO . 5 GTO . 4 ÷ 0
7 STO 3 g TEST 7 g TEST 8 f  LBL . 6 + 1
8 STO 4 GTO . 2 GTO . 6 STO 2 f  FIX 3 STO 7
9 X g TEST 5 RCL 1 ENTER g SF 9 GTO . 1
10 g INT GTO . 7 STO + 6 ENTER g RTN  
11 STO 0 CHS GSB . 8 RCL 3 f  LBL . 9  
12 0 GTO . 2 g CF 1 x~y RCL 5  
13 STO 1 f  LBL . 3 f  ISG 7 - RCL 6  
14 STO 2 R/S g RTN 2 RCL 4  
15 g F? 1 STO 8 GTO . 9 ÷ ÷  
16 1 RCL 0 f  LBL . 5 + +  
17 g F? 1 f  LBL . 4 STO 3 g INT R/S  
18 GTO . 3 f  PSE RCL 2 GTO . 4 f  LBL A  
19 f  LBL . 2 1 - f  LBL . 7 g CF 1  

User Instructions

Press f  A to start. The initial display is 0. It's your turn. Enter a number between 0 and 999, inclusive. Press R/S. The program will run and return one of three displays.

Guess is too Low
Computer displays -NNN where NNN = your guess

Guess is too High
Computer displays NNN where NNN = your guess

Guess is Correct
Computer displays NNN.XXX (flashing) where
NNN = the correct HighLow number and
XXX = the number of guesses

If your guess is not correct then it is too high or too low. Enter a new guess and press R/S. Continue guessing until you get the correct flashing result.

Press R/S. The display is 1. It's now the computer's turn. Enter a number between 0 and 999, inclusive and press R/S. You can watch the computer attempt to guess your number. When it is finished it will display NNN.XXX (flashing) as described above.

Press R/S and the display is 0. It's your turn again. Guess the new number between 0 and 999, inclusive. Press R/S. Read the display to see if your guess is too high or low. Continue guessing until the flashing result is displayed

Press R/S and the display is 1 - the computer's turn again. Enter a number for the computer to guess and press R/S. When the computer finishes guessing, press R/S for your turn.

Continue for 4 rounds (this number can be adjusted at program instruction 100) and the computer will display the final results.

Final Results
Computer displays AAA.BBB (flashing) where
AAA = total number of player guesses and
BBB = total number of computer guesses

 


fatpat Software · PO Box 1785 · Charlottesville, VA 22902 · (804) 977-1652