Re: A86: Re: FindPixel


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

Re: A86: Re: FindPixel




>        ld hl,FP_Bits   ; HL -> bitmask table
>        ld a,e          ; A = x coordinate
>        and $07         ; A = bit offset
>        or a,l          ; add bit offset to HL (the addition to L will
>        ld l,a          ;  not carry, because the table is aligned)
>        ld c,(hl)       ; C = bitmask (saved for later)


.org (($+8) & 0FFF8h)   ; align FP_Bits on the next 8-byte boundary

Ok I understand tell me if this is correct

1.) The address is cleared of the last 3-bits but adds 8 bytes since
clearing the last 3-bits could of subtracted up to 8 bytes from the address.

2.) Since the last 3-bits of the FP_Bits address is clear, you can easily
add 3-bits (0-7) and there is no chance of the carry flag being set. Clever
clever

-Matt





Follow-Ups: