|
|
DataMuseum.dkPresents historical artifacts from the history of: RC4000/8000/9000 |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about RC4000/8000/9000 Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - metrics - download
Length: 4608 (0x1200)
Types: TextFile
Names: »trana«
└─⟦00964e8f7⟧ Bits:30007478 RC8000 Dump tape fra HCØ.
└─⟦b2ec5d50f⟧
└─⟦09b4e9619⟧ »thcømat«
└─⟦this⟧
message rana
(rana=slang fpnames type.yes insertproc entry.no
rana ranr rani ranl rann)
; 17-7-74 ojh
; random number generator
b. g1,e5 w.
k=10000
s. g6,j40,a14,c4
h.
g0=0
e2:
g1: g3,g2
j13: g0+13,0 ; last used
j30: g0+30,0 ; saved sr,w3
j6: g0+6,0 ; end register expr
j8: g0+8,0 ; end address expr
j4: g0+4,0 ; take expr
j18: g0+18,0 ; zone alarm (index)
j29: g0+29,0 ; param alarm
j38: 0,1
j39: 0,3 ; rann
g2=k-2-g1, g3=g2 ; end of abs words, points
w.
e0: g0
4
0
2 ; rann=2
17 07 74, 16 30 00
e1:
rl. w2 (j13.) ; entry rana
ds. w3 (j30.)
dl w1 x2+8 ; take n
so w0 16
jl. w3 (j4.)
ds. w3 (j30.)
dl w1 x1
rl w3 x2+6
sz w3 1
cf w1 0 ; w1=n
sh w1 -1 ; if n<0 then
jl. w3 (j18.) ; alarm index n
rs. w1 a1.
rl w3 x2+10
la. w3 a3.
sn w3 16
al w3 19
sh w3 20 ; if second param
sh w3 16 ; is not an array then
jl. w3 (j29.) ; alarm param
la. w3 a4. ; w3= array kind (0,1,2,3)
al w0 x3
as w0 3 ; w0= array kind*8
wa. w0 a4. ; w0=w0+3
hs. w0 a13. ; store jump to convertion in a13
sn w3 0
al w3 3
al w0 1
ld w1 x3-1 ; w0=K, w1=n*K (K=bytes/array element)
rs. w0 a5.
rl w3 x2+12
rl w0 x3 ; w0=baseword
ba w3 x2+10 ; w3=addr of dopevector
wa w0 x3 ; w0=addr of first element-K
rs. w0 a0.
wa w1 x3
ws w1 x3-2
sl w1 1 ; if not n elements in array then
jl. w3 a2. ; alarm index n
a9: dl. w3 a0.
aa. w3 a5.
sh w2 -1
jl. (j8.)
ds. w3 a0.
a8: rl. w1 (j39.) ; entry random number generator
ls w1 -1
al w3 x1
wm. w1 c3.
aa. w1 c4.
ld w1 1
rs. w1 (j39.)
wm. w3 c2.
wa w0 6
rl. w3 c3.
wm. w3 (j38.)
bz w3 7
wa w0 6
hs. w0 (j38.)
bz w0 1
a13=k+1
jl.
ld w1 -1 ; store long array
ds. w1 (a0.)
jl. a9.
a4: 3 ; mask and 3
hs. w0 (a0.) ; store boolean array
jl. a9.
a1: 0 ; number of elements to be filled
a0: 0 ; addr of current array element
ld w1 -12 ; store integer array
rs. w1 (a0.)
jl. a9.
a3: 511 ; mask
ld w1 11 ; store real array
nd w1 3
ds. w1 (a0.)
jl. a9.
a10: ld w1 11 ; ranr exit
nd w1 3
jl. (j6.)
a11: ld w1 -12 ; rani exit
jl. (j6.)
a12: ld w1 -1 ; ranl exit
jl. (j6.)
a2: rl. w1 a1. ; index alarm exit
jl. (j18.)
e3: am a12-a11 ; entry ranl
e4: am a11-a10 ; entry rani
e5: al w1 a10-a13+1 ; entry ranr
rl. w2 (j13.)
ds. w3 (j30.)
hs. w1 a13. ; store jump to correct exit
jl. a8. ; goto generator
a6: -1
a5: 0 ; bytes/array element
c2=k+1
8.7065 ; multiplier for
c3: 8.37244615 ; random number generator
0
c4: 1 ; adder for random number generator
h. 0,r.(:10504-k:)
w. <:rana <0>:>
e.
;rana
g0: 1
0,0,0,0
1<23+e1-e2
1<18+41<12+13<6+0 ; procedure rana(n,A);
0 ; value n; integer n; any type array A;
4<12+e0-e2
1<12+4
;ranr
1<23+4
0,0,0,0
1<23+e5-e2
4<18+0 ; real procedure ranr;
0
4<12+e0-e2
1<12+4
;rani
1<23+4
0,0,0,0
1<23+e4-e2
3<18+0,0 ; integer procedure rani;
4<12+e0-e2
1<12+4
;ranl
1<23+4
0,0,0,0
1<23+e3-e2
5<18+0,0 ; long procedure ranl;
4<12+e0-e2
1<12+4
;rann
g1: 1<23+4
0,0,0,0
3
11<18+0,0 ; own long rann;
4<12+0
1<12+4
n.
▶EOF◀