|
|
|
To change the result, .nnnn, back to the input form, nnnn. or nn.nn:
|
|
|
|
|
.nnnn to nnnn.
|
|
.nnnn to nn.nn
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Truncate the square to extract a new root of the form .nnnn using:
|
|
|
|
|
|
|
|
So that you can remember which form to input, you may wish to label the program
with three labels, one for each form, like this:
LBL NN/NN,
LBL /NNNN, and
LBL NNNN/. When you input a seed of the form nn.nn, you execute
program NN/NN. Likewise, when you input a seed of the form .nnnn of nnnn, you execute
program /NNNN of NNNN/. Use the / character in the names, not a period. Periods are
not legal in ALPHA program labels.
|
|
|
|
When you key in a four-digit seed in one of the three formats and execute the
associated program, an address (1, 2, or 3) is placed in the
R00 register. This address is used by a
GTO g 00 (to to
indirect R00) to transfer program execution to the
proper routine so that the new random number is seen in the same form as the
original seed.
|
|
|
|
Run the program for seeds of 1191, 11.91, and .1191. The program generates a random
number in the same form as the seed you keyed in. To use the random number as a new
seed, continue executing the associated program.
|
|
|
2.
|
Modify the random number generator program you wrote above to use
XEQ indirect instead of GTO
indirect by control. Run the program with the same seed numbers as above to
ensure that it still runs correctly.
|
|