Re: A86: c flag
[Prev][Next][Index][Thread]
Re: A86: c flag
That makes no sense... Why go to the trouble of doing 3 calls and a whole
bunch more code, when you can just do a CP which is built into the
processor...
In a message dated 97-11-07 22:51:17 EST, you write:
>
> Here is a routine to do it:
>
> _setxxop1 equ 4613h
> _setxxop2 equ 4617h
> _CPOP1OP2 equ 41FBh
>
> ld a,(var1)
> call _setxxop1 ;Store into Op1
> ld a,(var2)
> call _setxxop2 ;Store into Op2
> call _CPOP1OP2 ;Compare Op1/Op2
> jp z,equal
> jp nz,less
> jp c,greater
>
> -Ahmed
>
> At 01:43 AM 11/7/97 +0000, you wrote:
> >can someone tell me how to use the c flag to determine if a value is
> >equal to or above a number
> >
> >like if i have a with value 3 and b with value 4
> >cp b
> >jr c,bigger ; would this move to bigger if a >b or if b>a?
> >