What are the multipurpose registers in 8086 microprocessor? What are the advantages of memory segmentation of 8086 microprocessor?

Similar documents
8086 Microprocessor (cont..)

MICROPROCESSOR BCA IV Sem MULTIPLE CHOICE QUESTIONS

MICROPROCESSOR AND MICROCOMPUTER BASICS

MICROPROCESSOR. Exclusive for IACE Students iacehyd.blogspot.in Ph: /422 Page 1

Microprocessor & Assembly Language

The x86 PC: Assembly Language, Design, and Interfacing 5 th Edition

DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING Question Bank Subject Name: EC Microprocessor & Microcontroller Year/Sem : II/IV

Faculty of Engineering Student Number:

Advanced Computer Architecture-CS501. Computer Systems Design and Architecture 2.1, 2.2, 3.2

PART B QUESTIONS AND ANSWERS UNIT I

MACHINE ARCHITECTURE & LANGUAGE

8085 INSTRUCTION SET

(Refer Slide Time: 00:01:16 min)

CHAPTER 6 TASK MANAGEMENT

Overview. CISC Developments. RISC Designs. CISC Designs. VAX: Addressing Modes. Digital VAX

ASSEMBLY PROGRAMMING ON A VIRTUAL COMPUTER

Interrupts. 1.Maskable interrupt request can be ignored or delayed by the microprocessor and used in telephone

BCD (ASCII) Arithmetic. Where and Why is BCD used? Packed BCD, ASCII, Unpacked BCD. BCD Adjustment Instructions AAA. Example

CHAPTER 7: The CPU and Memory

LSN 2 Computer Processors

Microcontroller Basics A microcontroller is a small, low-cost computer-on-a-chip which usually includes:

8051 hardware summary

Complete 8086 instruction set

TIMING DIAGRAM O 8085

Z80 Microprocessors Z80 CPU. User Manual UM Copyright 2014 Zilog, Inc. All rights reserved.

An Introduction to the ARM 7 Architecture

Z80 Instruction Set. Z80 Assembly Language

8-Bit Flash Microcontroller for Smart Cards. AT89SCXXXXA Summary. Features. Description. Complete datasheet available under NDA

An Overview of Stack Architecture and the PSC 1000 Microprocessor

Outline. Lecture 3. Basics. Logical vs. physical memory physical memory. x86 byte ordering

1 Classical Universal Computer 3

PROBLEMS (Cap. 4 - Istruzioni macchina)

Exception and Interrupt Handling in ARM

Systems Design & Programming Data Movement Instructions. Intel Assembly

Traditional IBM Mainframe Operating Principles

Computer Organization and Architecture

Chapter 1 Computer System Overview

Intel 8086 architecture

Computer Organization. and Instruction Execution. August 22

Exceptions in MIPS. know the exception mechanism in MIPS be able to write a simple exception handler for a MIPS machine

Chapter 5 Instructor's Manual

a storage location directly on the CPU, used for temporary storage of small amounts of data during processing.

Unpacked BCD Arithmetic. BCD (ASCII) Arithmetic. Where and Why is BCD used? From the SQL Server Manual. Packed BCD, ASCII, Unpacked BCD

Chapter 4 Lecture 5 The Microarchitecture Level Integer JAVA Virtual Machine

Instruction Set Architecture (ISA)

Chapter 5, The Instruction Set Architecture Level

Lesson-16: Real time clock DEVICES AND COMMUNICATION BUSES FOR DEVICES NETWORK

ADVANCED PROCESSOR ARCHITECTURES AND MEMORY ORGANISATION Lesson-17: Memory organisation, and types of memory

Flash Microcontroller. Memory Organization. Memory Organization

Serial Communications

Z80 Family. CPU User Manual

MACHINE INSTRUCTIONS AND PROGRAMS

Keil C51 Cross Compiler

Instruction Set Architecture

A s we saw in Chapter 4, a CPU contains three main sections: the register section,

Introduction to Microcontrollers

Central Processing Unit (CPU)

İSTANBUL AYDIN UNIVERSITY

A single register, called the accumulator, stores the. operand before the operation, and stores the result. Add y # add y from memory to the acc

Writing an 8086 emulator in Python

1. Computer System Structure and Components

Comp 255Q - 1M: Computer Organization Lab #3 - Machine Language Programs for the PDP-8

Chapter 13. PIC Family Microcontroller

Instruction Set Architecture. or How to talk to computers if you aren t in Star Trek

Keil Debugger Tutorial

CHAPTER 4 MARIE: An Introduction to a Simple Computer

Instruction Set Design

Chapter 2 Logic Gates and Introduction to Computer Architecture

Application Note 195. ARM11 performance monitor unit. Document number: ARM DAI 195B Issued: 15th February, 2008 Copyright ARM Limited 2007

Operating Systems. Virtual Memory

Central Processing Unit

Introduction. What is an Operating System?

Computer Systems Design and Architecture by V. Heuring and H. Jordan

How to design and implement firmware for embedded systems

DAC Digital To Analog Converter

S7 for Windows S7-300/400

OVERVIEW OF MICROPROCESSORS

CHAPTER 6: Computer System Organisation 1. The Computer System's Primary Functions

COMPUTERS ORGANIZATION 2ND YEAR COMPUTE SCIENCE MANAGEMENT ENGINEERING UNIT 5 INPUT/OUTPUT UNIT JOSÉ GARCÍA RODRÍGUEZ JOSÉ ANTONIO SERRA PÉREZ

CS101 Lecture 26: Low Level Programming. John Magee 30 July 2013 Some material copyright Jones and Bartlett. Overview/Questions

GUJARAT TECHNOLOGICAL UNIVERSITY, AHMEDABAD, GUJARAT. COURSE CURRICULUM COURSE TITLE: COMPUTER ORGANIZATION AND ARCHITECTURE (Code: )

CSC 2405: Computer Systems II

Using Debug 1 INTRODUCING DEBUG

AVR151: Setup and Use of the SPI. Introduction. Features. Atmel AVR 8-bit Microcontroller APPLICATION NOTE

THE UNIVERSITY OF AUCKLAND

Data Cables. Schmitt TTL LABORATORY ELECTRONICS II

Chapter 2 Basic Structure of Computers. Jin-Fu Li Department of Electrical Engineering National Central University Jungli, Taiwan

Computer Organization and Assembly Language

PROGRAMMABLE LOGIC CONTROLLERS Unit code: A/601/1625 QCF level: 4 Credit value: 15 TUTORIAL OUTCOME 2 Part 1

21152 PCI-to-PCI Bridge

How It All Works. Other M68000 Updates. Basic Control Signals. Basic Control Signals

The AVR Microcontroller and C Compiler Co-Design Dr. Gaute Myklebust ATMEL Corporation ATMEL Development Center, Trondheim, Norway

IA-32 Intel Architecture Software Developer s Manual

1 The Java Virtual Machine

Computer organization

ARM Thumb Microcontrollers. Application Note. Software ISO 7816 I/O Line Implementation. Features. Introduction

EE361: Digital Computer Organization Course Syllabus

Introduction to Embedded Systems. Software Update Problem

M6800. Assembly Language Programming

Programing the Microprocessor in C Microprocessor System Design and Interfacing ECE 362

Transcription:

What are the multipurpose registers in 8086 microprocessor? 8086 has four multipurpose registers. 1. AX (Accumulator Register) 2. BX (Base Register) 3. CX (Count Register) 4. DX (Data Register) What are the advantages of memory segmentation of 8086 microprocessor? Segmented memory allowed a bigger memory model than would otherwise be possible with a 16- bit processor. In effect, the physical address is found by shifting the segment by four and adding the 16-bit address. This gives a 20-bit address space. If you know that your data, code, and stack are each going to fit into 64 kilobytes, then it is possible to set up the segment registers and leave them alone, relying on the pointer registers to access memory with 16 bit values and no explicit references to the segment registers. Why you Use Memory Segmentation in 8086 Microprocessor? Memory segmentation in the 8086/8088 is used to allow the processor to access more than 64kb of memory, even though it is only a 16-bit processor. Each segment register allows access to one of 64k 64kb segments, each overlapping by 16 bytes, with the total addressability being 1mb. Explain the function of BIU and EU in 8086? BIU stands for bus interface unit and EU stands for execution unit. In 8086 microprocessor BIU fetches the instructions and places in the queue. The EU executes the fetched instruction and places the result in the registers Explain the use of Code Segment CS and data segment DS register in 8086 microprocessor? Code segment (CS) is a 16-bit register containing address of 64 KB segment with processor instructions. The processor uses CS segment for all accesses to instructions referenced by instruction pointer (IP) register. CS register cannot be changed directly. The CS register is automatically updated during far jump, far call and far return instructions. Data segment (DS) is a 16-bit register containing address of 64KB segment with program data. By default, the processor assumes that all data referenced by general registers (AX, BX, CX, DX) and index register (SI, DI) is located in the data segment. DS register can be changed directly using POP and LDS instructions. What are index register and segment register? A segment register is a register that contains the base address, or something related to the base address, of a region of memory. In the 8086/8088, the four segment registers are multiplied by 16 and added to the effective address to form the physical address.

An index register, on the other hand, is a register that contains an address that is added to another address to form the effective address. In the 8086/8088, four address components are involved; 1.) the displacement contained within the instruction, often called the offset, 2.) a base address specified by the r/m field, often the BP or BX register, 3.) an index address specified by the r/m field, often the SI or DI register, and 4.) the segment address specified by context or by a segment override prefix, often the CS, DS, SS, or ES register. What is the complete explanation about segment register? A segment register contains a biased address which is used to calculate the physical address of a memory reference. The physical address calculation is... A PHYSICAL = A SEGMENT * 16 + A LOGICAL... where the logical address is the effective address generated by the CPU instruction, also called the offset address. There are four segment registers, CS, SS, DS, and ES, standing for Code Segment, Stack Segment, Data Segment, and Extra Segment. Each is 16 bits in size, and is selected either in context of the particular operation or by use of a segment override prefix instruction. Normally, CS is used for code, SS is used for stack operations (including BP relative calculations), DS is used for data, and ES is used as the second operand in certain repeated string operations. Since the segment register is 16 bits in size, and the offset (logical) address is also 16 bits in size, the effective range of the physical address is 20 bits, or one megabyte. This is due to the segment address being multiplied by 16, i.e. left shifted by 4. This is called a segmented architecture, and allows for single instruction access to 64 KB of data at any one time. With two instructions, however, you can get to any of 1MB of data. Note that this is not the same as virtual addressing. The 8086/8088 does not provide virtual (or protected) addressing. What is the use of the extra segment in a 8086 processor? Extra segment is a 16-bit register containing address of 64KB segment, usually with program data. By default, the processor assumes that the DI register points to the ES segment in string manipulation instructions. ES register can be changed directly using POP and LES instructions. It is possible to change default segments used by general and index registers by prefixing instructions with a CS, SS, DS or ES prefix. Why 8086 takes two cycles to fetch the data from odd address? The 8086 takes two cycles to fetch words from an odd address because the Bus Interface Unit (BIU) actually only deals with words, which are two bytes at an even address. If you perform an operation on a byte, the BIU will do a word operation, but it will leave the other byte alone.

If you perform a word operation at an even address, the BIU can do the operation in one cycle. If the word, however, is at an odd address, the BIU must use two cycles, leaving the respective "other" byte alone in each case. For performance sake, always align your data with the bus design. Explain stack structure of 8086? The stack in the 8086/8088 microprocessor, like that in many microprocessors, is a region of memory that can store information for later retrieval. It is called a stack, because you "stack" things on it. The philosophy is that you retrieve (pop) things in the opposite order of storing (push) them. In the 8086/8088, the stack pointer is SS:SP, which is a 16 bit pointer into a 20 bit address space. It, at any point of time, points to the last item pushed on the stack. If the stack is empty, it points to the highest address of the stack plus one. In a push operation, the SP register is decremented by two, and the data to be pushed is stored at that address, low order byte first. In a pop operation, the data to be popped is retrieved from that address, again low order byte first, and then the SP register is incremented by two. Some instructions, such as a FAR CALL, or FAR RETURN push or pop more than two bytes on the stack. It is also possible to allocate temporary storage on the stack. You simply decrement the SP register by some amount, use that memory, and then increment the SP register to release the memory. This is known as a stack frame. In fact, the BP register makes is very easy to do so. You use BP to separate arguments from local data - arguments will be above BP, and local data will be below BP. Memory reference instructions that are relative to BP, i.e. [BP+6] or [BP-48] will automatically use the SS segment register. Why are there two ground pins on the 8086 microprocessor? There are two grounds in the 8086 microprocessor in order the split the load of all of the possible output pins that can pull to ground. Splitting the load between two pins cuts the possible current draw on each pin by one half. It is not necessary to also split Vcc because the TTL interface does not require as high a pull up current as it does a pull down current. 1. What are the flags in 8086? Ans:- In 8086 Carry flag, Parity flag, Auxiliary carry flag, Zero flag, Overflow flag, Trace flag, Interrupt flag, Direction flag, and Sign flag. 2. What are the various interrupts in 8086? Ans:- Maskable interrupts, Non-Maskable interrupts.

3. What is meant by Maskable interrupts? Ans:- An interrupt that can be turned off by the programmer is known as Maskable interrupt. 4. What is Non-Maskable interrupts? Ans:- An interrupt which can be never be turned off (ie.disabled) is known as Non-Maskable interrupt. 5. Which interrupts are generally used for critical events? Ans:- Non-Maskable interrupts are used in critical events. Such as Power failure, Emergency, Shut off etc., 6. Give examples for Maskable interrupts? Ans:- RST 7.5, RST6.5, RST5.5 are Maskable interrupts 7. Give example for Non-Maskable interrupts? Ans:- Trap is known as Non-Maskable interrupts, which is used in emergency condition. 8. What is the Maximum clock frequency in 8086? Ans:- 5 Mhz is the Maximum clock frequency in 8086. 9. What are the various segment registers in 8086? Ans:- Code, Data, Stack, Extra Segment registers in 8086. 10. Which Stack is used in 8086? Ans:- FIFO (First In First Out) stack is used in 8086.In this type of Stack the first stored information is retrieved first. 11. What are the address lines for the software interrupts? - Ans:- RST 0 RST 1 RST 2 RST 3 RST 4 RST 5 RST 6 RST 7 0000 H 0008 H 0010 H 0018H 0020 H 0028 H 0030 H 0038 H 12. What is SIM and RIM instructions? Ans:- SIM is Set Interrupt Mask. Used to mask the hardware interrupts. RIM is Read Interrupt Mask. Used to check whether the interrupt is Masked or not. 13. Which is the tool used to connect the user and the computer? Ans:- Interpreter is the tool used to connect the user and the tool. 14. What is the position of the Stack Pointer after the PUSH instruction? Ans:- The address line is 02 less than the earlier value. 15. What is the position of the Stack Pointer after the POP instruction? Ans:- The address line is 02 greater than the earlier value. 16. Logic calculations are done in which type of registers? Ans:- Accumulator is the register in which Arithmetic and Logic calculations are done. 17. What are the different functional units in 8086? Ans:- Bus Interface Unit and Execution unit, are the two different functional units in 8086. 18. Give examples for Micro controller? Ans:- Z80, Intel MSC51 &96, Motorola are the best examples of Microcontroller. 19. What is meant by cross-compiler? Ans:- A program runs on one machine and executes on another is called as cross-compiler. 20. What are the address lines for the hardware interrupts? Ans:- RST7.5 RST6.5 RST5.5 TRAP

003CH 0030H 002CH 0024H 21. Which Segment is used to store interrupt and subroutine return address registers? Ans:- Stack Segment in segment register is used to store interrupt and subroutine return address registers. 22. Which Flags can be set or reset by the programmer and also used to control the operation of the processor? Ans:- Trace Flag, Interrupt Flag, Direction Flag. 23. What does EU do? Ans:- Execution Unit receives program instruction codes and data from BIU, executes these instructions and store the result in general registers. 24. Which microprocessor accepts the program written for 8086 without any changes? Ans:- 8088 is that processor. 25. What is the difference between 8086 and 8088? Ans:- The BIU in 8088 is 8-bit data bus & 16- bit in 8086.Instruction queue is 4 byte long in 8088and 6 byte in 8086 26. Define pipelining? Ans: In 8086, to speedup the execution of program, the instructions fetching and execution of instructions are overlapped each other. This technique is known as pipelining. In pipelining, when the n th instruction is executed, the n+1 th instruction is fetched and thus the processing speed is increased. 27. Discuss the function of instruction queue in 8086? Ans: In 8086, a 6-byte instruction queue is presented at the Bus Interface Unit (BIU). It is used to prefetch and store at the maximum of 6 bytes of instruction code from the memory. Due to this, overlapping instruction fetch with instruction execution increases the processing speed. 28. What is the maximum memory size that can be addressed by 8086? Ans: In 8086, an memory location is addressed by 20 bit address and the address bus is 20 bit address and the address bus is 20 bits. So it can address up to one mega byte (2^20) of memory space. 29. What is the function of the signal in 8086? Ans: BHE signal means Bus High Enable signal. The BHE signal is made low when there is some read or write operation is carried out. ie. When ever the data bus of the system is busy i.e. whenever there is some data transfer then the BHE signal is made low. 30. What are the predefined interrupts in 8086? Ans: The various predefined interrupts are, DIVISION BY ZERO -- (type 0) Interrupt. SINGLE STEP -- (type 1) Interrupt. NONMASKABLE -- (type2) Interrupt. BREAK POINT -- (type 3) Interrupt. OVER FLOW -- (type 4) Interrupt. 31. What are the different flag available in status register of 8086? Ans: There are 6 one bit flags are present. They are, AF - Auxiliary Carry Flag; CF - Carry Flag; OF - Overflow Flag; SF - Sign Flag; PF - Parity Flag; ZF - Zero Flag 32. List the various addressing modes present in 8086? Ans: There are 12 addressing modes present in 8086. They are, (a) Register and immediate addressing modes Register addressing modes

Immediate addressing mode (b) Memory addressing modes. Direct addressing modes Register indirect addressing modes Based addressing modes Indexed addressing modes Based Indexed addressing modes String addressing modes (c) I/O addressing modes Direct addressing mode; Indirect addressing mode (d) Relative addressing mode; (e) Implied addressing mode 33. How single stepping can be done in 8086? Ans: By setting the Trace Flag (TF) the 8086 goes to single-step mode. In this mode, after the execution of each instruction s 8086 generates an internal interrupt and by writing some interrupt service routine we can display the content of desired registers and memory locations. So it is useful for debugging the program. 34. State the significance of LOCK signal in 8086? Ans: If 8086 is working at maximum mode, there are multiprocessors are present. If the system bus is given to a processor then the LOCK signal is made low. That means the system bus is busy and it cannot be given of any other processors. After the use of the system bus again the LOCK signal is made high. That means it is ready to give the system bus to any processor. 35. What are the functions of bus interface unit (BIU) in 8086? Ans: (a) Fetch instructions from memory. (b) Fetch data from memory and I/O ports. (c) Write data to memory and I/O ports. (d) To communicate with outside world. (e) Provide external bus operations and bus control signals. 36. What is the clock frequency of 8086? Ans: Microprocessor 8086 8086-2 8086-4 Internal clock Frequency External Clock Frequency 5 MHz 8MHz 4MHz 15MHZ 24MHZ 12MHZ 37. What are the two modes of operations present in 8086? Ans: i. Minimum mode (or) Uniprocessor system ii. Maximum mode (or) Multiprocessor system 38. Explain the process control instructions Ans: STC It sets the carry flag & does not affect any other flag CLC It resets the carry flag to zero &does not affect any other flag CMC It complements the carry flag & does not affect any other flag STD It sets the direction flag to 1 so that SI and/or DI can be decremented automatically after execution of string instruction & does not affect other flags

CLD It resets the direction flag to 0 so that SI and/or DI can be incremented automatically after execution of string instruction & does not affect other flags STI Sets the interrupt flag to 1. Enables INTR of 8086. CLI Resets the interrupt flagto0. 8086 will not respond to INTR. 39. Explain REPEAT-UNTIL statements Ans: REPEAT-UNTIL statements allow executing a series of instructions repeatedly until some condition occurs. The REPEAT defines the start of the loop & UNTIL the end of the loop. UNTIL has a condition when the condition is true the loop is terminated. 40. What is the purpose of segment registers in 8086? Ans: There are 4 segment registers present in 8086. They are 1. Code Segment (CS ) register - The code segment register gives the address of the current code segment. ie. It will points out where the instructions, to be executed, are stored in the memory. 2. Data Segment (DS ) register - The data segment register points out where the operands are stored in the memory. 3. Stack Segment (SS ) register - The stack segment registers points out the address of the current stack, which is used to store the temporary results. 4. Extra Segment (ES ) register - If the amount of data used is more the Extra segment register points out where the large amount of data is stored in the memory. 41. What are the three classifications of 8086 interrupts? Ans: (1) Predefined interrupts (2) User defined Hardware interrupts (3) User defined software interrupts. S4 S3 Functions S4 S3 Functions 0 0 0 1 I/O from extra segment I/O from Stack Segment 1 0 I/O from Code segment 1 1 I/O from Data segment Ans: 42. What are the functions of status pins in 8086? S2 S1 S0 Functions S2 S1 S0 Functions 0 0 0 Interrupt acknowledge 1 0 0 Code access 0 0 1 Read I/O 1 0 1 Read memory 0 1 0 Write I/O 1 1 0 Write memory 0 1 1 Halt 1 1 1 inactive S5 --Status of interrupt enable flag; S6 --Hold acknowledge for system bus; S7 --Address transfer.