Re: A83: Re: Setting a bit...


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

Re: A83: Re: Setting a bit...




On 18 Jan 00, at 8:16, David Phillips wrote:


Use a lookup table and an xor operation:

; a = value to change, c = bit to change (starting at 0)
; 8b / 39t (16b total)

 ld b,0
 ld hl,BitMasks
 add hl,bc
 ld b,(hl)
 xor b

BitMasks:
 .db $1, $2, $4, $8, $10, $20, $40, $80



That's an interesting way of doing that, but if you only need one, 
then use the xor command alone.


They say one has to be good in this business.  Well I'm better.

-The Godfather


References: