Part 8: 8086 Microprocessor PIN Configuration and Instruction Set

Microprocessor & Microcontroller | 0 comments

8086 pins configuration

The description of the pins of 8086 is as follows:

Address Data Bus PIN in details:

AD0-AD15 (Address Data Bus): Bidirectional address/data lines. These are low order address bus. They are multiplexed with data. When these lines are used to transmit memory address, the symbol A is used instead of AD, for example, A0- A15.

A16 – A19 (Output): High order address lines. These are multiplexed with status signals.

A16/S3, A17/S4: A16 and A17 are multiplexed with segment identifier signals S3 and S4.

A18/S5: A18 is multiplexed with interrupt status S5.

A19/S6: A19 is multiplexed with status signal S6.

BHE/S7 (Output):

Bus High Enable/Status. During T1, it is low. It enables the data onto the most significant half of data bus, D8-D15. 8-bit device connected to upper half of the data bus use BHE signal. It is multiplexed with status signal S7. S7 signal is available during T3 and T4.

RD (Read):

For read operation. It is an output signal. It is active when LOW. Ready (Input): The addressed memory or I/O sends acknowledgment through this pin. When HIGH, it denotes that the peripheral is ready to transfer data.

RESET (Input): System reset. The signal is active HIGH.

CLK (input): Clock 5, 8 or 10 MHz

INTR: Interrupt Request.

NMI (Input): Non-maskable interrupt request.

TEST (Input): Wait for test control. When goes to LOW the microprocessor continues execution otherwise waits.

VCC: Power supply +5V dc.

GND: Ground.

Operating Modes of 8086

There are two operating modes of operation for Intel 8086, namely the minimum mode and the maximum mode. When only one 8086 CPU is to be used in a microprocessor system, the 8086 is used in the Minimum mode of operation. In a multiprocessor system 8086 operates in the Maximum mode.

Pin Description for Minimum Mode

In this minimum mode of operation, the pin MN/MX is connected to 5V D.C. supply i.e. MN/MX = VCC.

The description about the pins from 24 to 31 for the minimum mode is as follows:

INTA (Output):

 Pin number 24 interrupts acknowledgement. On receiving interrupt signal, the processor issues an interrupt acknowledgment signal. It is active LOW.

ALE (Output):

Pin no. 25. Address latch enable. It goes HIGH during T1. The microprocessor 8086 sends this signal to latch the address into the Intel 8282/8283 latch.

DEN (Output):

Pin no. 26. Data Enable. When Intel 8287/8286 octal bus transceiver is used this signal. It is active LOW.

DT/R (output):

Pin No. 27 data Transmit/Receives. When Intel 8287/8286 octal bus transceiver is used this signal controls the direction of data flow through the transceiver. When it is HIGH, data is sent out. When it is LOW, data is received.

M/IO (Output):

 Pin no. 28, Memory or I/O access. When this signal is HIGH, the CPU wants to access memory. When this signal is LOW, the CPU wants to access I/O device.

WR (Output): Pin no. 29, Write. When this signal is LOW, the CPU performs memory or I/O write operation.

HLDA (Output):

Pin no. 30, Hold Acknowledgment. It is sent by the processor when it receives HOLD signal. It is active HIGH signal. When HOLD is removed HLDA goes LOW.

HOLD (Input):

Pin no. 31, Hold. When another device in microcomputer system wants to use the address and data bus, it sends HOLD request to CPU through this pin. It is an active HIGH signal.

Pin Description for Maximum Mode

In the maximum mode of operation, the pin MN/¯MX is made LOW. It is grounded. The description about the pins from 24 to 31 is as follows:

QS1, QS0 (Output): Pin numbers 24, 25, Instruction Queue Status. Logics are given below:

QS1 QS0 Operation
0 0 No operation
0 1 1st byte of opcode from queue.
1 0 Empty the queue
1 1 Subsequent byte from queue

S0, S1, S2 (Output):

 Pin numbers 26, 27, 28 Status Signals. These signals are connected to the bus controller of Intel 8288. This bus controller generates memory and I/O access control signals. Logics for status signal are given below:

S2 S1 S0 Operation
0 0 0 Interrupt acknowledgement
0 0 1 Read data from I/O port
0 1 0 Write data from I/O port
0 1 1 Halt
1 0 0 Opcode fetch
1 0 1 Memory read
1 1 0 Memory write
1 1 1 Passive state

LOCK (Output):

Pin no. 29. It is an active LOW signal. When this signal is LOW, all interrupts are masked and no HOLD request is granted. In a multiprocessor system all other processors are informed through this signal that they should not ask the CPU for relinquishing the bus control.

RG/GT1, RQ/GT0 (Bidirectional):

Pin numbers 30, 31, Local Bus Priority Control. Other processors ask the CPU by these lines to release the local bus. In the maximum mode of operation signals WR, ALE, DEN, DT/R etc. are not available directly from the processor. These signals are available from the controller 8288.

The 8086 microprocessor supports 8 types of instructions

  1. Data Transfer Instructions
  2. Arithmetic Instructions
  3. Bit Manipulation Instructions
  4. String Instructions
  5. Program Execution Transfer Instructions (Branch & Loop Instructions)
  6. Processor Control Instructions
  7. Iteration Control Instructions
  8. Interrupt Instructions

Data Transfer Instructions:

These instructions are used to transfer the data from the source operand to the destination operand. Following are the list of instructions under this group:

Instruction to transfer a word

MOV: Used to copy the byte or word from the provided source to the provided destination.

PPUSH: Used to put a word at the top of the stack.

POP: Used to get a word from the top of the stack to the provided location.

PUSHA: Used to put all the registers into the stack.

POPA: Used to get words from the stack to all registers.

XCHG: Used to exchange the data from two locations.

XLAT: Used to translate a byte in AL using a table in the memory.

Instructions for input and output port transfer

IN: Used to read a byte or word from the provided port to the accumulator.

OUT: Used to send out a byte or word from the accumulator to the provided port.

Instructions to transfer the address

LEA: Used to load the address of operand into the provided register.

LDS: Used to load DS register and other provided register from the memory

LES: Used to load ES register and other provided register from the memory.

Instructions to transfer flag registers

LAHF: Used to load AH with the low byte of the flag register.

SAHF: Used to store AH register to low byte of the flag register.

PUSHF : Used to copy the flag register at the top of the stack.

POPF: Used to copy a word at the top of the stack to the flag register.

Arithmetic Instructions

These instructions are used to perform arithmetic operations like addition, subtraction, multiplication, division, etc. Following is the list of instructions under this group:

Instructions to perform addition

  • ADD: Used to add the provided byte to byte/word to word.
  • ADC: Used to add with carry.
  • INC: Used to increment the provided byte/word by 1.
  • AAA: Used to adjust ASCII after addition.
  • DAA: Used to adjust the decimal after the addition/subtraction operation.

Instructions to perform subtraction

  • SUB: Used to subtract the byte from byte/word from word.
  • SBB: Used to perform subtraction with borrow.
  • DEC: Used to decrement the provided byte/word by 1.
  • NPG: Used to negate each bit of the provided byte/word and add 1/2’s complement.
  • CMP: Used to compare 2 provided byte/word.
  • AAS: Used to adjust ASCII codes after subtraction.
  • DAS: Used to adjust decimal after subtraction.

Instruction to perform multiplication

  • MUL : Used to multiply unsigned byte by byte/word by word.
  • IMUL: Used to multiply signed byte by byte/word by word.
  • AAM: Used to adjust ASCII codes after multiplication.

Instructions to perform division
DIV − Used to divide the unsigned word by byte or unsigned double word by word.

  •  IDIV − Used to divide the signed word by byte or signed double word by word.
  • AAD − Used to adjust ASCII codes after division.
  • CBW − Used to fill the upper byte of the word with the copies of sign bit of the lower byte.
  • CWD − Used to fill the upper word of the double word with the sign bit of the lower word.

Bit Manipulation Instructions

These instructions are used to perform operations where data bits are involved, i.e. operations like logical, shift, etc.

Following is the list of instructions under this group:

Instructions to perform logical operation

  • NOT − Used to invert each bit of a byte or word.
  • AND − Used for adding each bit in a byte/word with the corresponding bit in another byte/word.
  • OR − Used to multiply each bit in a byte/word with the corresponding bit in another byte/word.
  • XOR − Used to perform Exclusive-OR operation over each bit in a byte/word with the corresponding bit in another byte/word.
  • TEST − Used to add operands to update flags, without affecting operands.

Instructions to perform shift operations

  • SHL/SAL − Used to shift bits of a byte/word towards left and put zero(S) in LSBs.
  • SHR − Used to shift bits of a byte/word towards the right and put zero(S) in MSBs.
  • SAR − Used to shift bits of a byte/word towards the right and copy the old MSB into the new MSB.

Instructions to perform rotate operations

  • ROL − Used to rotate bits of byte/word towards the left, i.e. MSB to LSB and to Carry Flag [CF].
  • ROR − Used to rotate bits of byte/word towards the right, i.e. LSB to MSB and to Carry Flag [CF].
  • RCR − Used to rotate bits of byte/word towards the right, i.e. LSB to CF and CF to MSB.
  • RCL − Used to rotate bits of byte/word towards the left, i.e. MSB to CF and CF to LSB.

String Instructions

String is a group of bytes/words and their memory is always allocated in a sequential order.

Following is the list of instructions under this group:

  • REP − Used to repeat the given instruction till CX ≠ 0.
  • REPE/REPZ − Used to repeat the given instruction until CX = 0 or zero flag ZF = 1.
  • REPNE/REPNZ − Used to repeat the given instruction until CX = 0 or zero flag ZF = 1.
  • MOVS/MOVSB/MOVSW − Used to move the byte/word from one string to another.
  • COMS/COMPSB/COMPSW − Used to compare two string bytes/words.
  • INS/INSB/INSW − Used as an input string/byte/word from the I/O port to the provided memory location.
  • OUTS/OUTSB/OUTSW − Used as an output string/byte/word from the provided memory location to the I/O port.
  • SCAS/SCASB/SCASW − Used to scan a string and compare its byte with a byte in AL or string word with a word in AX.
  • LODS/LODSB/LODSW − Used to store the string byte into AL or string word into AX.

Program Execution Transfer Instructions (Branch and Loop Instructions)

These instructions are used to transfer/branch the instructions during an execution. It includes the following instructions −

Instructions to transfer the instruction during an execution without any condition:

  1. CALL − Used to call a procedure and save their return address to the stack.
  2. RET − Used to return from the procedure to the main program.
  3. JMP − Used to jump to the provided address to proceed to the next instruction.
  4. Instructions to transfer the instruction during an execution with some conditions −
  5. JA/JNBE − Used to jump if above/not below/equal instruction satisfies.
  6. JAE/JNB − Used to jump if above/not below instruction satisfies.
  7. JBE/JNA − Used to jump if below/equal/ not above instruction satisfies.
  8. JC − Used to jump if carry flag CF = 1
  9. JE/JZ − Used to jump if equal/zero flag ZF = 1
  10. JG/JNLE − Used to jump if greater/not less than/equal instruction satisfies.
  11. JGE/JNL − Used to jump if greater than/equal/not less than instruction satisfies.
  12. JL/JNGE − Used to jump if less than/not greater than/equal instruction satisfies.
  13. JLE/JNG − Used to jump if less than/equal/if not greater than instruction satisfies.
  14. JNC − Used to jump if no carry flag (CF = 0)
  15. JNE/JNZ − Used to jump if not equal/zero flag ZF = 0
  16. JNO − Used to jump if no overflow flag OF = 0
  17. JNP/JPO − Used to jump if not parity/parity odd PF = 0
  18. JNS − Used to jump if not sign SF = 0
  19. JO − Used to jump if overflow flag OF = 1
  20. JP/JPE − Used to jump if parity/parity even PF = 1
  21. JS − Used to jump if sign flag SF = 1

Processor Control Instructions

These instructions are used to control the processor action by setting/resetting the flag values.

Following are the instructions under this group:

  1. STC − Used to set carry flag CF to 1
  2. CLC − Used to clear/reset carry flag CF to 0
  3. CMC − Used to put complement at the state of carry flag CF.
  4. STD − Used to set the direction flag DF to 1
  5. CLD − Used to clear/reset the direction flag DF to 0
  6. STI − Used to set the interrupt enable flag to 1, i.e., enable INTR input.
  7. CLI − Used to clear the interrupt enable flag to 0, i.e., disable INTR input.

Iteration Control Instructions

These instructions are used to execute the given instructions for number of times. Following is the list of instructions under this group −

  • LOOP − Used to loop a group of instructions until the condition satisfies, i.e., CX = 0
  • LOOPE/LOOPZ − Used to loop a group of instructions till it satisfies ZF = 1 & CX = 0
  • LOOPNE/LOOPNZ − Used to loop a group of instructions till it satisfies ZF = 0 & CX = 0
  • JCXZ − Used to jump to the provided address if CX = 0

Interrupt Instructions

These instructions are used to call the interrupt during program execution.

  • INT − Used to interrupt the program during execution and calling service specified.
  • INTO − Used to interrupt the program during execution if OF = 1
  • IRET − Used to return from interrupt service to the main program

Laravel – Scopes (3 Easy Steps)

Scoping is one of the superpowers that eloquent grants to developers when querying a model. Scopes allow developers to add constraints to queries for a given model. In simple terms laravel scope is just a query, a query to make the code shorter and faster. We can...

CAMBRIDGE IELTS 17 TEST 3

READING PASSAGE 1: The thylacine Q1. carnivorous keywords: Looked like a dog had series of stripes ate, diet ate an entirely 1 .......................................... diet (2nd paragraph 3rd and 4th line) 1st and 2nd paragraph, 1st  paragraph,resemblance to a...

CAMBRIDGE IELTS 17 TEST 4

PASSAGE 1 Q1 (False) (Many Madagascan forests are being destroyed by attacks from insects.) Madagascar's forests are being converted to agricultural land at a rate of one percent every year. Much of this destruction is fuelled by the cultivation of the country's main...

Cambridge IELTS 16 Test 4

Here we will discuss pros and cons of all the questions of the passage with step by step Solution included Tips and Strategies. Reading Passage 1 –Roman Tunnels IELTS Cambridge 16, Test 4, Academic Reading Module, Reading Passage 1 Questions 1-6. Label the diagrams...

Cambridge IELTS 16 Test 3

Reading Passage 1: Roman Shipbuilding and Navigation, Solution with Answer Key , Reading Passage 1: Roman Shipbuilding and Navigation IELTS Cambridge 16, Test 3, Academic Reading Module Cambridge IELTS 16, Test 3: Reading Passage 1 – Roman Shipbuilding and...

Cambridge IELTS 16 Test 2

Reading Passage 1: The White Horse of Uffington, Solution with Answer Key The White Horse of Uffington IELTS Cambridge 16, Test 2, Academic Reading Module, Reading Passage 1 Cambridge IELTS 16, Test 2: Reading Passage 1 – The White Horse of Uffington...

You may find interest following article

Laravel – Scopes (3 Easy Steps)

Scoping is one of the superpowers that eloquent grants to developers when querying a model. Scopes allow developers to add constraints to queries for a given model. In simple terms laravel scope is just a query, a query to make the code shorter and faster. We can create custom query with relation or anything with scopes. In any admin project we need to get data...

CAMBRIDGE IELTS 17 TEST 3

READING PASSAGE 1: The thylacine Q1. carnivorous keywords: Looked like a dog had series of stripes ate, diet ate an entirely 1 .......................................... diet (2nd paragraph 3rd and 4th line) 1st and 2nd paragraph, 1st  paragraph,resemblance to a dog. … dark brown stripes over its back, beginning at the rear of the body and extending onto the...

CAMBRIDGE IELTS 17 TEST 4

PASSAGE 1 Q1 (False) (Many Madagascan forests are being destroyed by attacks from insects.) Madagascar's forests are being converted to agricultural land at a rate of one percent every year. Much of this destruction is fuelled by the cultivation of the country's main staple crop: rice. And a key reason for this destruction is that insect pests are destroying vast...

Cambridge IELTS 16 Test 4

Here we will discuss pros and cons of all the questions of the passage with step by step Solution included Tips and Strategies. Reading Passage 1 –Roman Tunnels IELTS Cambridge 16, Test 4, Academic Reading Module, Reading Passage 1 Questions 1-6. Label the diagrams below. The Persian Qanat Method 1. ………………………. to direct the tunnelingAnswer: posts – First...

Cambridge IELTS 16 Test 3

Reading Passage 1: Roman Shipbuilding and Navigation, Solution with Answer Key , Reading Passage 1: Roman Shipbuilding and Navigation IELTS Cambridge 16, Test 3, Academic Reading Module Cambridge IELTS 16, Test 3: Reading Passage 1 – Roman Shipbuilding and Navigation with Answer Key. Here we will discuss pros and cons of all the questions of the...

Cambridge IELTS 16 Test 2

Reading Passage 1: The White Horse of Uffington, Solution with Answer Key The White Horse of Uffington IELTS Cambridge 16, Test 2, Academic Reading Module, Reading Passage 1 Cambridge IELTS 16, Test 2: Reading Passage 1 – The White Horse of Uffington  with Answer Key. Here we will discuss pros and cons of all the questions of the passage with...

Cambridge IELTS 16 Test 1

Cambridge IELTS 16, Test 1, Reading Passage 1: Why We Need to Protect Bolar Bears, Solution with Answer Key Cambridge IELTS 16, Test 1: Reading Passage 1 – Why We Need to Protect Bolar Bears with Answer Key. Here we will discuss pros and cons of all the questions of the passage with step by step...

Cambridge IELTS 15 Reading Test 4 Answers

PASSAGE 1: THE RETURN OF THE HUARANGO QUESTIONS 1-5: COMPLETE THE NOTES BELOW. 1. Answer: water Key words:  access, deep, surface Paragraph 2 provides information on the role of the huarango tree: “it could reach deep water sources”. So the answer is ‘water’. access = reach Answer: water. 2. Answer: diet Key words: crucial,...

Cambridge IELTS 15 Reading Test 3 Answers

PASSAGE 1: HENRY MOORE (1898 – 1986 ) QUESTIONS 1-7: DO THE FOLLOWING STATEMENTS AGREE WITH THE INFORMATION GIVEN IN READING PASSAGE 1? 1. Answer: TRUE Key words: leaving school, Moore, did, father, wanted It is mentioned in the first paragraph that “After leaving school, Moore hoped to become a sculptor, but instead he complied with his father’s...

Cambridge IELTS 15 Reading Test 2 Answers 

PASSAGE 1: COULD URBAN ENGINEERS LEARN FROM DANCE ?  QUESTIONS 1- 6: READING PASSAGE 1 HAS SEVEN PARAGRAPHS, A-G. 1. Answer: B Key words: way of using dance, not proposing By using the skimming and scanning technique, we would find that before going into details about how engineers can learn from dance, the author first briefly mentions ways of...

Cambridge IELTS 15 Reading Test 1 Answers

PASSAGE 1: NUTMEG – A VALUABLE SPICE QUESTIONS 1- 4: COMPLETE THE NOTES BELOW.CHOOSE ONE WORD ONLY FROM THE PASSAGE FOR EACH ANSWER.WRITE YOUR ANSWER IN BOXES 1-8 ON YOUR ANSWER SHEET. 1. Answer: oval Key words: leaves, shape Using the scanning skill, we can see that the first paragraph describes the characteristics of the tree in detail, including...

CAMBRIDGE IELTS 14 READING TEST 4 ANSWERS 

PASSAGE 1: THE SECRET OF STAYING YOUNG QUESTIONS 1-8: COMPLETE THE NOTES BELOW. 1. ANSWER: FOUR / 4 Explain– Key words: focused age groups, ants– In paragraph 3, it is stated that “Giraldo focused on ants at four age ranges”,so the answer must be “four/4”. 2. ANSWER: YOUNG Explain– Key words: how well, ants, looked after– The first sentence of...

CAMBRIDGE IELTS 14 READING TEST 3 ANSWERS

PASSAGE 1: THE CONCEPT OF INTELLIGENCE QUESTIONS 1-3: READING PASSAGE 1 HAS SIX PARAGRAPHS, A-F. 1. ANSWER: B Explain ·     Key words: non-scientists, assumptions, intelligence, influence, behavior ·    People‟s behavior towards others‟ intelligence is mentioned in the first sentence of paragraph B: “implicit theories of...

CAMBRIDGE IELTS 14 READING TEST 2 ANSWERS

Cambridge IELTS 14 is the latest IELTS exam preparation.https://draftsbook.com/ will help you to answer all questions in cambridge ielts 14 reading test 2 with detail explanations. PASSAGE 1: ALEXANDER HENDERSON (1831-1913) QUESTIONS 1-8: DO THE FOLLOWING STATEMENTS AGREE WITH THE INFORMATION GIVEN IN READING PASSAGE 1? 1. ANSWER: FALSE Explain Henderson rarely...

Cambridge IELTS 14 Reading Test 1 Answers

Cambridge IELTS 14 is the latest IELTS exam preparation.https://draftsbook.com/ will help you to answer all questions in cambridge ielts 14 reading test 1 with detail explanations. PASSAGE 1: THE IMPORTANCE OF CHILDREN’S PLAY QUESTIONS 1-8: COMPLETE THE NOTES BELOW. 1. ANSWER: CREATIVITY Explain building a “magical kingdom” may help develop … – Key words: magical...

Cambridge IELTS 13 Reading Test 4 Answers 

PASSAGE 1: CUTTY SARK: THE FASTEST SAILING SHIP OF ALL TIME QUESTIONS 1-8: DO THE FOLLOWING STATEMENTS AGREE WITH THE INFORMATION GIVEN IN READING PASSAGE 1? 1. CLIPPERS WERE ORIGINALLY INTENDED TO BE USED AS PASSENGER SHIPS Key words: clippers, originally, passengerAt the beginning of paragraph 2, we find the statement: “The fastest commercial sailing...

 Cambridge IELTS 13 Reading Test 3 Answers

Cambridge IELTS 13 is the latest IELTS exam preparation.https://draftsbook.com/ will help you to answer all questions in cambridge ielts 13 reading test 3 with detail explanations. PASSAGE 1: THE COCONUT PALM QUESTIONS 1-8: COMPLETE THE TABLE BELOW. 1.TRUNK – TIMBER FOR HOUSES AND THE MAKING OF………. Key words: trunk, timber, houses, makingLooking for...

Cambridge IELTS 13 Reading Test 2 Answers

Cambridge IELTS 13 is the latest IELTS exam preparation.https://draftsbook.com/ will help you to answer all questions in cambridge ielts 13 reading test 2 with detail explanations. PASSAGE 1: BRINGING CINNAMON TO EUROPE QUESTIONS 1-9: COMPLETE THE NOTES BELOW.CHOOSE ONE WORD ONLY FROM THE PASSAGE FOR EACH ANSWER. 1. BIBLICAL TIMES: ADDED TO……………...

Cambridge IELTS 13 Reading Test 1 Answers

Cambridge IELTS 13 is the latest IELTS exam preparation.https://draftsbook.com/ will help you to answer all questions in cambridge ielts 13 reading test 1 with detail explanations. QUESTIONS 1-7: COMPLETE THE TABLE BELOW.CHOOSE ONE WORD ONLY FROM THE PASSAGE FOR EACH ANSWER. 1. allowed businesses to………information regularly Key words: businesses,...

CAMBRIDGE IELTS 12 READING TEST 4 ANSWERS

Cambridge IELTS 12 is the latest IELTS exam preparation.https://draftsbook.com/ will help you to answer all questions in cambridge ielts 12 reading test 4 with detail explanations. 1. obsidian Question: Early humans used a material called 1…………. to make the sharp points of their 2…………… Key words: early humans, sharp points In the first paragraph, the author...