Information Technology Reference
In-Depth Information
TABLE 3.10 Sample of the X86 Arithmetic Instructions
Mnemonic
Operation
Subtype
ADD
Add source to destination
Addition
ADC
Add source to destination with carry
Addition
INC
Increment operand by 1
Addition
SUB
Subtract source from destination
Subtraction
SBB
Subtract source from destination with borrow
Subtraction
DEC
Decrement operand by 1
Subtraction
MUL
Unsigned multiply source by destination
Multiply
IMUL
Signed multiply source by destination
Multiply
DIV
Unsigned division accumulator by source
Division
IDIV
Signed division accumulator by source
Division
TABLE 3.11 Sample of the X86 Shift and Rotate
Instructions
Mnemonic
Operation
ROR
Rotate right
ROL
Rotate left
RCL
Rotate left through carry
RCR
Rotate right through carry
SAR
Arithmetic shift right
SAL
Arithmetic shift left
SHR
Logic shift right
SHL
Logic shift left
how the instruction set can be used. The examples presented are the same as those
presented at the end of Chapter 2.
Example 3
Adding 100 numbers stored at consecutive memory locations starting
at location 1000, the results should be stored in memory location 2000. LIST is
TABLE 3.12 Sample of the X86 Control Transfer Instructions
Mnemonic
Operation
Subtype
SET
Set byte to true or false based on condition
Conditional
JS
Jump if sign
Conditional
LOOP
Loop if CX does not equal zero
Iteration
LOOPE
Loop if CX does not equal zero & ZF ΒΌ 1
Iteration
INT
Interrupt
Interrupt
IRET
Interrupt return
Interrupt
JMP
Jump unconditional
Unconditional
RET
Return from procedure
Unconditional
Search WWH ::




Custom Search