[A83] Re: Random numbers


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

[A83] Re: Random numbers




The main APD timer isn't always 74h. The reason it seems that way in Calcsys
is Calcsys updates the screen right after you press a key. Well, _getkey
will reset the APD counter right after a key press. In reality, the APD
timer is decrementing but since Calcsys doesn't constantly refresh in a
loop, you'll never see it.


Michael Vincent
Detached Solutions - www.detacheds.com
Radical Software - www.radicalsoft.org

----- Original Message -----
From: "Ronald Teune" <rtwolf@gmx.net>
To: <assembly-83@lists.ticalc.org>
Sent: Friday, August 10, 2001 11:04 AM
Subject: [A83] Re: Random numbers


>
> If you enabled APD,
>
> >The r register has only *7* signifcant bits, so numbers from 0 to 127.
> >
> >
> >>From: Peter-Martijn Kuipers <hyper@hysoft-automation.com>
> >>Reply-To: assembly-83@lists.ticalc.org
> >>To: assembly-83@lists.ticalc.org
> >>Subject: [A83] Re: Random numbers
> >>Date: Fri, 10 Aug 2001 15:06:46 +0200 (CEST)
> >>
> >>
> >>Depends on what you need, if you only need an 8-byte integer, you can
use
> "apdSubTimer          EQU  8448h" (from Ti83plus.inc). I tried it and it
> works great. In CalcSys the main apdtimer seems to be always 74h.
>
> >>the 'r' register, which is normally (not in the 83(+,SE)) used for
dynamic
> >>memory refresh, but contains a pseudo-random number based on the amount
of
> >>clock-cycles ran.
> >>you can use it only with ld a,r and ld r,a (no use in the latter)
> >>if you have a fixed number of clock-cycles between each read (if you
don't
> >>wait for user input or let a wait routine depend on an arbitrary
changing
> >>mem address), though, you will have the same difference between the
reads.
> >>
> >>e.g.
> >>1 - 6
> >>63 - 9
> >>
> >>--(Peter-Martijn)
> >>
> >>
> >> >
> >> > What is the best random number generator routine , in terms of
> >> > effectiveness and speed ?
> >> >
> >> > TruRand seems to be slow (it uses OPs), and I can't paste Joe Wing's
> >> > random numbers routine (that is used in Ion and Zlib) in my program.
> >> >
> >> >
> >> >
> >> >
>
>>__________________________________________________________________________
> ____
> >> > ifrance.com, l'email gratuit le plus complet de l'Internet !
> >> > vos emails depuis un navigateur, en POP3, sur Minitel, sur le WAP...
> >> > http://www.ifrance.com/_reloc/email.emailif
> >> >
> >> >
> >> >
> >> >
> >>
> >>
> >>
> >
> >
> >_________________________________________________________________
> >Download MSN Explorer gratis van http://explorer.msn.nl/intl.asp
> >
> >
> >
>
>
>
>




References: