11-08-2018, 06:34 AM
This is another implementation from my previous post on HP-11C but this one
use different RANDOM algorithm.
Here is the program to Roll Two Dice at Random.
Procedure: Assign [Rv] to run program
First start must create SEED on Register 09 [STO 09]
SEED STO 09
[Rv] x.x // Integer Part is 1st Dice and Fractional Part is 2nd Dice
-----------------------------------
Example:
I put 0.1234 as a SEED on Register 09
.1234 STO 09
[Rv] 5.4 // 5 and 4
[Rv] 1.2 // 1 and 2
[Rv] 5.6 // 5 and 6
----------------------------------
Program:
Assign Key to run program:
ASN ALPHA 2DICE ALPHA [Rv]
--------------------------------------
Gamo
use different RANDOM algorithm.
Here is the program to Roll Two Dice at Random.
Procedure: Assign [Rv] to run program
First start must create SEED on Register 09 [STO 09]
SEED STO 09
[Rv] x.x // Integer Part is 1st Dice and Fractional Part is 2nd Dice
-----------------------------------
Example:
I put 0.1234 as a SEED on Register 09
.1234 STO 09
[Rv] 5.4 // 5 and 4
[Rv] 1.2 // 1 and 2
[Rv] 5.6 // 5 and 6
----------------------------------
Program:
Code:
LBL 2DICE
XEQ 01
STO 00
XEQ 01
STO 01
10
/
XEQ FRC
STO 02
FIX 1
RCL 00
RCL 02
+
RTN
---------------
LBL 01
RCL 09
LN
E2
x
1
XEQ MOD
STO 09
6
x
1
+
XEQ INT
RTN
Assign Key to run program:
ASN ALPHA 2DICE ALPHA [Rv]
--------------------------------------
Gamo