100% found this document useful (1 vote)
2K views14 pages

MIC Solved Questions Bank

The document discusses the architecture and components of the 8086 microprocessor. It provides details on: 1) The functions of pins like DT/R, Ready, INTR, and IO/M. 2) How single stepping is implemented using the Trap Flag. 3) The concept and advantages of pipelining instructions in the 8086. 4) The role of the Bus Interface Unit in fetching and queuing instructions.

Uploaded by

Advait kamthekar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (1 vote)
2K views14 pages

MIC Solved Questions Bank

The document discusses the architecture and components of the 8086 microprocessor. It provides details on: 1) The functions of pins like DT/R, Ready, INTR, and IO/M. 2) How single stepping is implemented using the Trap Flag. 3) The concept and advantages of pipelining instructions in the 8086. 4) The role of the Bus Interface Unit in fetching and queuing instructions.

Uploaded by

Advait kamthekar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 14

MIC (22415)

1. State the function of 1) DT / R 2) Ready 3) INTR 4) M/Io

Ans. 1) DT/R : Data Transmit/Receive. This pin is required in minimum


systems, that want to use an 8286 or 8287 data bus transceiver. The direction
of data flow is controlled through the transceiver.

2) READY : This is the acknowledgement from the memory or slow device that
they have completed the data transfer. The signal made available by the
devices is synchronized by the 8284A clock generator to provide ready input to
the microprocessor. The signal is active high(1).

3) INTR : Interrupt Request. This is triggered input. This is sampled during the
last clock cycles of each instruction for determining the availability of the
request. If any interrupt request is found pending, the processor enters the
interrupt acknowledge cycle. This can be internally masked after resulting the
interrupt enable flag. This signal is active high(1) and has been synchronized
internally.

4) IO/M’ – It is a status signal which determines whether the address is for


input-output or memory. When it is high(1) the address on the address bus is
for input-output devices. When it is low(0) the address on the address bus is
for the memory.

2. How single stepping or tracing is implemented in 8086?

Ans. If Trap Flag (TF) is set ,the processor enters the single step execution
mode.

3. Explain the concept of pipelining in 8086. State the advantages of pipelining

Ans. Concept Of Pipelining:

1.The process of fetching the next instruction when the present instruction is
being executed is called as pipelining.

2.Pipelining has become possible due to the use of queue.

3.BIU (Bus Interfacing Unit) fills in the queue until the entire queue is full.
4.BIU restarts filling in the queue when at least two locations of queue are
vacant.

Advantages of pipelining:

•The execution unit always reads the next instruction byte from the queue in
BIU. This is faster than sending out an address to the memory and waiting for
the next instruction byte to come.

•In short pipelining eliminates the waiting time of EU and speeds up the
processing. -The 8086 BIU will not initiate a fetch unless and until there are
two empty bytes in its queue. 8086 BIU normally obtains two instruction bytes
per fetch.

4. Explain the process of physical address generation. If CS =69FAH & IP = 834CH,


calculate the physical address generated.

Ans.

5. Explain memory segmentation.

Ans. 1) Memory is one of the most important resources on a computing


system, In order to use memory efficiently and effectively a number of
techniques have been developed to properly manage it. One of these memory
management techniques is known as Memory Segmentation (MS)

2) Segmentation is the process in which the main memory of the computer is


logically divided into different segments and each segment has its own base
address. It is basically used to enhance the speed of execution of the computer
system, so that the processor is able to fetch and execute the data from the
memory easily and fast.

6. Explain register organisation in 8086.


Ans. 1) General purpose registersIn 8086:

AX – This is the accumulator. It is of 16 bits and is divided into two 8-bit


registers AH and AL to also perform 8-bit instructions.

It is generally used for arithmetical and logical instructions but in 8086


microprocessor it is not mandatory to have accumulator as the destination
operand.

BX – This is the base register. It is of 16 bits and is divided into two 8-bit
registers BH and BL to also perform 8-bit instructions.

It is used to store the value of the offset.

CX – This is the counter register. It is of 16 bits and is divided into two 8-bit
registers CH and CL to also perform 8-bit instructions.

It is used in looping and rotation.

DX – This is the data register. It is of 16 bits and is divided into two 8-bit
registers DH and DL to also perform 8-bit instructions.

It is used in multiplication an input/output port addressing

Pointers and Index registers In 8086:

1.SP – This is the stack pointer. It is of 16 bits.

It points to the topmost item of the stack. If the stack is empty the stack
pointer will be (FFFE)H. It’s offset address relative to stack segment.

2.BP – This is the base pointer. It is of 16 bits.

It is primary used in accessing parameters passed by the stack. It’s offset address

relative to stack segment.

3.SI – This is the source index register. It is of 16 bits.

It is used in the pointer addressing of data and as a source in some string


related operations. It’s offset is relative to data segment.

4.DI – This is the destination index register. It is of 16 bits.


It is used in the pointer addressing of data and as a destination in some string
related operations. It's offset is relative to extra segment.

Segment registers In 8086:

(i)Code Segment Register (CS)

The code segment of program memory has all the code instructions. The code

segment register stores the base address of the code segment.

(ii)Data Segment Register (DS)

The data segment contains the data of the program and this register holds the

base address of the data segment.

(iii)Stack Segment Register (SS)

The stack segment of program memory contains return addresses, input


parameters, return values of function calls. The stack segment register stores the
starting addresses of the stack segment. The value of the stack segment register
is added to an offset value to access any location within that segment.

(iv) Extra Segment Register (ES)

The Extra Segment (ES) register provides additional storage. In 80386


microprocessors, two additional segment registers were added which are Far
Segment Register (FS) and Global Segment register (GS) which allows the
memory access up to 6x64KB= 384K bytes. ES register holds the base address of
the extra segment.

Flag registers In 8086:

The Flag or Status register is a 16-bit register which contains 9 flags, and the
remaining 7 bits are idle in this register. These flags tell about the status of the
processor after any arithmetic or logical operation. IF the flag value is 1, the flag
is set, and if it is 0, it is said to be reset.

Status Flags:
CF-Carry Flag : It is set when carry/borrow is generated out of MSB of result. (i.e.
D7 bit for 8-bit operation, D15 bit for a 16 bit operation).

AF-Auxiliary Carry Flag :This is set if a carry is generated out of the lower nibble,
(i.e. From D3 to D4 bit)to the higher nibble.

ZF-Zero Flag : This flag is set if the result is zero after performing ALU operations.
Otherwise it is reset.

SF-Sign Flag : This flag is set if the MSB of the result is equal to 1 after
performing ALU operation , otherwise it is reset.

OF-Overflow Flag : This flag is set if an overflow occurs, i.e. if the result of a
signed operation is large enough to be accommodated in destination register

Control Flags:

TF-Trap Flag : If this flag is set ,the processor enters the single step execution
mode.

IF-Interrupt Flag : It is used to mask(disable) or unmask(enable)the INTR


interrupt.

DF-Direction flag : It is used in string operation. As the name suggests when it


is set then string bytes are accessed from the higher memory address to the
lower memory Address and vice-a-versa.

7. Draw the architecture of 8086


8. Explain flag register in 8086.

Ans. Flag registers In 8086:

The Flag or Status register is a 16-bit register which contains 9 flags, and the
remaining 7 bits are idle in this register. These flags tell about the status of the
processor after any arithmetic or logical operation. IF the flag value is 1, the flag
is set, and if it is 0, it is said to be reset.

Status Flags:

CF-Carry Flag : It is set when carry/borrow is generated out of MSB of result. (i.e.
D7 bit for 8-bit operation, D15 bit for a 16 bit operation).

AF-Auxiliary Carry Flag :This is set if a carry is generated out of the lower nibble,
(i.e. From D3 to D4 bit)to the higher nibble.

ZF-Zero Flag : This flag is set if the result is zero after performing ALU operations.
Otherwise it is reset.

SF-Sign Flag : This flag is set if the MSB of the result is equal to 1 after
performing ALU operation , otherwise it is reset.

OF-Overflow Flag : This flag is set if an overflow occurs, i.e. if the result of a
signed operation is large enough to be accommodated in destination register

Control Flags:

TF-Trap Flag : If this flag is set ,the processor enters the single step execution
mode.

IF-Interrupt Flag : It is used to mask(disable) or unmask(enable)the INTR


interrupt.

DF-Direction flag : It is used in string operation. As the name suggests when it


is set then string bytes are accessed from the higher memory address to the
lower memory Address and vice-a-versa.

9. Explain the function of BIU in 8086


Ans. The Bus Interface Unit (BIU) manages the data, address and control buses.

The BIU functions in such a way that it:

•Fetches the sequenced instruction from the memory,

•Finds the physical address of that location in the memory where the instruction
is stored and

•Manages the 6-byte pre-fetch queue where the pipelined instructions are
stored.

An 8086 microprocessor exhibits a property of pipelining the instructions in a


queue while performing decoding and execution of the previous instruction.This
saves the processor time of operation by a large amount. This pipelining is done
in a 6-byte queue.

Also, the BIU contains 4 segment registers. Each segment register is of 16-bit. The
segments are present in the memory and these registers hold the address of all
the segments.

These registers are as follows:

1.Code segment register: It is a 16-bit register and holds the address of the
instruction or program stored in the code segment of the memory.Also, the IP in
the block diagram is the instruction pointer which is a default register that is used
by the processor in order to get the desired instruction. The IP contains the offset
address of the next byte that is to be taken from the code segment.

2. Stack segment register: The stack segment register provides the starting
address of stack segment in the memory. Like in stack pointer, PUSH and POP
operations are used in this segment to give and take the data to/from it.

3. Data segment register: It holds the address of the data segment. The data
segment stores the data in the memory whose address is present in this 16-bit
register.

4. Extra segment register: Here the starting address of the extra segment is
present. This register basically contains the address of the string data.It is to be
noteworthy that the physical address of the instruction is achieved by combining
the segment address with that of the offset address.
10.List features of 8086 microprocessor.
Ans. 1) It has a 16 bit data bus-D0- D15
2) 8086 has a 20 bit address lines can access up to.(2
20 = 1MB)
Therefore , 20 address lines that is A0 to A19 memory locations.
The address range for this memory is 00000H to FFFFFH.
3) It provides 14 16-bit registers. AX,BX,CX,DX,CS,SS,DS,ES,BP,SP,SI,DI,IP &
FLAG REGISTER.
4) It has multiplexed address and data bus AD0-AD15.
5) Interrupts:-8086 has 256 vectored interrupts.

11. State number of data lines and number of address lines used in 8086
microprocessor .

Ans. Features of 8086 microprocessor:

1) It has a 16 bit data bus-D0- D15

2) 8086 has a 20 bit address lines can access up to.(2²⁰ = 1MB)

Therefore , 20 address lines that is A0 to A19 memory locations.

The address range for this memory is 00000H to FFFFFH.

3) It provides 14 16-bit registers. AX,BX,CX,DX,CS,SS,DS,ES,BP,SP,SI,DI,IP &

FLAG REGISTER.

4) It has multiplexed address and data bus AD0-AD15.

5) Interrupts:-8086 has 256 vectored interrupts.

12. Name the general purpose registers of 8086 giving brief description of each.

Ans. General purpose registersIn 8086:

AX – This is the accumulator. It is of 16 bits and is divided into two 8-bit


registers AH and AL to also perform 8-bit instructions.
It is generally used for arithmetical and logical instructions but in 8086
microprocessor it is not mandatory to have accumulator as the destination
operand.

BX – This is the base register. It is of 16 bits and is divided into two 8-bit
registers BH and BL to also perform 8-bit instructions.

It is used to store the value of the offset.

CX – This is the counter register. It is of 16 bits and is divided into two 8-bit
registers CH and CL to also perform 8-bit instructions.

It is used in looping and rotation.

DX – This is the data register. It is of 16 bits and is divided into two 8-bit
registers DH and DL to also perform 8-bit instructions.

It is used in multiplication an input/output port addressing

13. List the names of segment register of 8086.

Ans. Segment Registers are divided in to:

Data Segment, Code Segment, Extra Segment and Stack Segment.

14. Explain the function of EU in 8086

Ans. The Execution Unit (EU) performs

1.To tell BIU to fetch the instructions or data from memory

2.To decode the instructions.

3.To generate different internal and external controls signal.

4.To execute the instructions.

5.To perform Arithmetic and Logic Operations


15. Explain the use of assembler directives. 1) DW 2) EQU 3) DUP 4) Ends

Ans. 1. DB – The DB directive is used to declare a BYTE -2-BYTE variable – A BYTE


is made up of 8 bits.

Declaration examples:

Byte1 DB 10h

Byte2 DB 255 ; 0FFh, the max. possible for a BYTE

CRLF DB 0Dh, 0Ah, 24h ;Carriage Return, terminator BYTE

2. The EQU Directive

The EQU directive is used to give name to some value or symbol. Each time the
assembler finds the given names in the program, it will replace the name with
the value or a symbol. The value can be in the range 0 through 65535 and it can
be another Equate declared anywhere above or below.

The following operators can also be used to declare an Equate:

THIS BYTE

THIS WORD

THIS DWORD

A variable – declared with a DB, DW, or DD directive – has an address and has
space reserved at that address for it in the .COM file. But an Equate does not
have an address or space reserved for it in the .COM file.

3.

4. Ends – A Structure ends by using the ENDS directive meaning END of Structure.

16. List and explain in detail the program development steps in assembly
language programming.

Ans. Program Development steps


1. Defining the problem: The first step in writing program is to think very
carefully about the problem that the program must solve.

2. Algorithm: The formula or sequence of operations to be performed by the


program can be specified as a step in general English is called algorithm.

3. Flowchart: The flowchart is a graphically representation of the program


operation or task.

4. Initialization checklist: Initialization task is to make the checklist of entire


variables, constants, all the registers, flags and programmable ports

5. Choosing instructions: Choose those instructions that make program smaller in


size and more importantly efficient in execution.

6. Converting algorithms to assembly language program: Every step in the


algorithm is converted into program statement using correct and efficient
instructions or group of instructions.

17. Explain assembly language program development tools.

Ans. Assembly language programming tools

Editor

a) It is a program which helps to construct assembly language program with a file


extension.asm in right format so that the assembler will translate it to machine
language.

b) It enables one to create, edit, save, copy and make modification in source file.

Assembler

a) Assembler is a program that translates assembly language program to the


correct binary code for each instruction i.e. machine code and generate the file
called as object file with extension .obj .

b) It also displays syntax errors in the program, if any.


c) It can be also be used to produce list (.lst) which contains assembly language
statements, binary codes, and offset address for each instruction

Linker

a) It is a programming tool used to convert Object code into executable program.

b) It combines, if requested ,more than one separated assembled modules into


one executable module such as two or more assembly programs or an assembly
language with C program.

c) It generates .EXE module

Debugger

a) Debugger is a program that allows the execution of program in single step


mode under the control of the user.

b) The errors in program can be located and corrected using a debugger.

18. Describe any 4 addressing modes of 8086 with one example each

Ans. Addressing Modes of 8086 :

1.Immediate Addressing mode:

➢ In this mode the operand is specified by the Instruction itself.

➢ Instruction are longer but the operands are easily identified.

Eg.

MOV BL , 15H ; Moves 15 immediately into BL register.

MOV CX , 2234H ; Moves 2234 immediately into CX register.

2.Register Addressing mode:

➢ In this mode operands are specified using Registers.

➢ Instruction are shorter but the operands cannot be identified by the looking at
the instructions.
Eg.

MOV BL , AL ;Moves data of AL register into BL register.

MOV CX , BX ;Moves data of BX register into CX register.

3.Direct Addressing mode:

➢ In this mode address of the operand is directly specified in the Instruction.

➢ Here, only the offset address is specified, the segment being indicated by the
Instruction.

Eg.

MOV CL , [4321H] ; Moves data from location 4321H in the data segment into CL.

The physical address is calculated as DS*10H + 4321

Assume DS= 5000H. P.A.= 500000+4321=54321H

CL = [54321H]

4.Implide Addressing mode:

➢ In this addressing mode the operands are implied and are hence not specified
in the Instruction.

Eg.

STC ; Sets the Carry Flag.

CLD ; Clears the Direction Flag

19. Select an appropriate instruction for each of the following & write: 1)
Multiply content of AX by 06H 2) Copy the contents of BX register to CX

Ans.

20. Explain any four instructions from the Data Transfer instructions of 8086

Ans. 1.MOV Destination , Source: Moves a BYTE / WORD from the source to the
destination specified in the instruction.
Source: Register ,Memory Location , Immediate Number.

Destination:Register , Memory Location

Both, Source and Destination cannot be Memory Location

2.PUSH Source: PUSH the source (word) into the stack and decrement the stack
pointer by two.

The source must be a WORD.

Source: Register ,Memory Location

3. POP Destination: POP a word from the stack into the given destination and
increment the stack pointer by two.

The Destination must be a WORD(16 bits).

Destination:Register ,Memory Location

4.PUSHF: PUSH the FLAG register (16-Bits) into the stack and decrement the stack
pointer by Two.

Source : FLAG register.

21. Explain any four instructions from the Arithmetic group instructions of 8086

You might also like