Re: A83: Re: < or > commands?


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

Re: A83: Re: < or > commands?




It should be noted that nc means equal to also...

Kouri wrote:
> 
> Ah, welcome to the world of the carry flag. :)
> Let's say you want to compare a to b, and if b is greater, then jump to somewhere:
> cp b \ jr c,BisGreaterThanA
> 
> The cp instruction acts like a subtraction, so if a was 5 and b was 10, 5-10 == -5, which would result in the carry flag
> being set.
> 
> Similarly, if a was 6 and b was 3, 6-3 == 3, and the carry flag would be reset.
> cp b \ jr nc,AisGreaterThanOrEqualToB
> 
> So by testing for the carry flag, you should be able to figure out all that greater than/less than stuff.
> 
> ----- Original Message -----
> From: "Chris DC" <dreamcast_84@yahoo.com>
> To: <assembly-83@lists.ticalc.org>
> Sent: Friday, January 21, 2000 18:30
> Subject: A83: < or > commands?
> 
> is there any greater than or less than commands?
> __________________________________________________
> Do You Yahoo!?
> Talk to your friends online with Yahoo! Messenger.
> http://im.yahoo.com

-- 
Scott "_Wrath_" Dial
wrath@calc.org
ICQ#3608935
TimeCity AI Guy II - www.timecity.org
Member of TCPA - tcpa.calc.org
__________________________________________
NetZero - Defenders of the Free World
Get your FREE Internet Access and Email at
http://www.netzero.net/download/index.html


Follow-Ups: References: