Re: LZ: Testing HL


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

Re: LZ: Testing HL



On 20 Sep 96 at 18:07, KEITH T BURZINSKI wrote:


> I need a way to test if all the bits in hl are set, similar to how 
> one would test if all bits in hl were clear.
> 
> What i mean is, well you can do
>     ld  a,h
>     or  l
> and that will return zero if hl = 0.
> 
> what i need is a way to test if all the bits are 1, similar to the 
> method above.  Can i use "and" or "xor" for this?


How about this:


	ld	a,h
	and	l
	inc	a


if zeroflag is set (here we go again :) ) all bits in HL were set.


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


References: