Post Reply 
(11C) Roll "Four" Dice at Random
10-13-2018, 10:21 AM (This post was last modified: 10-14-2018 03:43 AM by Gamo.)
Post: #2
RE: (11C) Roll "Four" Dice at Random
This version used [LBL] D to identify both the beginning of the program and
subroutine within the program.

So I adapted this program from the
"Subroutines Section" on Page 125 of the HP-11C Owner's Handbook.

In the handbook state that
*While it is generally best to avoid the use of identical labels to reduce
the possibility of confusion or programming error, the following program
illustrates one way identical labels might be used, if necessary.

Procedure: f [USER] FIX 0

[D] display face 1st Dice --> 2nd --> 3th --> 4th and display Total

Program: Roll 4 Dice at Random
Code:

LBL D
CLx
GSB D
GSB D
GSB D
-----------------------
LBL D
RAN#
6
x
1
+
INT
PSE
+
RTN

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


Messages In This Thread
(11C) Roll "Four" Dice at Random - Gamo - 10-13-2018, 03:32 AM
RE: (11C) Roll "Four" Dice at Random - Gamo - 10-13-2018 10:21 AM



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