[Coco] Was reading HDB-DOS code to relax
Robert Gault
robert.gault at att.net
Mon Jan 27 10:04:20 EST 2014
Juan Castro wrote:
> Saw this:
>
> LC0BD bita #$01 * CHECK TO SEE IF ACCD IS ON AN EVEN
> beq LC0C2 * 512 BYTE (ONE GRAPHIC PAGE) BOUNDARY - ADD
> inca * 256 (INCA) TO IT IF NOT
> LC0C2 tfr A,B COPY ACCA TO ACCB
>
> Why not just:
>
> inca
> anda #$FE
> tfr A,B
>
> Juan
>
Juan,
Looks like it should work and be faster.
bita #1 2cyc
beq LC0C2 3cyc
inca 2cyc
LC0C2
5 cycles if even, 7 cycles if odd
inca 2cyc
anda #$FE 2cyc
LC0C2
4 cycles either even or odd
More information about the Coco
mailing list