A86: Re: Re: Randomness...


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

A86: Re: Re: Randomness...




Except you have to load the numbers into A, not HL.  ;-)
OPs are kind of fun.

-----Original Message-----
From: JBrett <tbarwick@esn.net>
To: assembly-86@lists.ticalc.org <assembly-86@lists.ticalc.org>
Date: Friday, November 13, 1998 7:41 PM
Subject: A86: Re: Randomness...


>
>here is easier:
>  ld hl,1
>  call _setxxop1
>  ld hl,25
>  call _setxxop2
>  call _randint
>  call _convop1
>there... easier...
>______
>JBrett
>tbarwick@esn.net
>ICQ UIN: 20607010
>http://ww2.esn.net/~tbarwick
>ACZ member
>Plexus Publishing member
>-----Original Message-----
>From: Cassady Roop <croop@oregontrail.net>
>To: assembly-86@lists.ticalc.org <assembly-86@lists.ticalc.org>
>Date: Friday, November 13, 1998 5:07 PM
>Subject: A86: Randomness...
>
>
>>
>>Will this give me a random number, from 1 to 25, in A?
>>
>>ld hl, $0001 ;random number between 1 and 25 is needed
>>call _setxxxxOP2 ;hl --> OP2
>>call _OP1toOP2 ;OP2 --> OP1
>>ld hl, $0025 
>>call _setxxxxOP2 ;hl --> OP2
>>call _randint ;rand(OP1,OP2) --> OP1
>>call _convOP1 ;OP1 --> A
>>
>>thanks, 
>>
>>Cassady Roop
>>Slightly Immoral Technologies
>>