CMP A, B, compares a with a of a, where A and b can be registers or memory addresses, and can also be two registers, but not all memory addresses. This command is too long to see, a lot of code comparison software, the use of this command.
MOV A, B to the value of a where A and B is a register or memory address, can also be two registers, but not the same memory address.
XOR A,a or operation, mainly used to empty a
Lea loading addresses, such as Lea Dx,string, to load the address of a character into the DX register
Push pressure stack
POP out of the stack
Add addition instruction format: add DST,SRC Actions performed: (DST) <-(SRC) + (DST)
Sub Subtraction instruction format: Sub dst,src action performed: (DST) <-(DST)-(SRC)
MUL unsigned multiplication instruction format: MUL src Action: byte operation (AX) <-(AL) * (SRC); Word manipulation (Dx,ax) <-(AX) * (SRC); double word operation: (EDX,EAX) <-(EAX) * (SRC)
div unsigned Division instruction format: Div SRC operation: Byte operations: 16 are divisor in AX, the 8-bit divisor is the source operand, the result of the 8-bit quotient in AL, and the 8-bit remainder in AH. Expressed as:
(AL) <-(AX)/(SRC) The remainder of the quotient, (AH) <-(AX)/(SRC). Word manipulation: 32-bit dividend in Dx,ax. Where DX is the high word, the 16-bit divisor is the source operand, the result of the 16-bit quotient in Ax, and the 16-bit remainder in DX. Expressed as: (AX) <-(dx,ax)/(SRC) of the quotient, (DX) <-(dx,ax)/(SRC) remainder.
Double word operation: 64-bit dividend in Edx,eax. of which edx is a high-double word, 32-bit divisor is the source operand, the result of 32 quotient in EAX, 32-bit remainder in edx. Expressed as:
(EAX) <-(edx,eax)/(SRC) of the quotient, (EDX) <-(edx,eax)/(SRC) remainder.
NOP has no effect, can be used to erase the corresponding statement, so, hey hey heh ...
Call invokes a subroutine that you can interpret as a process in a high-level language.
Control transfer command:
JE or JZ if equal then jump
Jne or jnz if not equal then jump
JMP Unconditional Jump
If JB is smaller then jump
If JA is greater then jump
If the JG is greater than the jump
Jge if it is greater than or equal to jump
If the JL is less than the jump
Jle if less than equals jumps
In general, the above several, are more common, need to master, but need to master more than these, other instructions I hope you can in private to understand, you can find the appropriate tutorial to see.
Just forgot, and now the conversion of the numbering is also affixed to:
First, the question of binary conversion to decimal is:
You multiply the binary numbers by the sum of their corresponding weights is the decimal number corresponding to that binary. For example:
10100=2 4 times +2 of the 2-square, that is, the decimal number 20.
11000=2 4 times +2 of the 3-square, that is, the decimal number 24.
Then let's talk about the method of converting the decimal number to a binary number:
I'm not sure how many of these methods are, I'm just talking about the simplest one-division:
Divide the integer portion of the decimal number you want to convert by 2, and note the remainder until the quotient is 0.
Example: n=34d (Note that you may see some numbers behind the addition of a letter, the letter is used to denote the number system, decimal numbers with D, binary number with B, octal number with O, hexadecimal number with h)
34/2=17 (a0=0)
17/2=8 (a1=1)
8/2=4 (a2=0)
4/2=2 (a3=0)
2/2=1 (a4=0)
1/2=0 (A5=1)
So n=34d=100010b.
The fractional part of the converted decimal number should be multiplied by 2, and the integer portion will be noted until the fractional part of the result is divided into 0.
Conversion between hexadecimal number and binary number, decimal number:
In general, the conversion between the hexadecimal number and the binary number should be very simple, you just have to convert the corresponding value of the conversion.
The base of the hexadecimal number is 16, a total of 16 digital, they are 0,1,2,3,4,5,6,7,8,9,a,b,c,d,e,f. Where a represents 10 in decimal and the rest is analogous. Their relationship to binary and decimal numbers is as follows:
0h=0d=0000b,1h=1d=0001b,2h=2d=0010b,3h=3d=0011b,4h=4d=0100b,5h=5d=0101b,6h=6d=0110b,7h=7d=0111b,8h=8d=1000b,9h =9d=1001b,ah=10d=1010b,bh=11d=1011b,ch=12d=1100b,dh=13d=1101b,eh=14d=1110b,fh=15d=1111b
Therefore, the binary and hexadecimal to be converted, as long as they are from low to high every four bits of a level, directly in hexadecimal to represent it can be:
Example: 1000 1010 0011 0101
8 A 3 5
Hex-to-binary is used simply to represent each bit with a four-bit binary number:
Example: A B 1 0
1010 1011 0001 0000
Finally, the hexadecimal number and the decimal number are converted to each other.
hexadecimal number to decimal number
The sum of the products of hexadecimal numbers and their corresponding weights is the decimal number corresponding to this hexadecimal number.
Example: n=bf3ch
=11*16 's 3-+15*16 2-+3*16 1-+12*16 0-Time Square
=11*4096+15*256+3*16+12*1
=48956d
Decimal Turn hex
I'm still talking about the simplest division:
Divide the integer value portion of the decimal number you want to convert by 16, and note the remainder until the quotient is 0.
Example n=48956d
48956/16=3059 (a0=12)
3059/16=191 (a1=3)
191/16=11 (a2=15)
11/16=0 (a3=11)
So n=48956d=bf3ch. ---------------------This article from lenhan12345 csdn blog, full-text address please click: 1588360?utm_source=copy
Common Assembly directives