A86: Re: Greater Than/Less Than


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

A86: Re: Greater Than/Less Than






>
>Is there an opcode or a ROM routine that can tell if one value is larger,
>smaller, or the same as another value?

try this:

 cp 5
 jr z,a_equal_to_5
 jr c,a_less_than_5
 jr nc,a_greater_than_5