Re: A86: Random


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

Re: A86: Random




In a message dated 10/13/99 17:33:56 Eastern Daylight Time,
ironman_294@hotmail.com writes:

>Ok im looking for a random function.  Now I think that register r is >a 
>random number or no?  Also I was looking at something that used the >call 
>_setxxop2 I included every file that i have and i still could >not get it 
>to work does anyone know whats going on here?

A random routine using the _setXXop2 call would be something like this: 
(Should be correct)

xor a   ;ld a,0
call _setXXop1  ;content of a into OP1
ld a,10
call _setXXop2  ;content of a into OP2
call _randint   ;random integeter between OP1 and OP2->OP1
call _convop1   ;convert number in OP1 to 'a'

This routine would produce a random number between 0 and 10 into 'a'.
It is very random, but very slow. I suggest using some of the routines 
posted earlier.

Andreas Finne
a_finne@hotmail.com
a_finne@iobox.fi

______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com