Trailing-Edge
-
PDP-10 Archives
-
decus_20tap5_198111
-
decus/20-0150/tstrng.sim
There is 1 other file named tstrng.sim in the archive. Click here to see a list.
00100 !SIMULA PROGRAM TSTRNG;
00200 ! TO VERIFY MACRO SUBROUTINE TAUS;
00300 ! THE TAUSWORTHE SEQUENCE IS CALCULATED ONE BIT
00400 AT A TIME BY THE RECURRENCE:
00500 W(P+I) = W(P+I-Q1) +W(P+I-Q2) + ... + W(P+I-Q6), MODULO 2;
00600 BEGIN
00700 INTEGER ARRAY w[0:241], q[1:10];
00800 INTEGER b,i,j,k,n,Line, nq, wp;
00900 INTEGER p, p1, Digit;
01000 q[1]:=19; q[2]:=73; q[3]:=107; q[4]:=139;
01100 q[5]:=193; p:=q[6]:=241;
01200 nq := 6; p1 := p-1;
01300 FOR i:= 0 STEP 1 UNTIL p1 DO w[i]:=0;
01400 w[p1]:=1;
01500 FOR Line := 1 STEP 1 UNTIL 4 DO BEGIN
01600 FOR j:= 1 STEP 1 UNTIL 7 DO BEGIN
01700 FOR i:=1 STEP 1 UNTIL 36 DO BEGIN
01800 wp:=0;
01900 FOR k:= 1 STEP 1 UNTIL nq DO
02000 wp:= wp + w[p-q[k]];
02100 w[p] := Mod(wp,2);
02200 !PUSH DOWN THE STACK ONE BIT;
02300 FOR b:= 1 STEP 1 UNTIL p DO
02400 w[b-1] := w[b];
02500 END I-LOOP;
02600 !OUTPUT 36 BIT WORD IN OCTAL;
02700 FOR i:=35 STEP -3 UNTIL 0 DO BEGIN
02800 Digit :=w[p1-i]*4 + w[p-i]*2 + w[p-i+1];
02900 Outint(Digit,1);
03000 END I-LOOP; Outchar(' ');
03100 END J-LOOP;
03200 Outimage;
03300 END LINE-LOOP;
03400 END