Home Random Page


CATEGORIES:

BiologyChemistryConstructionCultureEcologyEconomyElectronicsFinanceGeographyHistoryInformaticsLawMathematicsMechanicsMedicineOtherPedagogyPhilosophyPhysicsPolicyPsychologySociologySportTourism






Main unprivileged commands. Data transfer.

1)mov receiver, source - a team of data transfer. Copies the contents of the source to the receiver, the source does not change. For example: mov ax, 1 ax register assigns a value of 1. Team mov ax, word ptr eax - writes the word ax lying at eax. Byte at address eax recorded in the low half of the ax (in al), and the byte at address eax 1 is written in ah.

 

2)xchg operand1, operand2 - swaps operands. For example, if the al = 45, ah = 37, then after xchg al, ah is al = 37, ah = 45

3) Addreceiver, source - performs addition of the receiver and the source, the result is stored in the receiver. The source does not change. But changing flags

4) adc receiver, source - receiver performs addition, the source and the flag CF. This command is used to add numbers increased accuracy. Suppose, for example, we have two 64-bit numbers, the first in edx: eax (low-order double word in eax, DWORD senior in edx), the second - in ebx: ecx. Then after executing commands: add eax, ecx; adc edx, ebx; paired registers edx: eax will be the sum of these 64-bit numbers.

5)sub receiver, source - subtracts the source from the receiver, the result puts the receiver

6) sbb receiver, source - subtracts the value of the source of the receiver, and then subtracts the value of CF. It can be used to subtract the 64-bit words

7) increceiver - the same as the add receiver 1

8) dec receiver - the same as the sub receiver 1

9) cmp operand1, operand2 - essentially the subtraction of operanda2 operanda1, only the operands does not change (command only changes the flags). This command is usually executed conditional branches (the most obvious way)

10) and | or receiver, source - performs a logical bitwise AND | OR of the receiver and the source, and places the result into the receiver. Often used to selectively reset | obedinichivaniya individual bits. For example, the command and al, 00001111b will clear upper 4 bits of the register al, and the younger ones will not change

11) xor receiver, source - logical. Performs beaten logical exclusive OR of the receiver and the source, the result is stored in the receiver. Often used to clear the registers. For example, xor ax, ax clears the register ax, and makes it faster than mov ax, 0.

12)testoperand1, operand2 - essentially executes the command and operands, but the operands does not change, but only changes the flags and similar

13) notreceiver - the receiver each bit equal to zero is set to 1, and each bit is equal to 1 is set to 0. The flags are not changed

 

 

Command:OUT receiver, source Purpose:Write down data to the port
Command:CWD Purpose:Word converting in the double word
Command:CDQ Purpose:Double word converting in the quadruple word
Command:CBW Purpose:Byte converting in the word
Command:CWDE Purpose:Word converting in the double word
Command:MOWSX receiver, source Purpose:Transfer with sign extension
Command:MOWZX receiver, source Purpose:Transfer with extension with zeroes
Command:XLAT address
XLATB Purpose:Translation according to the table
Command:LEA receiver, source Purpose:Calculation of the effective address
Binary Arithmetics
Command:ADD receiver, source Purpose:Addition
Command:ADC receiver, source Purpose:Addition with carryover
Command:XADD receiver, source Purpose:Exchange between themselves and add
Command:SUB receiver, source Purpose:Subtraction
Command:SBB receiver, source Purpose:Subtraction with a borrow
Command:IMUL source IMUL receiver, source
IMUL receiver, source1, source2 Purpose:Multiplication of numbers with a sign
Command:MUL source Purpose:Multiplication of numbers without a sign
Command:IDIV source Purpose:Integer-valued division with a sign
Command:DIV source Purpose:Integer-valued division without a sign
Command:INC receiver Purpose:Increment
Command:DEC receiver Purpose:Decrement
Command:NEG receiver Purpose:Sign change
Command:CMP receiver, source Purpose:Comparison
Command:CMPXCHG receiver, source Purpose:Compare and exchange between themselves
Command:CMPXCHG8B receiver Purpose:Compare and exchange eight bytes



 


Date: 2015-01-29; view: 1223


<== previous page | next page ==>
Data presentation in the computer. Binary and hexadecimal notations. Bits, bytes and words. | Ways of addressing.
doclecture.net - lectures - 2014-2024 year. Copyright infringement or personal data (0.005 sec.)