6
H ~>F >~,Z
Z(10)
d6 33,22,0,126,7,174,15,35,52,134,167,234,16,0,52,43
n+ 119,79,6,0,201,17,0,0,0,0,0,0,0,0,0,42
x7 64,0,124,254,160,32,2,38,128,237,95,79,58,66,0,134
6 129,95,22,0,25,50,66,0,34,64,0,6,0,79,201,0,128,0
J = 1 66
K
J,K
J
% \;" RANDOM NUMBER DEMONSTRATION"
% \;" By Harry Purvis............"
0 \;" There are TWO random number generators"
+ \;" 1. A Pseudorandom byte generator."
+ \;" 2. A Truly Random Byte generator."
- \;" You can investigate their behaviour"
- \;" using this program................."
) \;" First select Generator 1 or 2 ";
G
G < 1 G > 2 260
" G = 2 G = 32
,
64 \\" Do you wish to RESET the Generator (Y/N) ";
@ A1$
J A1$ = "Y" A1$ = "y" 360
T A1$ = "N" A1$ = "n" 370
^ 300
h% G = 1 22,17: 23,0 66,0
r1 \\;" Please choose one of the Following... "
|0 " 1. Generate and print 10 random numbers."
1 " 2. Generate and print 100 Random Numbers."
+ " 3. Carry out fixed randomness test."
. " 4. Carry out variable randomness test."
* " Please type the selected number ";T
T < 1 T > 4 370
T = 1 1000
T = 2 2000
T = 3 3000
T = 4 4000
180
J = 1 10
[I4 (G)];
J
" AGAIN (Y/N) ";A1$
! A1$ = "Y" A1$ = "y" 1010
$ A1$ <> "R" A1$ <> "r"
.& G = 1 22,17: 23,0 66,0
8 1010
K = 1 10
J = 1 10
[I4 (G)];
J
K
" AGAIN (Y/N) ";A1$
! A1$ = "Y" A1$ = "y" 2010
*
J = 1 10
[I3 J]: Z(J) = 5
J
J = 1 400
K = ((G)*10)/256 + 1
Z(K),K: "*";
Z(K) = Z(K) + 1
J
, 4,15: "PRESS RETURN TO CONTINUE ";A1$
J = 1 10
[I3 J]: Z(J) = 5
J
) 4,14: "MULTIPLICATION FACTOR = ";M
) 4,14: "DIVISION FACTOR = ";D
, 4,14: "NUMBER OF RANDOM NUMBERS = ";O
K > 10 K = 10
J = 1 O
K = (G) * M / D + 1
Z(K),K: "*";
Z(K) = Z(K) + 1
J
0 4,15: "PRESS RETURN KEY TO CONTINUE ";A1$
"
";[I4 E];" * 256 + ";[I4 A];" = ";[I8 E*256+A];
B=