A83: Re: Random number...


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

A83: Re: Random number...




This is a little slower probably than the ZLIB version, but it works:

	call	_random
	ld	a,40
	call	_setxxop2
	call 	_fpmult
	ld	a,10
	call	_fpadd

OP1 now has a number between 10 and 50.

HTH,

James Matthews (matthews@tkb.att.ne.jp)

ICQ: 7413754
http://home.att.ne.jp/gold/tomcat21/index.html
http://library.advanced.org/18242/

----------
> From: yean yean <yhean@mailcity.com>
> To: assembly-83@lists.ticalc.org
> Subject: A83: Random number...
> Date: Sunday, November 29, 1998 5:10 AM
> 
> 
> Hi,
> 
> I'm sure it's very simple... :), but I ask.
> Is there a way to do in assembly like in basic : 10+rand*41  ????
> That thing will display a number between 10 and 50, I want to do like this, but in asm.
> Is it possible ?
> 
> THX  ;)
> 
> see ya,
> 'yhean
> 
> 
> 
> Get your FREE Email at http://mailcity.lycos.com
> Get your PERSONALIZED START PAGE at http://personal.lycos.com