[A83] Re: Randomization - r register


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

[A83] Re: Randomization - r register





>At 19:27 2001-12-11, you wrote:
>
> >I haven't worked with random numbers in any of my programs yet but, to 
>load
> >a random number in a register goes like this right ld a,r ?
> >
> >But how can one then set the seed of the random "list", thus getting the
> >same "list" when you set the seed to a certain number?
> >
> >Thanks
>
>The register r is not a built in random, and is not very random. (I think
>it just increments and wraps around)
>It is the "memory refresh register" used internally.
>It could be used as seed to a real random routine like one of those I
>posted before though, but shouldn't be used directly if you want a good 
>random.
>Since it is not a random, you cant set its "seed"...
>
>///Olle

What is the actual use of the r register in the z80?
(I don't mean: "how can I use it...?")

       SUCKER

_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp





Follow-Ups: