-
Use the CMP command.
Examples: CMP OPRD1, OPRD2
Subtract the second operand for the first operation, but does not affect the value of the second operand.
It affects the cf, zf, of, af, and pf of the flag, how do we judge the size?
If the order is executed.
zf=1 is simple, then the two numbers are equal, because zero is 1, the result is 0 when unsigned:
If cf=1 then it means that there is a carry or debit, and cmp is a subtraction operation, so it can be seen that it is a borrowing, so oprd1oprd2 at this time
When there is a sign:
If sf=0 and of=0, it means that the value at this time is positive and there is no overflow, and it can be intuitively seen that oprd1>oprd2
If sf=1 and of=0 means that the value is negative at this time, and there is no overflow, then it is oprd1oprd2
The last two reasons why this judgment can be made are the question of the nature of the overflow:
If both numbers are positive, add up, and the value is negative, it means overflow.
If both numbers are negative, add up, and the value is positive, it means overflow.
Therefore, positive and negative will overflow, and negative will overflow.
It's a very simple instruction, beginners look at it, I feel like I've written it in detail, haha......Supplement: Subtract two numbers, the same sign, then do not overflow.
If the two numbers are different signs, and the result is the same as the minus sign, it will overflow.
-
The flag bit is 1 and 0, true and false. The sizes are incomparable.
-
Hello, the flag of 8086 is divided intoStatusLogo andControlSign.
-
Determining whether a number is odd or even has nothing to do with the pf flag. The pf flag is in the result of the judgment operation'1'Whether the number is odd or even, such as 0x01 and 0x10, one of these two numbers is odd and the other is even, but the result of pf is the same.
To determine whether a number is odd or even, just determine whether its last digit is 0 or 1, for example:
and ax, 1
jne odd ;If the result is not 0, the last digit of ax is 1, which is the odd je even; The result is 0, which means that the last digit of ax is 0, which is an even number.
-
Oh my God, assembly is a low-level language, how can there be such a statement as if, this sentence is not right, it should be replaced with cmp dx, 9 ; CMP is based on DX content and 9 ratio size, it does not affect DX content, only the flag bits.
ja ok ;Make judgments based on flag positions.
ok: mov ..
If DX>9, execute the statement after OK, otherwise execute the statement below the JA OK statement.
There is also dx is incorrect, only bx, si, di can be put in these three registers.
-
Select cell A1, set conditional formatting, and enter :
lookup(1,0/(a$1:a$27<>0),a$1:a$27)>a$28
Set the format to red.
To create a rule, enter the following in the format formula
lookup(1,0 (a$1:a$27<>0), a$1:a$27) is formatted in blue.
-
hello 。First of all, your data in Excel is data-valued. Even if you manually add a 0 in front of it, it doesn't work. What to do, it's simple.
1. Select A or B first, which column is it. Right-click and format the cells. In the Data section, select 'Text'. Are you sure.
2. You hit A or B first, right-click the mouse, and insert a column. Then write all 0 in this column inserted.
3. Select the inserted column and repeat step 1.
4. Select these two columns and copy them to the Word document.
5. Then paste it and copy it to excel. Just add 0 to all of them at a time. This method is the least hassle-free.
-
The MAC address is the NIC address, that is, each different NIC has a different MAC, which is mainly used for network identification.
IP address: Depending on the location, the internal IP dynamically assigned by network devices such as routers and the external IP provided by the local network provider are mainly equivalent to the address where the network is located.
id is the name.
Lazy to say so detailed. Baidu sighed for himself.
overflow flag
The overflow flag of which is used to reflect whether the result of the addition and subtraction of a signed number is overflowing. If the result of the operation exceeds the range that can be represented by the current number of operation bits, it is called overflow, and the value of of >>>More
Nowadays, ordinary people like to have their own second career, and if you want to have your own after-sleep income, then you must work hard during the day. <> >>>More
1. Does the logo need to be registered before it can be used? >>>More
There is a wonderful function "rank" in Excel, which can display the ranking of numbers in another column separately, and it can remove duplicate rankings. The result is that as many people are displayed. Let's share it with you, I hope it will be helpful to you. >>>More
First of all, I'm going to tell you that Disney is Disney, and we say we're used to Disney. >>>More