Вы находитесь на странице: 1из 6

Microprocessor & Interfaces (Assignment II)

NAME – SIDDHARTH VERMA ROLL NO – 17103269 (37)

Q 1. Enlist the salient feature of 80386?


ANS – SALIENT FEATURES OF 80386:

 8, 16, 32-Bit Data Types o 8 General Purpose 32-Bit Registers

 Very Large Address Space o 4 Gigabyte Physical o 64 Terabyte Virtual o 4 Gigabyte Maximum
Segment Size

 Integrated Memory Management Unit o Virtual Memory Support o Optional On-Chip Paging o 4
Levels of Protection o Fully Compatible with 80286

 Object Code Compatible with All 8086 Family Microprocessors

 Virtual 8086 Mode Allows Running of 8086 Software in a Protected and Paged System

 Hardware Debugging Support

 Optimized for System Performance o Pipelined Instruction Execution o On-Chip Address


Translation Caches o 20, 25 and 33 MHz Clock o 40, 50 and 66 Megabytes/Sec Bus
Bandwidth

 Numeric Support via Intel387TM DX Math Coprocessor

 Complete System Development Support o Software: C, PL/M, Assembler o System Generation


Tools o Debuggers: PSCOPE, ICETM-386

 High Speed CHMOS IV Technology o 132 Pin Grid Array Package o 132 Pin Plastic Quad
Flat Package

The processing mode of the 80386 also determines the features that are accessible. The 80386 has
three processing modes

1. Protected Mode. 2. Real-Address Mode. 3. Virtual 8086 Mode.


Q 2. Draw and discuss the flag register of 80386 in detail ?
ANS – Flag Register of 80386 micro processor

Flag Register of 80386

[ source: Intel386 DX Manual]

Note in these descriptions, ``set'' means ``set to 1,'' and ``reset''


means ``reset to 0.''

VM (Virtual 8086 Mode, bit 17)


The VM bit provides Virtual 8086 Mode within Protected Mode. If set while the 80386 is in Protected
Mode, the 80386 will switch to Virtual 8086 operation, handling segment loads as the 8086 does, but
generating exception 13 faults on privileged opcodes.

RF (Resume Flag, bit 16)


The RF flag is used in conjunction with the debug register breakpoints. It is checked at instruction
boundaries before breakpoint processing. When RF is set, it causes any debug fault to be ignored on
the next instruction. RF is then automatically reset at the successful completion of every instruction.
NT (Nested Task, bit 14)
This flag applies to Protected Mode. NT is set to indicate that the execution of this task is nested
within another task. If set, it indicates that the current nested task's Task State Segment (TSS) has a
valid back link to the previous task's TSS. This bit is set or reset by control transfers to other tasks.

IOPL (Input/Output Privilege Level, bits 12-13)


This two-bit field applies to Protected Mode. IOPL indicates the numerically maximum CPL (current
privilege level) value permitted to execute I/O instructions without generating an exception 13 fault or
consulting the I/O Permission Bitmap. It also indicates the maximum CPL value allowing alteration of
the IF (INTR Enable Flag) bit when new values are popped into the EFLAG register.

OF (Overflow Flag, bit 11)


OF is set if the operation resulted in a signed overflow. Signed overflow occurs when the operation
resulted in carry/borrow into the sign bit (high-order bit) of the result but did not result in a carry/borrow
out of the high order bit, or vice-versa. For 8/16/32 bit operations, OF is set according to overflow at
bit 7/15/31, respectively.

DF (Direction Flag, bit 10)


DF defines whether ESI and/or EDI registers post decrement or post increment during the string
instructions. Post increment occurs if DF is reset. Post decrement occurs if DF is set.

IF (INTR Enable Flag, bit 9)


The IF flag, when set, allows recognition of external interrupts signaled on the INTR pin.

When IF is reset, external interrupts signaled on the INTR are not recognized. IOPL indicates the
maximum CPL value allowing alteration of the IF bit when new values are popped into EFLAGS or
FLAGS.

TF (Trap Enable Flag, bit 8)


TF controls the generation of exception 1trap when single-stepping through code. When TF is set, the
80386 generates an exception 1 trap after the next instruction is executed. When TF is reset,
exception 1 traps occur only as a function of the breakpoint addresses loaded into debug registers
DR0±DR3.

SF (Sign Flag, bit 7)


SF is set if the high-order bit of the result is set, it is reset otherwise. For 8-, 16-, 32-bit operations, SF
reflects the state of bit 7, 15, 31 respectively.

ZF (Zero Flag, bit 6)


ZF is set if all bits of the result are 0. Otherwise it is reset.

AF (Auxiliary Carry Flag, bit 4)


The Auxiliary Flag is used to simplify the addition and subtraction of packed BCD quantities. AF is set
if the operation resulted in a carry out of bit 3 (addition) or a borrow into bit 3 (subtraction). Otherwise
AF is reset. AF is affected by carry out of, or borrow into bit 3 only, regardless of overall operand
length: 8, 16 or 32 bits.

PF (Parity Flags, bit 2)


PF is set if the low-order eight bits of the operation contains an even number of ``1's'' (even parity). PF
is reset if the low-order eight bits have odd parity. PF is a function of only the low-order eight bits,
regardless of operand size.
CF (Carry Flag, bit 0)
CF is set if the operation resulted in a carry out of (addition), or a borrow into (subtraction) the high-
order bit. Otherwise CF is reset. For 8-, 16- or 32-bit operations, CF is set according to carry/borrow at
bit 7, 15 or 31, respectively.

Q 3. Explain the different operating modes of 80386 ?


ANS - Operating modes of 80386

We have already discussed in our previous article that 80286 supports two
operating modes. The first is real address mode while the second is the
protected virtual address mode. However, 80386 supports 3 operating
modes: real, protected and virtual real mode.

Of the two modes of 80286 microprocessor, initially the 80286 was booted
in real mode. However, to have better operating performance, separate
software command is used to switch from the real mode to the protected
mode.

But it requires the resetting of microprocessor in order to switch to real


mode from protected mode. This drawback was eliminated in 80386 that
allows the switching between the modes using software commands.

In the protected mode, 80386 microprocessor operates in similar way like


80286, but offers higher memory addressing ability.
In virtual mode, the overall memory of 80386 can be divided into various
virtual machines. And all of them acts as a separate computer with 8086
microprocessor. This mode is also called virtual 8086 mode or V86 mode.
The other one is the virtual real mode, this mode allows the system to
execute multiple programs in the protected memory. And in case a
program at a particular memory gets crashed then it will not cause any
adverse effect on the other part of the memory.
Q 4. Discuss the architecture of 8087 ?
ANS – 8087 Architecture
8087 Architecture is divided into two groups, i.e., Control Unit (CU) and Numeric
Extension Unit (NEU).
 The control unit handles all the communication between the processor and the memory
such as it receives and decodes instructions, reads and writes memory operands,
maintains parallel queue, etc. All the coprocessor instructions are ESC instructions, i.e.,
they start with ‘F’, the coprocessor only executes the ESC instructions while other
instructions are executed by the microprocessor.
 The numeric extension unit handles all the numeric processor instructions like
arithmetic, logical, transcendental, and data transfer instructions. It has 8 register stack,
which holds the operands for instructions and their results.
The architecture of 8087 coprocessor is as follows −
Q 5. Discuss the usage of 8089 ?
ANS – Usages of 8089 :-

1. 8089 has very high speed DMA capability.


2. It has 1 MB address capability.
3. It is compatible with iAPX 86, 88.
4. It supports local mode and remote mode I/O processing.
5. 8089 allows mixed interface of 8-and 16-bit peripherals, to 8-and 16-bit
processor buses.
6. It supports two I/O channels.
7. Multibus compatible system interface.
8. Memory based communications with CPU.

Вам также может понравиться