Instruction Set Of 8086 - Computer Science Engineering (CSE) PDF Download

INSTRUCTION SET OF 8086

The Instruction set of 8086 microprocessor is classified into 7, they are:-·

  • Data transfer instructions
  • Arithmetic& logical instructions
  • Program control transfer instructions
  • Machine Control Instructions
  • Shift / rotate instructions
  • Flag manipulation instructions
  • String instructions

Data Transfer instructions

Data transfer instruction, as the name suggests is for the transfer of data from memory to internal register, from internal register to memory, from one register to another register, from input port to internal register, from internal register to output port etc

1. MOV instruction
             It is a general purpose instruction to transfer byte or word from register to register, memory to register, register to memory or with immediate addressing.
General Form:

MOV destination, source

Here the source and destination needs to be of the same size, that is both 8 bit or both 16 bit.

MOV instruction does not affect any flags.

Example:-

MOV BX, 00F2H ; load the immediate number 00F2H in BX register

MOV CL, [2000H] ; Copy the 8 bit content of the memory location, at a displacement of 2000H from data segment base to the CL register

MOV [589H], BX ; Copy the 16 bit content of BX register on to the memory location, which at a displacement of 589H from the data segment base.

MOV DS, CX ; Move the content of CX to DS

2. PUSH instruction

The PUSH instruction decrements the stack pointer by two and copies the word from source to the location where stack pointer now points. Here the source must of word size data. Source can be a general purpose register, segment register or a memory location.

The PUSH instruction first pushes the most significant byte to sp-1, then the least significant to the sp-2.

Push instruction does not affect any flags.

Instruction Set Of 8086 - Computer Science Engineering (CSE)

Example:-

PUSH CX ; Decrements SP by 2, copy content of CX to the stack (figure shows execution of this instruction)

PUSH DS ; Decrement SP by 2 and copy DS to stack

3. POP instruction

The POP instruction copies a word from the stack location pointed by the stack pointer to the destination. The destination can be a General purpose register, a segment register or a memory location. Here after the content is copied the stack pointer is automatically incremented by two.

The execution pattern is similar to that of the PUSH instruction.

Example: POP CX ; Copy a word from the top of the stack to CX and increment SP by 2.

4. IN & OUT instructions

The IN instruction will copy data from a port to the accumulator. If 8 bit is read the data will go to AL and if 16 bit then to AX. Similarly OUT instruction is used to copy data from accumulator to an output port.

Both IN and OUT instructions can be done using direct and indirect addressing modes.

Example:

IN AL, 0F8H ; Copy a byte from the port 0F8H to AL

MOV DX, 30F8H ; Copy port address in DX

IN AL, DX ; Move 8 bit data from 30F8H port

IN AX, DX ; Move 16 bit data from 30F8H port

OUT 047H, AL ; Copy contents of AL to 8 bit port 047H

MOV DX, 30F8H ; Copy port address in DX

OUT DX, AL ; Move 8 bit data to the 30F8H port

OUT DX, AX ; Move 16 bit data to the 30F8H port

5. XCHG instruction

The XCHG instruction exchanges contents of the destination and source.
Here destination and source can be register and register or register and memory location, but XCHG cannot interchange the value of 2 memory locations.

General Format

XCHG Destination, Source

Example:

XCHG BX, CX ; exchange word in CX with the word in BX

XCHG AL, CL exchange byte in CL with the byte in AL

XCHG AX, SUM[BX] ; here physical address, which is DS+SUM+[BX].
The content at physical address and the content of AX are interchanged.

 

 

The document Instruction Set Of 8086 - Computer Science Engineering (CSE) is a part of Computer Science Engineering (CSE) category.
All you need of Computer Science Engineering (CSE) at this link: Computer Science Engineering (CSE)
Are you preparing for Computer Science Engineering (CSE) Exam? Then you should check out the best video lectures, notes, free mock test series, crash course and much more provided by EduRev. You also get your detailed analysis and report cards along with 24x7 doubt solving for you to excel in Computer Science Engineering (CSE) exam. So join EduRev now and revolutionise the way you learn!
Sign up for Free Download App for Free

FAQs on Instruction Set Of 8086 - Computer Science Engineering (CSE)

1. What is the instruction set of the 8086 processor?
Ans. The instruction set of the 8086 processor is a collection of machine language instructions that can be executed by the 8086 microprocessor. It includes a wide range of operations such as data movement, arithmetic and logical operations, branching, and control transfer instructions.
2. How many instructions are there in the 8086 instruction set?
Ans. The 8086 instruction set consists of approximately 200 instructions. These instructions are categorized into different groups based on their functionality, such as data transfer, arithmetic and logical operations, string operations, control transfer, and input/output operations.
3. Can the 8086 processor execute instructions from the 8088 instruction set?
Ans. Yes, the 8086 processor can execute instructions from the 8088 instruction set. The 8088 is a variant of the 8086 processor with an 8-bit external data bus instead of a 16-bit bus. The 8086 processor is designed to be backward compatible with the 8088, allowing it to execute the same set of instructions.
4. Are there any limitations or restrictions in the 8086 instruction set?
Ans. Yes, there are some limitations in the 8086 instruction set. One major limitation is the maximum addressable memory. The 8086 processor can address up to 1 MB of memory, which means it cannot directly access or execute instructions beyond this limit. Additionally, certain instructions may have specific limitations, such as the size of operands they can operate on or the addressing modes they support.
5. Can the 8086 instruction set be extended or modified?
Ans. Yes, the 8086 instruction set can be extended or modified. Intel has released subsequent processors with enhanced instruction sets, such as the 80286, 80386, and so on. These processors introduced new instructions and expanded the capabilities of the original 8086 instruction set. Additionally, software developers can create their own instructions using assembly language or higher-level programming languages, but these custom instructions would require appropriate support from the underlying hardware.
Download as PDF
Related Searches

Instruction Set Of 8086 - Computer Science Engineering (CSE)

,

past year papers

,

Semester Notes

,

ppt

,

Objective type Questions

,

Sample Paper

,

Important questions

,

Viva Questions

,

mock tests for examination

,

Previous Year Questions with Solutions

,

shortcuts and tricks

,

MCQs

,

Instruction Set Of 8086 - Computer Science Engineering (CSE)

,

Exam

,

video lectures

,

Free

,

Extra Questions

,

pdf

,

study material

,

practice quizzes

,

Summary

,

Instruction Set Of 8086 - Computer Science Engineering (CSE)

;