Re: LZ: bit, set, and res


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

Re: LZ: bit, set, and res



Well, "bit" works like this:


bit 3,a


That will test bit 3 in the accumulator, and set the Zero Flag 
accordingly.  If bit 3 is set (1), then the ZF will be clear, 
indicating "not zero".  If the bit was clear (0), then the ZF will be 
set indicating "zero".


"set" and "res" set or clear (reset), respectively, a bit in a 
register or memory.
If i do:


set 1,b


that will set bit one in register b.   xxxxxx1x = b


"res" does just the opposite.


res 5,h


will clear (reset) bit 5 in register h.  xx0xxxxx = h


Got all that?  ;)


>Can someone explain what bit, set, and res do and
>when I would use them?
>
>Thanx,
>
>EJ


____
~Keith
FFNP69C@PRODIGY.COM


References: