A83: Re: Random
[Prev][Index][Thread]
A83: Re: Random
If you want the random function to be at all fast, don't use _RANDOM.
Otherwise there is info on TI's site about it I'm pretty sure....
Assuming you don't want to use that routine, either use the routine in ZLib
(my favorite) or if you need fast, but not good/a lot in a row routine:
loop:
ld a,r
rra
and 7 ; you wanted 0 thru 6 right?
cp 6
jr nc,loop
-----Original Message-----
From: Michael Bryan Cook <MBCook@MBCook.com>
To: Assembly 83 List (E-mail) <assembly-83@lists.ticalc.org>
Date: Tuesday, June 30, 1998 4:45 PM
Subject: A83: Random
>
>-----BEGIN PGP SIGNED MESSAGE-----
>Hash: SHA1
>
>How do you use the '_RANDOM' function? And all I need is a good random
>function. Is that so much to ask. I'm glad I've had some responses but
>I need one that is independent of things like the time since the last
>keypress and such.
>
>Michael Bryan Cook
>- ------------------------------
>E-Mail - MBCook@MBCook.com
>- ------------------------------
>Web Page - http://www.MBCook.com
>Amazed Guy Award Page - http://www.MBCook.com/amazed.html
>MIDI Page - http://www.MBCook.com/midi.html
>NetSmart Page - http://www.MBCook.com/netsmart.html
>Parodies Page - http://www.MBCook.com/parodies.html
>Rush Sounds Page - http://www.MBCook.com/rush.html
>TI Page - http://www.MBCook.com/ti.html
>- ------------------------------
>I pledge allegiance to the compatibles of IBM, and everything that
>goes with them. And for the companies under which it stands, one
>industry, under Bill, with games and perhapsles for all!
>
>-----BEGIN PGP SIGNATURE-----
>Version: PGPfreeware 5.5.3i for non-commercial use <http://www.pgpi.com>
>
>iQA/AwUBNZmCfRdZVc5DvuaoEQJ9EwCgo7oww6omD4H6Fa2jlqY39RZxVBoAn14w
>8gQ/3UxkpnefzpUVEDR1Jo+2
>=jQ5l
>-----END PGP SIGNATURE-----
>