Re: LZ: Testing HL
[Prev][Next][Index][Thread]
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?
>
> BTW: I know i could load de with 65535, or $FFFF, and then call
> CP_HL_DE, but i need something that would take the same amount of
> time. (Yes, it needs to be somewhat percise timing, i'm sending
> kinda serial data out the link port).
>
> Can anyone help?
Just inc hl first and then check if it's zero. That's must be the
simpliest way.
<pre>
--
Real name: Jimmy Mårdell
Email....: mailto:mja@algonet.se
IRC-name.: Yarin
WWW......: http://www.algonet.se/~mja
"Strap me down with disillusion
Tie me up in lifelines
Nothing stops my thoughts from breeding
Nothing's stopping my mind" - Leather Strip
</pre>
References: