0 votes
in General Knowledge by (744k points)
How do you explicitly set flags?

1 Answer

0 votes
by (744k points)
 
Best answer
cmpX b,a computes a-b without assigning result to destination.

CF is set if carry out from MSB is 1
ZF set if a == b
SF set if (a-b)<0 (as signed)
OF set if two's-complement overflow

OR testX b, a computes a&b without assigning result to destination (useful for determining whether an operand is negative, zero, or positive)

ZF set when a&b == 0
SF set when a&b < 0
OF & CF not set
Welcome to the Answerine , a great place to find, read and share your favorite questions and answers.

Related questions

...