> Here's where the in-line assembler pays off:
>
> link a6,#0
> move.l d3,-(sp)
> move.b 8(a6),d1
> moveq #0,d0
> moveq #7,d3
> 1$ lsr.b d1
> lsl.b d0
> dbra.b d3,1$
> move.l (sp)+,d3
> unlk a6
> rts
>
> The lsr, lsl, and dbra instructions all fit into the instruction fetch
> registers, and so once they fetched from memory the first time, the
> remainder of the loop runs with NO memory cycles!
D2 is also a scratch register. Use it instead of D3, and you don't have to save
or restore D3. And as long as you're using inline assembly, you might as well
get rid of those LINK and UNLK statements.
Not that any program would be better for these changes... :-)
-- Keith
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/tech/support/forums/