The Museum of HP Calculators


Digital Dice for the HP-42S

This program is Copyright © 2003 by Juergen Keller and is used here by permission.

This program is supplied without representation or warranty of any kind. Juergen Keller 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.

Introduction

Your children want to play a game with you. But the game needs a dice, and you can't find any! Don't worry, the following small program may save the day (provided that you know where your HP-42S is).

Instructions

  1. Type in the program below
  2. XEQ "DICE" for the first throw
  3. R/S to roll the dice again

Program Listing

{ 152-Byte Prgm }
01 § LBL "DICE"
02   "xxxxxx"           ; hex 01 01 01 01 01 01
03   ASTO 01
04   "@@@@@@"
05   ASTO 02
06 § LBL 00             ; roll the dice
07   RAN
08   6
09   x
10   IP
11   1
12   +
13   CLLCD
14   XEQ IND ST X       ; draw face
15   CLA                ; draw contour
16   254
17   XTOA
18   ARCL 01
19   ARCL 01
20   ARCL 01
21   XTOA
22   1
23   ENTER
24   AGRAPH
25   "?"
26   ARCL 02
27   ARCL 02
28   ARCL 02
29   ⊢"?"
30   9
31   X⇔Y
32   AGRAPH
33   STOP
34   GTO 00
35 § LBL 01             ; draw face 1
36   7
37   9
38   GTO 07
39 § LBL 03             ; draw face 3
40   XEQ 01
41 § LBL 02             ; draw face 2
42   3
43   4
44   XEQ 07
44   11
45   14
46   GTO 07
48 § LBL 05             ; draw face 5
49   XEQ 01
50 § LBL 04             ; draw face 4
51   3
52   14
53   XEQ 07
54   11
55   4
56   XEQ 07
57   GTO 02
58 § LBL 06             ; draw face 6
59   XEQ 04
60   7
61   4
62   XEQ 07
63   X⇔Y
64   14
65 § LBL 07             ; draw a point
66   "√ππ√"             ; hex 02 07 07 02
67   AGRAPH
68   END

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