[Coco] real-time mouse cursor

Roger Taylor operator at coco3.com
Sun Jan 27 12:20:48 EST 2008


At 02:30 AM 1/27/2008, you wrote:

>When possible, I would also recommend avoiding the TST instruction 
>in time-critical code. If either A or B do not need to be preserved, 
>its faster to use an LD:
>
>         LDA     $FF02
>a@     LDA    $FF03
>         BPL     a@
>
>And if X or U don't need to be preserved, you can save one more 
>cycle within the loop at the expense of a one-time penalty of 3 
>cycles on entry:
>
>         LDU    #$FF03
>         LDA     -1,U
>a@     LDA    ,U
>         BPL     a@



I'm going to assume you didn't direct these tutes at me, a 6809 
expert.  ;)  I'm more then aware of things like this, and I also feel 
that strange "TST instruction worry syndrome" that other cycle-aware coders do.

And believe me, If I wanted to squeeze that little snippet for 
speed/size/resources (take your pick), I would, but it's a balance 
between all three as it is.

Thank ya.







More information about the Coco mailing list