A83: Re: RandInt(


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

A83: Re: RandInt(




This is for ION:

ld b,<range>
call ionrandom
add a,<min>

Example:
generates 0-7 in register a
ld b,8
call ionrandom

generates 5-10 in register a
ld b,6
call ionrandom
add a,5



If you don't use ION, you can use:
ld a,r

this puts a "random" byte into a.

>I want to use the BASIC command RandInt() in ASM. Is that possible, and
>what
>is the code for it?
>
>


_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.

Share information about yourself, create your own public profile at 
http://profiles.msn.com.