ARM Instruction Set | 8086/8088


        

ARM Instruction Set | 8086/8088


 

 

 








What is an instruction?

Microprocessor commands are binary words. When read as a command, the binary word tells the microprocessor to perform one simple task. Many microprocessor commands allow you to move or process data. The data may be in memory, or it may be in one of the microprocessor registers. A few other microprocessor commands allow you to perform "house maintenance" tasks.

These commands allow you to control specific microprocessor commands. The command can be divided into two parts - Opcode (operation code): Tells the microprocessor what to do. The first name of the multi-word command is the opcode - Operands: Tells the content of this action. Second or second and third name operators.

Instructions Set

The 8086 microprocessor command set is divided into 5 sections:

• Data transfer instructions

• Mathematical instructions

• Reasonable instructions

• Rope fraud instructions

• Regulatory instructions

Data Transfer

• Data transfer instructions

A group of data transfer commands assigned to move data between its internal registers or between the internal register and the memory storage. This group includes

 • MOV  

 • PUSH

 • POP

• IN

 • OUT

 • XLAT

• LEA, etc

                 General-purpose data transfers

MOV

PUSH

POP

XCHG

XLAT

Move a byte or a word

Push word onto the stack

Pop word off the stack

Exchange bytes or words

Table lookup-translation

                                IN/OUT instructions

IN

OUT

 

Input

Output

                             Address object transfers

LEA

LDS

LES

 

Load effective Address

 Load pointer using DS

 Load pointer using ES

                                 Flag transfers

LAHF

SAHF

PUSHF

POPF

 

Load AH from flags

Store AH into flags

Push flags onto the stack

Pop flags off the stack

 

The MOV Instruction

The move Instructions are one of the commands in the data transfer group of command group 8088/8086. The status of this order is generally labeled as MOV D, S.

Mnemonic

Meaning

Format

Operation

Flags affected

MOV

Move

MOV D, S

(S) → (D)

None

 

·         Its operation is described in general as (S) → (D)

Destination

Source

  Memory

 Accumulator

 Register

 Register

 Memory

 Register

 Memory

 Seg-reg

 Seg-reg

 Reg16

 Memory

 Accumulator

Memory

 Register

 Memory

 Register

 Immediate

 Immediate

 Reg16

 Mem-16

 Seg-reg

 Seg-reg

 

 

MOV Operands

Data can be moved between standard purpose registers, between general-purpose and segment register, between general-purpose register or component register and memory, or between memory location and accumulator - MOV commands cannot transfer data directly between source and destination, both remain in memory external.

• Data must first be moved from memory to an internal register, such as an accumulator (AX), with a single navigation command, and then transferred to a new location in memory by a second navigation command.

PUSH and POP Instructions

PUSH

 - Push the Word into the stack

Stack identifier: When we wish to write data to a stack, the processor will automatically adjust the stack cursor during Push in such a way that the next compressed item does not interfere with what is already there.

Whenever we press a stack object, the stack identifier decreases by 2 - This is necessary because all push includes 2 bytes of data (usually registry content) - Lowering the stack cursor during Push is a common way to use stacks on hardware.

POP instruction

 Upload the value from the top of the stack to the destination specified by the destination operator (or explicit opcode).

Stack indicator: Enhance stack cursor - The destination the operator can be a standard purpose register, memory location, or component register.

IN and OUT Instruction

IN and OUT: To access data in the input/output ports, using INPUT (I) and OUTPUT (O) commands.

 • These commands can be used to enter or extract data for any ports of 64K byte widths in the I / O space of 8088. The processor has a different I / O space in its memory space.

What is an input port?

  The input hole is actually a hardware device connected to a processor data bus. Input ports can be used to read data from keyboards, A / D converters, DIP switches, chip chips, UART, and other things that can be connected to the CPU.

 • IN command process: When executing an IN order, the processor will extract the port address to enter the address bus. The selected input port will place its data in the data bus that the processor will read. Data read in the input port always ends in a merger.

Types of IN Instruction:

 The processor allows two different types of IN commands. If a 16-bit full address is specified, the port address is loaded into the DX register, and in AL, DX, or AX, DX is used to read the input port. If the port number is between 00 and FFH, a different IN-form can be used. In this case, the input from port 80H we will use IN AL, 80H or IN AX, 80H. Use AL in the operator field causes the reading of 8 pieces of data. Two bytes can be entered using AX in the operand field.

Example: What is the effect of IN AL, 80H if the data on the installation port 80H is 22?

Solution: A total of 22 bytes is copied to register AL.

 OUT Instruction

OUT: OUT commands are a combination of IN commands. With (OUT) we can send 8 or 16 bits of data to the output port. The port address can be uploaded to DX for use with OUT DX, AL or OUT DX, AX, or specified within instruction, such as OUT 80H, AL or OUT 80H, AX.

Example: What happens when OUT DX is made, AL if AL contains 7CH and DX contain 3000H?

Solution: The port address stored in the DX register exits the address bus, as well as 7CH from AL on the data bus. The rotation of the discharge hole should see the address 3000H and the details are stored there.

XLAT Instruction

XLAT: The translation table is assumed to be in the data category (DS). It is assumed that a 256-byte data table is written in memory to the original address contained in the BX register. The number in the register AL at the beginning of the execution is used as a reference in the translation table. A byte stored at an address created by the addition of BX and AL and then copied to AL.

PA = (DS) 0 + (BX) + (AL).

LEA Instruction

Active Address (LEA): The LEA (Active Address) command is a way to get an address from any means that refer to the Intel processor memory. Moves the contents of the selected memory location to the targeted register:

Equivalent to “&” in C.

Arithmetical operation instructions

Arithmetical operating instructions: Addition, subtraction, multiplication, division.

 Arithmetical performance flags: The situation arising from the use of the mathematical command is recorded on microprocessor flags. The flags affected by the statistical guidelines carry the flag (CF), the auxiliary flag (AF), the flag of mourning (SF), the flag of zero (ZF), the flag of solidarity (PF), and the flag of abundance (OF).

 

 

                               Addition

ADD

ADC

 INC

 AAA

DAA

 

Add byte or word

 Add byte or word with carrying

 Increment byte or word by 1

 ASCII adjust for the addition

Decimal adjust for the addition

                           Subtraction

SUB

SBB

 DEC

CMP

 NEG

AAS

DAS

Subtract byte or word

 Subtract byte or word with borrow

 Decrement byte or word by 1

Compare

 Negate byte or word

 ASCII adjust for subtraction

Decimal adjust for subtraction

 

Subtraction Instruction

• Subtraction Instruction: Includes instructions for extracting source and location, minimizing workspace, and correcting the effect of ASCII and BCD data removal. The 8088 tutorial set includes a comprehensive set of instructions given to use the output.

Multiplication Instruction

• MUL: Perform these tasks with unsigned numbers.

 • MUL: Multiplication radix completes signed numbers.

The result of executing MUL or IMUL commands on byte data can be represented as.

 The 16-bit product is produced in the AX register

 (AX) ← (AL) × (8-bit operand)

32-bit results are provided

(DX, AX) ← (AX) × (16-bit operand)

Where AX contains 16 LSBs and DX contains 16 MSBs.

Division Instruction

• DIV: Perform these tasks with unsigned numbers.

IDIV: Dividing radix fills signed numbers.

• DIV - In an 8-bit divider represented by

(AH), (AL) ← (AX) / (8-bit operand)

Where AH contains residual AL and quotient

IDIV - For 16-bit divisions, we get

 (DX), (AX) ← (DX, AX) / (16-bit operand)

Here AX contains the quotient and DX contains the rest.

Logical operations and Shift Instructions

Logical functions are AND, OR, special-OR, and NOT.

                   Logical operations

NOT

AND

OR

 XOR

TEST

Logical NOT

Logical AND

Logical OR

Exclusive OR

Test

 

String instructions

• Wire Commands: 8088 microprocessor is equipped with special cable handling instructions. With cables, we can access a series of data names (or bytes) that reside in successive memory locations. The address in the SI points to the source object in relation to the current value in the DS, and the destination is defined by the DI content associated with the ES content.

Rope Command Functions: Allow the developer to perform other tasks. Move data from one memory block to another memory location in memory. The second type of operation simplifies scanning a series of data objects stored in memory to determine a specific value. Comparing two cord items to determine whether they are the same or different. Launches a group of consecutive memory locations.

There are five basic string instructions in the 8088 command set:

• MOVSB ​​/ MOVSW: move byte or string of words

• CMPSB / CMPSW: compare cable

• SCASB / SCASW: cable scanner

• LODSB / LODSW: cable load

• STOCK / STOCK: store cord.

The procedure of string instructions:

 When done, the operators are working, the flags are adjusted. Both SI and DI are updated to identify the following items with their thread.

Submit String - MOVSB, MOVSW

• MOVSB ​​/ MOVSW

The cable element defined by the source index (SI) in relation to the current data register (DS) register is moved to the specified location of the arrival index (DI) register in respect of the current additional phase register (ES). Navigation can be done by byte or by name data. After the migration is complete, the content of both SI and DI automatically increases or decreases by 1 by byte and 2 by nominal byte. Address indicators on SI and DI ups and downs, depending on how the flagship (DF) is set.

Control Instructions

• Background: The control flow is related to changing the way the commands are used in the system.

 • The control flow of a decision can cause the sequence of commands to be repeated or the command group to not be used at all.

  Jump instructions are provided in command 8088/8086 set to perform control movement functions. In the 8088 architecture, the code component register and command index to keep track of the next command must change the contents of these registers.

Comments