Description
Price: 4.00 USD | Size: 543 MB | Duration : 5.21 Hours | 21 Video Lessons |
BRAND: Expert TRAINING | ENGLISH | INSTANT DOWNLOAD | 4.9
Instructions in x86 assembly
Introduction
This article will define three main categories of instructions in the x86 architecture. It will give examples in each of these categories and then show simulations on how some instructions are executed.
This article is designed for professional and self-starters who want to gain a detailed understanding of x86 instructions. Learning x86 instructions will help you to understand the make-up of underlying systems which popular programming languages conceal from you.
Instructions in x86
Instructions can be defined as the language used to command a computer architecture. The x86 instructions basically tell the processor what to do. They are generally categorized into:
- Arithmetic and logic instructions
- Control-flow instructions
- Data movement instructions
Arithmetic and logic instructions in x86
These instructions consist of arithmetic and logical operations. Arithmetic operation can be applied on numerical quantities to multiply, add, subtract or divide. The logic operations are basically the operations performed by logic gates and the main operations are AND, OR, XOR and NOT.
Arithmetic instructions
Basic instruction format
ADD operand1, operand2.
Operand1 is the destination operand and operand2 is the source operand. The destination operand can be either a memory location or a register. Operand2 is the source operand and can be a constant, a register or memory location.
Example 1:
- MOV AX, 77H ;Copy the hex value 77 to the accumulator
- ADD AX, 80H ; Add the constant hex value 80 to the value in the accumulator.
Operand 1: 0111 0111
Operand2: 1000 0000
Content of operand1 after ADD operation: 1111 01111
Note that there is no carry from the lower four bits (low nibble) to the higher four bits (high nibble). The Auxiliary or Adjust flag will not be set.
Discover more from Easy Learning (Since 2013)
Subscribe to get the latest posts sent to your email.