Re: A86: cphlde


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

Re: A86: cphlde




Sorry, I was wrong.  jp and ret can test the sign flag, jr cannot.

 and a
 jr z,a_is_zero
 jp p,a_is_positive
 jp m,a_is_negative

you can save a byte in inequalities by using the carry flag over using
the sign flag.

Dux Gregis wrote:
> 
> and a
>  jr z,a_is_zero
>  jr p,a_is_positve
>  jr m,a_is_negative
> 
> Bit 7 is copied into the sign flag and can be tested with the condition
> statements P and M.
> 
> Kirk Meyer wrote:
> >
> > yes, except that the carry flag can be used w/ the "jr" type
> > instructions whereas the sign flag cannot.
> >


References: