Re: A86: cphlde


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

Re: A86: cphlde




At 12:42 AM 5/4/98 -0400, you wrote:
>
>I disassembled _cphlde ($403c) to find out which flags are set.  I'm not
>sure how the carry flag is affected, but you can use the sign flag to
>check for inequalities:
>
> call _cphlde
> jr z,de_equal_to_hl
> jr p,de_less_than_hl
> jr m,de_greater_than_hl

You should really use the carry flag to check for inequalities, that's the
way it's usually done.

jr c,de_less_than_hl

BTW, the _cphlde and other compare routines function exactly the same as
the cp instruction.

--Joshua


Follow-Ups: References: