Post Reply 
(11C) Roll Two Dice at Random
12-29-2018, 07:30 PM
Post: #7
RE: (11C) Roll Two Dice at Random
(12-29-2018 09:09 AM)Dieter Wrote:  There is no need to use a second data register – both random numbers are kept on the stack. You may simply remove both the STO 2 and the RCL 2 commands.

There is no need to waste even a single data register.
It can all be done on the stack:

Code:
01 LBL A
02 GSB 1
03 1
04 0
05 %
06 GSB 1
07 +
08 X<>Y
09 LstX
10 +
11 10^x
12 x
13 SCI 1
14 RTN
15 LBL 1
16 RAN#
17 6
18 x
19 INT
20 1
21 +
22 RTN

Dieter
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
(11C) Roll Two Dice at Random - Gamo - 07-22-2018, 09:44 AM
RE: (11C) Roll Two Dice at Random - Gamo - 12-29-2018, 01:54 AM
RE: (11C) Roll Two Dice at Random - Dieter - 12-29-2018, 09:09 AM
RE: (11C) Roll Two Dice at Random - Dieter - 12-29-2018 07:30 PM
RE: (11C) Roll Two Dice at Random - Gamo - 12-29-2018, 12:58 PM



User(s) browsing this thread: 1 Guest(s)