The Museum of HP Calculators


Russian Roulette for the HP25

This program was written by Walter Gray and is used here by permission.

This program is supplied without representation or warranty of any kind. The author and The Museum of HP Calculators therefore assume no responsibility and shall have no liability, consequential or otherwise, of any kind arising from the use of this program material or any part thereof.

Overview

This game is for two players. One player spins the cylinder. They then take turns pulling the trigger. A six-shot revolver is assumed.

Instructions

Step

Instructions

Input Data/Units

Keys

Output Data/Units

1

Enter program

     

2

Input random number seed between 0 and 1 and initialize

seed

STO 0 f PRGM 

 

3

Spin cylinder

 

R/S

0.00

4

Pull trigger

 

R/S

 
     If you are not shot

 

 

0.00
     If you are shot

 

 

1.00

5

Repeat4 until display shows 1.00

 

 

 

The Program

LINE  KEYS
 00
 01  RCL 0
 02  g pi
 03  +
 04  6
 05  f yx       
 06  g FRAC
 07  STO 0
 08  4
 09  x
 10  f INT

 11  RCL 1
 12  g x!=0  
 13  GTO 19
 14  roll dn
 15  1
 16  +
 17  STO 1
 18  GTO 01
 19  STO - 1
 20  +

 21  7
 22  f x=y
 23  GTO 01
 24  roll dn
 25  STO 2
 26  cl x
 27  R/S          displ 0 means you are still alive :)
 28  1
 29  STO - 2
 30  RCL 2

 31  g x=0
 32  GTO 36
 33  f x=y
 34  GTO 00       displ 1 means you lose :(
 35  GTO 26
 36  6
 37  STO 2
 38  GTO 26

Go back to the software library
Go back to the main exhibit hall