Task

If your system has a means to generate random numbers involving not only a software algorithm   (like the /dev/urandom devices in Unix),   then:

show how to obtain a random 32-bit number from that mechanism.

Related task
 Random_number_generator_(included)


procedure main(A)
    n := integer(A[1])|5
    every !n do write(rand(4))
end
 
procedure rand(n)
    f := open("/dev/urandom") | stop("Cannot get to urandom!")
    x := 0
    every !n do x := x*256 + ord(reads(f,1))
    close(f)
    return x
end