Re: LZ: > and < and C and NC
[Prev][Next][Index][Thread]
Re: LZ: > and < and C and NC
-
Subject: Re: LZ: > and < and C and NC
-
From: <cbporter@erols.com>
-
Date: Thu, 18 Jul 1996 21:34:47 -0400
-
In-Reply-To: <LZ: > and < and C and NC>
At 03:37 PM 7/18/96 -0700, you wrote:
>How can you tell if one number is less than or greater than another? I
>know it has something to do with the C and NC flags, but how exactly do
>those work? Also, could I use the P and M (positive and minus) flags?
>
>Thanks,
>
>-Doug Melton
>http://www.smartlink.net/~dx4
>
>
finally an asm quesiton
what can be done is you can use the nz flag when using the cmp comand
if you do something like :
cmp b where b is the number being compared to a
then the nz flag will be set if they are not equal, then the cary flag will
be set if
a is greater, and i forget which flag will be set if it is less, but that is
the basic gist of it.
bassically what is happening is the cmp is subtracting b from a (a-b) if it
is 0 they are equal. and the z flag is set. if it comes out to be a positive
number then a > b and a negitive number would be a<b. that is it i think.
i think that is howit works, but i dont know alot about asm yet, but i think
i got it right.
chris
______________________
Erol's Help Desk
help@erols.com
1-888-EROL-NET
(703)321-4900
____________
References: