🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.mac
Article #12990

Re: Random number Generator wanted.

#12990
From: Alexander M. Rosenberg
Date: Fri, 06 Jul 1990 00:35
31 lines
2034 bytes
In article <8999@goofy.Apple.COM> alexr@ucscb.ucsc.edu (Alexander M. 
Rosenberg) writes:
> Apple's random number generator uses the tick count as a seed upon each 
> InitGraf (I may be wrong here, but I'm sure that it is time derived.) I 
do 
> know that the mouse driver has always kept track of the time at which a 
> click occurs, and takes the difference in time between that click and 
the 
> previous one, and adds this number to the current randSeed. This is 
where 
> an additional level of randomness is provided. (Humans tend to be more 
> "random" than computers do, eh?)

<SNIVELING WIMP MODE ON>
Just to protect my sanity, I checked. The standard ADB mouse driver does 
the aforementioned random seed changes, to a low memory global, RndSeed 
($156).

InitGraf does use 1 as a seed. (a silly seed). Under Random, they suggest 
using RndSeed (the low-memory global) as a seed. I suspect that something 
in the system must use this as a seed. I was working from memory. Oops.

Alex
P.S. I'm sure that pre-ADB mouse driver code does the same thing.

---------------------------------------------------------------------------
-  Alexander M. Rosenberg  - INTERNET: alexr@ucscb.ucsc.edu - Yoyodyne    -
-  330 1/2 Waverley St.    - UUCP:ucbvax!ucscc!ucscb!alexr  - Propulsion  -
-  Palo Alto, CA 94301     - BITNET:alexr%ucscb@ucscc.BITNET- Systems     -
-  (415) 329-8463          - Nobody is my employer so       - :-)         -
-                          - so nobody cares what I say.    -             -
Technical Details
Message-ID: <9009@goofy.Apple.COM>
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!snorkelwacker!apple!ucscb.ucsc.edu!alexr
References: <8999@goofy.Apple.COM>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!snorkelwacker!apple!ucscb.ucsc.edu!alexr
From: alexr@ucscb.ucsc.edu (Alexander M. Rosenberg)
Newsgroups: comp.sys.mac,comp.sys.mac.programmer,comp.sys.mac.misc,comp.sys.mac.system
Subject: Re: Random number Generator wanted.
Message-ID: <9009@goofy.Apple.COM>
Date: 6 Jul 90 00:35:58 GMT
References: <8999@goofy.Apple.COM>
Sender: usenet@Apple.COM
Reply-To: Alex_Rosenberg.INTEGRATION@gateway.qm.apple.com
Organization: Hacker's Anonymous
Lines: 31