Re: A86: Random Numbers


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

Re: A86: Random Numbers




there's _RANDOM ($55da) which puts a random number between 0 and 1 in op1
there's _randint ($5544) which gets a random number between op1 and the
top of fps
there's this (sorta from ztetris)
Random:	ld b,a
	ld a,r
	add a,a
	ld hl,0
	ld d,h
	ld e,a
RMul:	add hl,de
	djnz RMul
	ld a,h
	ret
which gets a number between 0 and a in a

-josh

On Sat, 12 Sep 1998 17:22:22 -0700 "Dave" <scheltem@aaps.k12.mi.us>
writes:
>
>    I was wondering what ways there are to make random numbers in 
>asm?=20
>

_____________________________________________________________________
You don't need to buy Internet access to use free Internet e-mail.
Get completely free e-mail from Juno at http://www.juno.com
Or call Juno at (800) 654-JUNO [654-5866]


References: