[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Random Number Question
In article <Xns9A967FB84441Fnem@216.196.97.142>, nem <nem@nospam> wrote:
>Michael Black <et472@ncf.ca> wrote in news:
>
>> But since a white noise source isn't something you normally have on
>> hand
>
>I know on the C64 you could use the SID chip to get true random numbers,
>however Commodore BASIC generates pseudo-random numbers exactly like
>Applesoft BASIC.
The Apple II monitor though has a source for true random numbers, although
with only 16 bits of entropy. The source is a 16-bit counter which is
incremented each time the monitor input routine polls the keyboard for
a keypress. So you just let your program ask the monitor for a keypress
and then read these 16 bits whenever there is a keypress - it's next to
impossible for the operator to control the value of this 16-bit counter.
--
----------------------------------------------------------------
Paul Schlyter, Grev Turegatan 40, SE-114 38 Stockholm, SWEDEN
e-mail: pausch at stjarnhimlen dot se
WWW: http://stjarnhimlen.se/