Re: A83: Negative or positive?


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

Re: A83: Negative or positive?




That's highly inefficient.  The easiest way is to just quickly test the last
bit:

 ld a,(Speed)
 rra
 jr c,negative
; not negative

> Sorry bout the extremely late post, but can't you just use the sign flag?
>
> ld a,(number)
> cp 50
> jp z,a_is_fifty
> jp p,a_is_greater_than_fifty
> jp m,a_is_less_than_fifty
>
> The p stands for plus and the m minus (meaning positive or negative). I
know
> all this does is check the 7th bit, but i think it might save a few bytes.




Follow-Ups: References: