A86: Re: Another question. . .
[Prev][Next][Index][Thread]
A86: Re: Another question. . .
> OK, I solved the first problem (thanks Joshua =), but now I need to know
the
> best way to figure random numbers with an upper limit (It'll probably be
4,
> but I'd rather have something where I can changethe max) -- so I want an
> integer between 1-4. I know the calc has a _RANDOM ROM cal, but I'm not
> sure how to use that -- and I'm pretty sure I've seen the r register
used. .
> . So can someone send me a snipet of code that allows me to get a random
> number between 1 and whatever???
In Rom Central on my site I have some sample code to find a random number
using OP, but it doesnt use _RANDOM, it uses another routine
(undocumented). It uses OP1 as the min number and OP2 as the max number.
You can find this on my site:
http://www.dogtech.com/cybop/ti86/
Later,
-Matt