The Museum of HP Calculators


Pig for the HP-41C/CV/CX

This program is Copyright © HP and is used here by permission. It was originally printed in the HP-67 Games of Chance Solution Book. This program was ported to the HP-41C by reading with the HP-41C card reader and the card reader may be required for operation of this program. This program was entered and uploaded by Tony Duell.

This program is supplied without representation or warranty of any kind. Tony Duell, Hewlett Packard 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.

Documentation Information (CD or source code)
How to get this Program to your Calculator (via HP-IL, disk, wand, and fingers)
Download Binary (.raw) program for disk or PC HP-IL Card download
Download Hexadecimal (.dat) program for Serial Port download

Program Listing

LINE  KEYS
 01 LBL "PIG"
 02 LBL 19
 03 LBL e
 04 ABS
 05 INT
 06 X=0?
 07 GTO 09
 08 RCL 24
 09 7CLREG
 10 7P<>S
 11 7CLREG
 12 X<>Y
 13 23
 14 X<=Y?
 15 GTO 09
 16 RDN
 17 STO 23
 18 RDN
 19 FRC
 20 LBL 14
 21 LBL E
 22 7DSP0
 23 ABS
 24 2
 25 +
 26 LN
 27 2
 28 X<>Y
 29 X>Y?
 30 GTO 14
 31 RCL 24
 32 +
 33 STO 24
 34 FS?C 22
 35 GTO 14
 36 1
 37 RTN
 38 LBL 10
 39 LBL A
 40 STO 25
 41 1
 42 XEQ 12
 43 X=Y?
 44 GTO 01
 45 ST+ 00
 46 RCL IND 25
 47 7PRTX
 48 RCL 00
 49 +
 50 7PRTX
 51 RCL 25
 52 RTN
 53 LBL 11
 54 LBL B
 55 RCL 00
 56 ST+ IND 25
 57 LBL 01
 58 7DSP2
 59 RCL IND 25
 60 RCL 25
 61  E2
 62 /
 63 +
 64 7PRTX
 65 7DSP0
 66 CLX
 67 STO 00
 68 ADV
 69 ADV
 70 7ISZ
 71 RCL 23
 72 RCL 25
 73 X>Y?
 74 1
 75 RTN
 76 LBL 12
 77 LBL C
 78 RCL 24
 79 997
 80 *
 81 FRC
 82 X=0?
 83 XEQ 02
 84 STO 24
 85 6
 86 *
 87 INT
 88 1
 89 +
 90 7PRTX
 91 RTN
 92 LBL 02
 93 .5284163
 94 RTN
 95 STOP
 96 END

Go back to the HP-41 software library
Go back to the general software library
Go back to the main exhibit hall