Re: LZ: Help with a routine


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

Re: LZ: Help with a routine



On 19 Sep 96 at 22:42, Ed Plese, Jr. wrote:


> > Sure.  BIT is easy.  All it does is compliment the bit you test and 
> > then puts that in the zero flag.
> > For example:
> >     BIT 7,a
> > tests the MSB of the accumulator.  If the bit is 1, then the zero 
> > flag is cleared, indicating "not zero".  (Right?)  If the bit is 0, 
> > then the zero flag is set, indicating "zero".
> > 
> > Got that?  ;)
> > --------
> > >I need to know how to use the BIT opcode... the
> > >specific routine requires me to test the MSB (first
> > >bit) of a byte and branch if it is 1.  Can someone
> > >please fill me in?
> > 
> > ____
> > ~Keith
> > FFNP69C@PRODIGY.COM
> > 
> 
> Actually, I think that if the bit is set, it will set the ZERO 
> flag, but if it is cleared, then it will clear the Z flag (indicating 
> nz).


No, the zero flag indicates that something is zero. Therefore if the 
bit's cleared (meaning it's zero) the Zero flag will be set!


<pre>
--
 Mattias Lindqvist
 d96mli@efd.lth.se
 www.efd.lth.se/~d96mli
</pre>


References: