Re: A83: Calculating this formula...
[Prev][Next][Index][Thread]
Re: A83: Calculating this formula...
I am pretty sure that sla a is still better than add a,a... and srl is
shifting so there is no need to mask the upperbits...
David Phillips wrote:
>
> If you're using the accumulator, you can save a byte and some cycles:
>
> add a,a ; a *2
>
> As for division, this will work, but remember that at the end you will need
> to mask off the upper bits:
>
> rra ; a / 2
> rra ; a / 4
> rra ; a / 8
> and %00011111 ; mask off top 3 bits since we shifted 3 times
>
> > also remember that a / 2 or a * 2 is much faster with shift operations
> >
> > ie. sla a = a*2
> > srl a = a/2
--
Scott "_Wrath_" Dial
wrath@calc.org
ICQ#3608935
Member of TCPA - tcpa.calc.org
_____________________________________________
NetZero - Defenders of the Free World
Click here for FREE Internet Access and Email
http://www.netzero.net/download/index.html
Follow-Ups:
References: