Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
(Autonomous)
(ISO/IEC - 27001 - 2005 Certified)
Page 1 / 39
MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION
(Autonomous)
(ISO/IEC - 27001 - 2005 Certified)
system. throughput
of the system.
7. Affect interrupt control logic. Does not affect interrupt
control
logic.
8. Microprocessor executes Microprocessor does not
interrupt acknowledge cycle executes interrupt
to acknowledge this acknowledge cycle to
interrupt. acknowledge this interrupt
and only normal machine
cycle is executed.
Page 2 / 39
MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION
(Autonomous)
(ISO/IEC - 27001 - 2005 Certified)
control.
14. It has a 32 bit E-flag register.
15. It supports the dynamic bus sizing by which the 80386 can be
interfaced to 16 bits devices effectively. And also supports the
8bits, 16 bits and 32 bits operands.
16. It operates on 20 MHz and 33 MHz frequency.
Page 3 / 39
MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION
(Autonomous)
(ISO/IEC - 27001 - 2005 Certified)
Load and Store architecture, implying that all the memory accesses
takes place using Load and Store type operations.
Page 4 / 39
MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION
(Autonomous)
(ISO/IEC - 27001 - 2005 Certified)
Page 5 / 39
MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION
(Autonomous)
(ISO/IEC - 27001 - 2005 Certified)
INT 26H
Page 6 / 39
MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION
(Autonomous)
(ISO/IEC - 27001 - 2005 Certified)
13h.
INT 25h Absolute Disk Read
eads one or more sectors on a specified logical disk.
Diagra
m for
debugr
egister
2M
Debug Registers:
The first four debug registers contain 32 bit linear breakpoint
addresses. (A linear address is a 32-bit address generated by a
microprocessor instruction that may or may not be same as the Descript
physical address.) ion 2M
The breakpoint address, which may locate an instruction or data are
constantly compared with the address generated by the program. If a
match occurs, the 80386 will cause a type 1 interrupt [TRAP] to
occur, if directed by debug registers DR6 and DR7. This feature is
much expanded version of the basic trapping or tracing allowed with
the earlier processors through the type 1 interrupt. The breakpoint
addresses are very useful in debugging faulty software. The control
bits in DR6 and DR7 are defined as follows:
a. BT: If set to 1, the debug interrupt was caused by a task switch.
Page 7 / 39
MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION
(Autonomous)
(ISO/IEC - 27001 - 2005 Certified)
b. BS: If set the debug interrupt was caused by the TF bit in the flag
register.
c. BD: If set, the debug interrupt was caused by an attempt to read
the debug register with the GD bit set. The GD bit protects access
to the debug registers.
d. B3-B0: Indicates which of the four debug breakpoint addresses
caused the debug interrupt.
e. LEN: Each of the four length fields pertains to each of the four
breakpoint addresses stored in DR0-DR3. These bits further define
the size of the access at the breakpoint address as 00(byte),
01(word), or 11(double word).
f. RW: Each of the four read/write fields pertains to each of four
breakpoint addresses stored in the DR0-DR3. The RW field selects
the cause of action that enabled a breakpoint address as 00
(instruction access), 01(data write) and 11(data read and write).
g. GD: If set, GD prevents any read or write of a debug interrupt by
generating the debug interrupt. This bit is automatically cleared
during the debug interrupt so that the debug registers can be read
or changed if needed.
h. GE: If set, selects a local breakpoint addresses for any of the four
breakpoint address registers.
i. LE: If set, selects a local breakpoint address for any of the four
breakpoint address.
Correct
Diagram
2M
Page 8 / 39
MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION
(Autonomous)
(ISO/IEC - 27001 - 2005 Certified)
Page 9 / 39
MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION
(Autonomous)
(ISO/IEC - 27001 - 2005 Certified)
Page 10 / 39
MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION
(Autonomous)
(ISO/IEC - 27001 - 2005 Certified)
Internal
architect
ure of
80386
processo
r
diagram
4M
Page 11 / 39
MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION
(Autonomous)
(ISO/IEC - 27001 - 2005 Certified)
5. Numeric underflow
6. Inexact result
1. Invalid operation
The floating point invalid exception occurs in response to two
general types of operations :
Stack overflow or underflow
Invalid arithmetic operand.
When the SF is set to 1, a stack operation has resulted in stack
overflow or underflow. When the flag is cleared to 0, an arithmetic
instruction has encountered an invalid operation. Any
The FPU explicitly sets the SF flag when it detects a stack overflow four
or underflow condition, but it does not explicitly clear the flag when floating
it detects an invalid arithmetic operand condition. point
As a result the state of the SF flag can be 1 following an invalid exceptio
arithmetic operation exception, if it was not cleared from the last time ns in
a stack overflow or underflow condition occurred. Pentium
processo
2. Divide by zero: r 2M
The FPU reports a floating point zero divide exception, whenever an each
instruction attempts to divide the operand by 0.
The flag ZE for this exception is bit 2 of the FPU status word, and the
mask bit ZM is bit 2 of the control word.
The FDIV, FDIVP, FDIVR, FDIVRP, FIDIV, FIDIVR instructions
and the other instructions that perform division internally can report
the divide by zero exception.
3. De-normalized operand
The FPU signals the de-normal operand exception under the
following conditions:
1. If an arithmetic instruction attempts to operate on a denormal
operand.
2. If an attempt is made to load the denormal single or double real
value into an FPU register.
The flag DE for this exception is bit 1 of the FPU status word, and
the mask bit (DM) is the 1 of the FPU control word.
4. Numeric overflow
This exception occurs when the rounded result of an arithmetic
instruction exceeds the largest allowable finite value that will fit into
Page 12 / 39
MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION
(Autonomous)
(ISO/IEC - 27001 - 2005 Certified)
5. Numeric underflow
This exception occurs when the rounded result of an arithmetic
instruction is less than the smallest possible normalized, finite value
that will fit into the real format of the destination operand.
6. Inexact result
This exception occurs if the result of an operation is not exactly in
represent able in the destination format.
3) 3EH: to close the file: This function closes the indicated file
Registers to be used before calling the function using INT 21H : BX
= file handle Syntax: mov ah, 3Eh; function 3Eh - close a file int
21h; transfer to DOS
4) 3FH: to read the file: This function reads up to CX bytes from the
Indicated file into the specified memory buffer. On successful return,
the AX Register contains the number of bytes actually read.
Registers to be used before calling the function using INT 21H: BX
Page 13 / 39
MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION
(Autonomous)
(ISO/IEC - 27001 - 2005 Certified)
5) 40H: to write to the file: This function writes the specified number
of bytes from a buffer to a file or device. Registers to be used before
calling the function using INT 21H: BX = file handle CX = number
of bytes to write DS:DX -> data to write Syntax: mov ah,40h;
function 40h - write to file int 21h; transfer to DOS
6) 41H: to delete the file: This function deletes the specified file
Registers to be used before calling the function using INT 21H:
ASCIIZ filename DS: DX - zero terminated full paths. Syntax: mov
ah, 41h; delete file int 21h; transfer to DOS
7) 56H: to rename the file: This functions renames the given file with
new name specified by ES: DI Registers to be used before calling the
function using INT 21H : DS: DX address of ASCIIZ filename of
existing file ES : DI – ASCIZ new filename Syntax: mov ah, 56h;
delete file int 21h; transfer to DOS
8) 43H: Set/Get file attribute: This function gets or sets the file
attributes Registers to be used before calling the function using INT
21H: AL = 00H to get attributes 01H to set attributes CX = file
attributes, if AL=01H. Bits can be combined DS: DX = segment:
offset of ASCIIZ pathname Syntax: mov ah, 43h; set/get file
attributes int 21h; transfer to DOS
9) 57H: Set/Get file time & date: This function gets or sets the file
date and time. Registers to be used before calling the function using
INT 21H: AL = 00h 0r 01H (0 - get 1 - set) BX = file handle DS:
DX = segment: offset of ASCIIZ pathname Syntax: mov ah, 57h;
set/get file date and time int 21h; transfer to DOS.
Page 14 / 39
MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION
(Autonomous)
(ISO/IEC - 27001 - 2005 Certified)
Diagram
of
Interrup
t Vector
Table
(IVT) of
X86
processo
r 2M
Page 15 / 39
MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION
(Autonomous)
(ISO/IEC - 27001 - 2005 Certified)
Page 16 / 39
MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION
(Autonomous)
(ISO/IEC - 27001 - 2005 Certified)
Diagram
of CR0
register
of 80386
2M
EM (Emulate, bit 2)
If this bit is set to 1, it allows the generation of exception 7 (processor
extension not present ) and will permit the emulation of the processor
extension by the CPU.(If this bit is set and the processor extension is
absent it will allow the CPU to work as a coprocessor)
Page 17 / 39
MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION
(Autonomous)
(ISO/IEC - 27001 - 2005 Certified)
exception 7 if both TS and MP are set. Operating systems can use this
exception to switch the context of the coprocessor to correspond to
the current task.
Page 18 / 39
MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION
(Autonomous)
(ISO/IEC - 27001 - 2005 Certified)
Page 19 / 39
MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION
(Autonomous)
(ISO/IEC - 27001 - 2005 Certified)
Page 20 / 39
MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION
(Autonomous)
(ISO/IEC - 27001 - 2005 Certified)
additional device drivers that the user wants in his system. The
required drivers are loaded into the memory, initialized by calls to
their INIT modules, and linked into their device driver list. After
SYSINIT calls the EXEC function to load the command interpreter
(shell). Once the interpreter is loaded, it displays a prompt and waits
for the user to enter the command.
Loading
sequenc
e of
DOS in
memory
diagram
4M
Page 21 / 39
MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION
(Autonomous)
(ISO/IEC - 27001 - 2005 Certified)
Paging
diagram
3M
The paging unit operates under the control of segmentation unit. The
paging unit if enabled converts linear addresses into physical address,
in protected mode.
Page 22 / 39
MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION
(Autonomous)
(ISO/IEC - 27001 - 2005 Certified)
•Paging Unit: The paging unit of 80386 uses a two level table
mechanism to convert a linear address provided by segmentation unit
into physical addresses.
The paging unit converts the complete map of a task into pages, each
of size 4K. The task is further handled in terms of its page, rather than
segments.
The paging unit handles every task in terms of three components
namely page directory, page tables and page itself.
Page 23 / 39
MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION
(Autonomous)
(ISO/IEC - 27001 - 2005 Certified)
Architec
ture of
Pentium
processo
r
diagram
4M
Page 24 / 39
MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION
(Autonomous)
(ISO/IEC - 27001 - 2005 Certified)
The most important enhancements over the 486 are the separate
instruction and data caches, the dual integer pipelines (the U-pipeline
and the V-pipeline, as Intel calls them), branch prediction using the
branch target buffer (BTB), the pipelined floating-point unit, and the
64-bit external data bus. Even-parity checking is implemented for the
data bus and the internal RAM arrays (caches and TLBs). As for new
functions, there are only a few; nearly all the enhancements in
Pentium are included to improve performance, and there are only a
handful of new instructions. Pentium is the first high performance
micro-processor to include a system management model like those
found on power-miserly processors for notebooks and other battery-
based applications; Intel is holding to its promise to include SMM on
all new CPUs.
The integer data path is in the middle, while the floating- point data
path is on the side opposite the data cache. In contrast to other
superscalar designs, such as Super SPARC, Pentium’s integer data
path is actually bigger than its FP data path. This is an indication of
the extra logic associated with complex instruction support. Intel Explana
estimates about 30% of the transistors were devoted to compatibility tion 4M
with the x86 architecture. Much of this overhead is probably in the
microcode ROM, instruction decode and control unit, and the adders
in the two address generators, but there are other effects of the
complex instruction set. For example, the higher frequency of
memory references in x86 programs compared to RISC code led to
the implementation of the dual-ac.
Register set
The purpose of the Register is to hold temporary results, and control
the execution of the program. General-purpose registers in Pentium
are EAX, ECX, EDX, EBX, ESP, EBP,ESI, or EDI.
The 32-bit registers are named with prefix E, EAX, etc, and the least
16 bits 0-15 of these registers can be accessed with names such as
AX, SI Similarly the lower eight bits (0-7) can be accessed with
names such as AL & BL. The higher eight bits (8-15) with names
such as AH & BH. The instruction pointer EAP known as program
counter(PC) in 8-bit microprocessor, is a 32-bit register to handle
32bit memory addresses, and the lower 16 bit segment IP is used for
16bits memory address. The flag register is a 32-bit register, however
14-bits are being used at present for 13 different tasks; these flags are
upward compatible with those of the 8086 and 80286.
Page 25 / 39
MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION
(Autonomous)
(ISO/IEC - 27001 - 2005 Certified)
Diagram:
Page 26 / 39
MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION
(Autonomous)
(ISO/IEC - 27001 - 2005 Certified)
Address
generati
on
PVAM
of 80386
diagram
2M
Page 27 / 39
MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION
(Autonomous)
(ISO/IEC - 27001 - 2005 Certified)
Page 28 / 39
MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION
(Autonomous)
(ISO/IEC - 27001 - 2005 Certified)
Page 29 / 39
MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION
(Autonomous)
(ISO/IEC - 27001 - 2005 Certified)
Diagram
of
format
of flag
register
4M
Page 30 / 39
MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION
(Autonomous)
(ISO/IEC - 27001 - 2005 Certified)
Page 31 / 39
MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION
(Autonomous)
(ISO/IEC - 27001 - 2005 Certified)
1. Register Window:
1. The reduced hardware requirements of RISC processors leave
additional space available on the chip for the system designer. RISC
CPUs generally use this space to include a large number of registers
(> 100 occasionally).
2. The CPU can access data in registers more quickly than data in Explana
memory so having more registers makes more data available faster. tion of
Having more registers also helps reduce the number of memory each
references especially when calling and returning from subroutines. design
3. The RISC processor may not be able to access all the registers it issue
has at any given time provided that it has many of it. 2M
4. Most RISC CPUs have some global registers which are always
accessible. The remaining registers are windowed so that only a
Page 32 / 39
MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION
(Autonomous)
(ISO/IEC - 27001 - 2005 Certified)
Page 33 / 39
MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION
(Autonomous)
(ISO/IEC - 27001 - 2005 Certified)
Page 34 / 39
MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION
(Autonomous)
(ISO/IEC - 27001 - 2005 Certified)
Page 35 / 39
MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION
(Autonomous)
(ISO/IEC - 27001 - 2005 Certified)
Page 36 / 39
MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION
(Autonomous)
(ISO/IEC - 27001 - 2005 Certified)
Page 37 / 39
MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION
(Autonomous)
(ISO/IEC - 27001 - 2005 Certified)
Diagram
4M
Page 38 / 39
MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION
(Autonomous)
(ISO/IEC - 27001 - 2005 Certified)
8. Error Reporting(ER)
If an error is detected, an error reporting stage is entered where
the error is reported and
FPU status word is updated.
Page 39 / 39