Re: A83: Setting a bit...
[Prev][Next][Index][Thread]
Re: A83: Setting a bit...
> use the xor command. xor a,3
>
> sets/resets the first and second bits- the code to set third is xor
> a,4.
>
> Assuming you count from zero to seven, of course.
Hey there, thanks for the reply - but unfortunately, that is wrong :)
ld a,5 ; 5 = 101
xor 6 ; 6 = 110
; a = 3 ; 3 = 11
If the number after XOR was the bit number, then yeah, that's no problem -- but its not.
David's code was excellent -- cheers.
James.
Follow-Ups:
References: