[A83] Re: Random numbers


[Prev][Next][Index][Thread]

[A83] Re: Random numbers




Depends on what you need, if you only need an 8-byte integer, you can use 
the 'r' register, which is normally (not in the 83(+,SE)) used for dynamic memory refresh, but contains a pseudo-random number based on the amount of clock-cycles ran.
you can use it only with ld a,r and ld r,a (no use in the latter)
if you have a fixed number of clock-cycles between each read (if you don't wait for user input or let a wait routine depend on an arbitrary changing mem address), though, you will have the same difference between the reads.

e.g.
1 - 6
63 - 9

--(Peter-Martijn)

 
> 
> What is the best random number generator routine , in terms of 
> effectiveness and speed ?
> 
> TruRand seems to be slow (it uses OPs), and I can't paste Joe Wing's 
> random numbers routine (that is used in Ion and Zlib) in my program.
> 
> 
>  
> ______________________________________________________________________________
> ifrance.com, l'email gratuit le plus complet de l'Internet !
> vos emails depuis un navigateur, en POP3, sur Minitel, sur le WAP...
> http://www.ifrance.com/_reloc/email.emailif
> 
> 
> 
> 




References: