0% found this document useful (0 votes)
22 views30 pages

MI Exam Notesnew

Uploaded by

Shravani Salunke
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
0% found this document useful (0 votes)
22 views30 pages

MI Exam Notesnew

Uploaded by

Shravani Salunke
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/ 30

Basic definitions

Offset address : An offset address refers to the distance or


difference from a specific reference point, often a base address, to a
target location.

Base address : A base address is the starting point in memory from


which offset addresses are calculated, typically serving as a reference for
memory allocation blocks.

Will add more ...


introoduction to 8085
microprocessor
introoduction to 8086
microprocessor
Pin diagram of 8086
Difference between 85&86
block diagram of 8086
Flag registers
The intel 8086 microprocessor's FLAGS register is a 16-bit
register that contains 9 active flags

microprocessor that contains information about the state of the


processor after executing an instruction.

It is sometimes referred as the status register because it


contains various status flags that reflect the outcome of the
last operation executed by the processor.

The flag register is an important component of the 8086


microprocessor because it is used to determine the behavior of
many conditional jump and branch instructions.

The various flags in the flag register are set or cleared based
on the result of arithmetic, logic, and other instructions
executed by the processor
Physical address
genration
The segment registers are used to hold 16-bit of the starting
address of four memory segments.

But 8086 has 20-bit address bus, so it can address any of


2^20 = 1 Mb in memory.

The address associated with any instruction or data byte is only 16-
bit called as effective address or ofiset or displacement.

However the address outputted by BIU is 20 bits called as physical


address.

Fig shows how 8086 calculates physical address from the effective
address
Memory segmentation
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.

Need for Segmentation –


The Bus Interface Unit (BIU) contains four 16 bit special
purpose registers (mentioned below) called as Segment
Registers.

Code segment register (CS): is used for addressing memory


location in the code segment of the memory, where the
executable program is stored.
Data segment register (DS): points to the data segment of
the memory where the data is stored.
Extra Segment Register (ES): also refers to a segment in
the memory which is another data segment in the memory.
Stack Segment Register (SS): is used for addressing stack
segment of the memory. The stack segment is that segment of
memory which is used to store stack data.
Advantages of Memory segmantation:

1. The address associated with zay instruction date із only 16-


bits though the 8086 has 20-bits physical address.
2. Segmentation can be used in multi-user time shared system.
3. Programs and data can be stored separately from each other
in segmentation.
4. We can have program of more than 64 kbytes or data more
than 64 kbytes by using more than one code or data segments.
5. Segmentation makes it possible to write programs which are
position independent or dynamically re- locatable.
6. Segmentation allows two processes to share data.
7. Segmentation allows you to extend the addressability of a
processor.
Pipelining

Pipelining is the technique used to enable an instruction to


complete with each clock cycle.

On a non-pipelined processor, nine clock cycles are required for the


individual fetch, decode and execute cycles for the three
instructions.

On a pipelined processor, where fetch, decede and execute


operation are performed in parallel, only five cycles are required to
execute the same three instructions.

First instruction requires three cycles to complete.

Additional instructions then complete at a rate of one per cycle.

As shown in Fig. 2.8(b) during the clock cycle 5 we have 13


completing, 4 being decoded and Is being fetched.
A long sequence of the instruction, say 1000 of them, might
requires 3000 clock cycles on a non-pipelined processor and only
1002 clock cycles when pipelined processor.

So, pipelining result in a tremendous performance gain.


In 8086, pipelining is implemented by providing 6 byte queue where
as long as 6 one byte instructions can be stored well in a advance
and then one by one instruction goes for decoding and execution.

So, while executing first instruction in a quetie, processor decodes


second instruction and fetches 8th instruction from the memory.

In this way, 8086 perform fetch, decode and execute operation in


parallel i.e. in single clock cycle as shown in above Fig.

Advantages of Pipelining:

Pipelining enables many instructions to be executed at the same


time.
It allows execution to be done in fewer cycles.
Speed up the execution speed of the processor
More efficient use of processor
The microprocessor 8086 can be operated in two modes i.c.
minimum mode and maximum mode.
In minimum mode, all control signals are generated
by the microprocessor 8086 itself.
So, it can be used in single microprocessor based system.
In maximum mode, all control signals are generated by bus
controller 8288 not by microprocessor 8086.
So, it can be used in multiprocessor system, when microprocessor
based system contains external math co-processor like 8087.
Minimum mode of 8086
In minimum mode 8086 based system, the microprocessor 8086 is operated minimum mode by
strapping its MN/MX pin to logic high i.e. +5 V.
In this mode, all control signals are generated by the microprocessor 3086 itself.
So, in minimum mode, the remaining components are latches, trans-receiver, clock generator,
memory and 1/O device.
The latches are generally buffered output D'type flip- flop like 74LS373 or 8282.
These latches are used to separate address signals from data and status signals using ALE signal
generated by 8086.
Trans-receiver is bi-directional buffer and sometime they are called as data amplifier and are
required to separate valid data from the time multiplexed address/data signals.
These bi-directional buffers are controlled by two signals i.e. DEN and DT/R. The DEN signal
indicates that the valid data is available on the data bus and DT/R indicates the direction of data i.e.
from or to the microprocessor.
The clock generator generates the clock from the crystal oscillator and then shapes it and divide to
makes it more precious so that it can be used as an accurate timing reference for the system.
The clock generator also synchronizes some external signals with the system clock.
,
maximum mode of 8086
In maximam mode, the 8086 is operated by connecting MN/MX pin to ground.
In this mode, the processor derives the status signals $23, and So
These status signals are used by another chip called as bus controller 8288.
In maximum mode, more than one processor may be in the system configuration.
Other IC's required in maximum mode are same as that minimum mode of 8086.
The functions of pins from 24 to 32 will change and remaining will remain as it is.
The basic function of bus controller 8288 is to generate different control signals for memory and
I/O devices such as RD/WR and DEN, DT/R, ALE etc. using information available on the status
line.
The bus controller has input lines S₂S, S, and CLK.
The AEN, IOB and CEN pins are especially useful fo. multiprocessor systems.
The INTA. pia is used to issue two interrupt acknowledge pulses to the interrupt controller or to ar
interrupting device.
IORC and IOWC are used to read data from VO device or write data to I/O device respectively.
These signals enable an IO interface to read or write the data from or to the addressed port.
The MRDC and MWTC are used as memory read and write signals.
Beside these signals, AIOWC and AMWC advance control signals are available to serve same
purpose but are activated one clock pulse earlier than IOWC and MWTC.
Difference between
min max
Addressing modes

h
assembly langaugae tools
like debugger,editor,
linker, assember,, loader
Assembler :
An assembler program is used to translate assembly language mnemonics to the correct
binary code for each instruction. The assembler will read the source file or your program
from the disk where you saved it after editing. An assembler usually reads your source file
more than once. On the first pass through the source program, the assembler finds everything.
It determines the displacement of named data items and the offset of labels, and puts this
information in symbol table. On a second pass through the source program, the assembler
produces the binary code for each instruction and assigns address to each.
The assembler generates two files on the floppy or hard disk. The first file is called object
file. The object file contains the binary codes for the instructions and the information about
the addresses of the instructions.
This file contains the information that will eventually be loaded into memory and executed.
The second file generated by the assembler is called the assembler list file This Me contains
the assembly language statements. the binary codes for each instruction. and the offset for
each instruction

Linker :
A linker a program to join together several object files into one large object file s.%en wnt;ng
large programs It is usually much more efficient to divide the large program 'n to smaller
modules Each module can be Individually written, tested, and debugged. When all of the
modules work they can be linked together to form a large functioning program Also, the
object modules for useful programs, a square root program, for example. can be kept tn a
library file and linked into other program as needed.
The tinker produces a link file which contains the binary codes for all combined modules.
The linker also produces a link map file which contains the address information about the
linked files.

Debugger :
A debugger is a program which allows you to load your object code program
into system
memory. execute the program, and troubleshoot or debug it. The debugger
allows you to look
at the contents of the registers and memory locations after your program runs
It allows you to
change the contents of the registers and the memory locations and rerun the
program. Some
debuggers allow you stop execution after each instruction so you can check or
alter memory
and register contents A debugger also allows you to set a break point at any
point in your
program. When you run the program the system WI!' execute instructions up to
this break
point and stop. You can the examine registers and memory contents to see if
the results are
correct at that point. If results are correct, you can move the break point to a
later point in the
program. If the results are not correct, you can check the program up to that
point to find out
why they are not correct.

Editor :
An editor is a program which, when run on a system lets you type in the
assembly language
statements for your program. The main function of an editor is to help you
construct your
assembty» language program in just the right format so that the assembler will
translate it
correctly to machine language. The file created by the editor is in ASCII codes
and called as
source file.
.

You might also like