SlideShare a Scribd company logo
Intel® 80386 Microprocessor:
FLAG REGISTER AND DEBUG AND CONTROL REGISTER
Intel® 80386 Microprocessor
• The 80386 processor dramatically extended the 8086 register set.
• In addition to all the registers on the 80286 (and therefore, the 8086),
the 80386 added several new registers and extended the definition of
the existing registers.
2
Intel® 80386 Microprocessor:
Flag Register
3
•Flag Register of 80386: The Flag register of 80386 is a 32 bit register. Out
of the 32 bits, Intel has reserved bits D18 to D31, D5 and D3, while D1 is
always set at 1.Two extra new flags are added to the 80286 flag to derive
the flag register of 80386. They are VM and RF flags.
Intel® 80386 Microprocessor:
Flag Register
• C (Carry) –It holds the carry after calculations.
• P (Parity) –Parity is a logic 0 for odd parity and a logic 1 for even
parity. Parity is a count of ones in a number expressed as even or
odd.
• A (Auxiliary carry) –Carry occurs bits positions 3 and 5 of the
results.
• Z (Zero) – The zero flag shows that the result of an arithmetic or
logical operation is zero. When Z = 1, the result is zero. When Z =
0, the result was non-zero.
• T (Trap) – Enables trapping through an on-chip debugging facility. 4
Intel® 80386 Microprocessor:
Flag Register (CONT’D)
• S (Sign) – The sign flag holds the arithmetic sign after an
arithmetic or a logical operation. If S =1 the sign bit is set and the
result is negative. If S = 0, the sign bit is not set and the result is
positive.
• I (Interrupt) – The interrupt flag controls the operations of the
INTR(Interrupt request) input pint. If I =1, the INTR pin is enabled;
if I =0, the INTR pin is disabled.
• VM (virtual mode) – If this flag set, the 80386 enters the virtual
mode within the protected mode. In this mode, if any privileged
instruction is executed, an exception 13 is generated.
5
Intel® 80386 Microprocessor:
Flag Register (CONT’D)
6
• 9. RF(resume) – The resume flag is used with debugging to control the
resumption of execution after the next instruction.
• 10. NT (nested task) – The nested task flag is used to indicate that the
current task is nested within another task in protected mode operation.
This flag is set when the task nested by software.
• 11. IOPL (I/O Privilege level) – IOPL is used in protected mode operation
to select the privilege level for I/O devices. IF the current privilege level is
higher or more trusted than the IOPL, I/O executed without hindrance. If
the IOPL is lower than the current privilege level, an interrupt occurs.
• VM - Virtual Mode Flag : If this flag is set, the 80386
enters the virtual 8086 mode within the protection mode.
This is to be set only when the 80386 is in protected mode.
In this mode, if any privileged instruction is executed an
exception 13 is generated. This bit can be set using IRET
instruction or any task switch operation only in the
protected mode.
•RF- Resume Flag : This flag is used with the debug
register breakpoints. It is checked at the starting of every
instruction cycle and if it is set, any debug fault is ignored
during the instruction cycle. The RF is automatically reset
after successful execution of every instruction, except for
IRET and POPF instructions.
7
8
Debug Registers
Debug Address Registers (DR0-DR3)
• Each of these registers contains the linear address associated with
one of four breakpoint conditions.
• The debug address registers are effective whether or not paging is
enabled.
• The addresses in these registers are linear addresses. If paging is
enabled, the linear addresses are translated into physical addresses
by the processor's paging mechanism.
• If paging is not enabled, these linear addresses are the same as
physical addresses.
Debug Control Register (DR7)
• For each address in registers DR0-DR3, the corresponding fields R/W0 through
R/W3 specify the type of action that should cause a breakpoint. The processor
interprets these bits as follows:
00 ── Break on instruction execution only
01 ── Break on data writes only
10 ── undefined
11 ── Break on data reads or writes but not instruction fetches
Debug Control Register (DR7)
• Fields LEN0 through LEN3 specify the length of data item to be monitored. A
length of 1, 2, or 4 bytes may be specified. The values of the length fields are
interpreted as follows:
00 ── one-byte length
01 ── two-byte length
10 ── undefined
11 ── four-byte length
• If RWn is 00 (instruction execution), then LENn should also be 00. Any other
length is undefined.
Debug Control Register (DR7)
The low-order eight bits of DR7 (L0 through L3 and G0 through G3) selectively
enable the four address breakpoint conditions.
There are two levels of enabling:
• The local (L0 through L3) and global (G0 through G3) levels. The local enable bits
are automatically reset by the processor at every task switch to avoid unwanted
breakpoint conditions in the new task.
• The global enable bits are not reset by a task switch; therefore, they can be used
for conditions that are global to all tasks.
The LE and GE bits control the "exact data breakpoint match" feature of the
processor. If either LE or GE is set, the processor slows execution so that data
breakpoints are reported on the instruction that causes them. It is recommended
that one of these bits be set whenever data breakpoints are armed. The processor
clears LE at a task switch but does not clear GE.
Debug Control Register (DR6)
• When the processor detects an enabled debug exception, it sets the low-order
bits of this register (B0 thru B3) before entering the debug exception handler.
• Bn is set if the condition described by DRn, LENn, and R/Wn occurs. The BT bit is
associated with the T-bit (debug trap bit) of the TSS. The processor sets the BT bit
before entering the debug handler if a task switch has occurred and the T-bit of
the new TSS is set. There is no corresponding bit in DR7 that enables and disables
this trap; the T-bit of the TSS is the sole enabling bit. The BS bit is associated with
the TF (trap flag) bit of the EFLAGS register. The BS bit is set if the debug handler
is entered due to the occurrence of a single-step exception.
• The single-step trap is the highest-priority debug exception; therefore, when BS is
set, any of the other debug status bits may also be set. The BD bit is set if the next
instruction will read or write one of the eight debug registers and ICE-386 is also
using the debug registers at the same time.
Control Registers
• A Control register is a processor register which controls the general
behavior of a CPU. Common tasks performed by control registers include
interrupt control , switching the addressing mode and paging control.
• The protected mode includes the 4 system control registers, identified as CR0 to
CR3.
• These all are 32 bit registers.
15
• CR2 :- The control register CR2 is used to store the 32-bit linear
address at which the previous page fault was detected(PFLA).
• CS3 :- Used when virtual addressing is enabled, hence when the PG bit
is set in CR0. CR3 enables the processor to translate linear addresses
into physical addresses by locating the page directory and page
tables for the current task. Typically, the upper 20 bits of CR3 become
the page directory base register (PDBR), which stores the physical
address of the first page directory entry
Control Registers
•CR0 :- Register CR0 contains a number of special control bits that are defined as
follow ….
1) PG (pagging) :- if PG is set ,it enables paging and use the CR3 register, else
disable paging.
2) ET (Extension Type):- On the 80386 , it allowed to specify whether the external
math coprocessor was an 80287 or 80387. if ET=0 than it is
80287, else 80387.
3) TS (Task Switch) :- The processor sets TS with every task switch and tests TS
when interpreting coprocessor instructions.
4) EM(Emulation) :- EM indicates whether coprocessor functions are to be
emulated.
5) MP(Monitor) :- MP controls the function of the WAIT instruction, which is
used to coordinate a coprocessor.
6) PE(Protected Mode Enables):-If 1,System is in protected mode, else system is in
real mode.
References
• Intel386™ EX Embedded
Microprocessor Datasheet.
• The INTEL Microprocessors:
8086/8088, 80186/80188, 80286,
80386, 80486, Pentium, Pentium
Pro Processor, Barry B. Brey.
• INTEL 80386 PROGRAMMER'S
REFERENCE MANUAL, 1986, MIT
Press
18
19

More Related Content

What's hot

80386 Architecture
80386 Architecture80386 Architecture
80386 Architecture
Rohit Choudhury
 
block diagram of 8086
block diagram of 8086block diagram of 8086
block diagram of 8086
asrithak
 
Architecture of 8051 microcontroller))
Architecture of 8051 microcontroller))Architecture of 8051 microcontroller))
Architecture of 8051 microcontroller))
Ganesh Ram
 
Introduction to 80386
Introduction to 80386Introduction to 80386
Introduction to 80386
Shehrevar Davierwala
 
INTERRUPTS OF 8086 MICROPROCESSOR
INTERRUPTS OF 8086 MICROPROCESSORINTERRUPTS OF 8086 MICROPROCESSOR
INTERRUPTS OF 8086 MICROPROCESSOR
Gurudev joshi
 
I2C introduction
I2C introductionI2C introduction
I2C introduction
SUNODH GARLAPATI
 
8086 microprocessor-architecture
8086 microprocessor-architecture8086 microprocessor-architecture
8086 microprocessor-architecture
prasadpawaskar
 
Stacks & subroutines 1
Stacks & subroutines 1Stacks & subroutines 1
Stacks & subroutines 1
deval patel
 
MICROCONTROLLER 8051- Architecture & Pin Configuration
MICROCONTROLLER 8051- Architecture & Pin Configuration MICROCONTROLLER 8051- Architecture & Pin Configuration
MICROCONTROLLER 8051- Architecture & Pin Configuration
AKHIL MADANKAR
 
Interrupts of microprocessor 8085
Interrupts of microprocessor  8085Interrupts of microprocessor  8085
Interrupts of microprocessor 8085
mujeebkhanelectronic
 
Microprogrammed Control Unit
Microprogrammed Control UnitMicroprogrammed Control Unit
Microprogrammed Control Unit
PreethiSureshkumar1
 
Addressing modes of 8086
Addressing modes of 8086Addressing modes of 8086
Addressing modes of 8086
saurav kumar
 
8051 MICROCONTROLLER ARCHITECTURE.pptx
 8051 MICROCONTROLLER ARCHITECTURE.pptx 8051 MICROCONTROLLER ARCHITECTURE.pptx
8051 MICROCONTROLLER ARCHITECTURE.pptx
MemonaMemon1
 
Memory Organization
Memory OrganizationMemory Organization
Memory Organization
Kamal Acharya
 
8051 architecture
8051 architecture8051 architecture
8051 architecture
sb108ec
 
Special of 80386 registers
Special of 80386 registersSpecial of 80386 registers
Special of 80386 registers
Tanmoy Mazumder
 
8086 new
8086 new8086 new
Pin Description Diagram of Intel 80386 DX Microprocessor
Pin Description Diagram of Intel 80386 DX MicroprocessorPin Description Diagram of Intel 80386 DX Microprocessor
Pin Description Diagram of Intel 80386 DX Microprocessor
Raunaq Sahni
 
8259 Operating Modes.pptx
8259 Operating Modes.pptx8259 Operating Modes.pptx
8259 Operating Modes.pptx
MeenaAnusha1
 
8086 in minimum mode
8086 in minimum mode8086 in minimum mode
8086 in minimum mode
Sridari Iyer
 

What's hot (20)

80386 Architecture
80386 Architecture80386 Architecture
80386 Architecture
 
block diagram of 8086
block diagram of 8086block diagram of 8086
block diagram of 8086
 
Architecture of 8051 microcontroller))
Architecture of 8051 microcontroller))Architecture of 8051 microcontroller))
Architecture of 8051 microcontroller))
 
Introduction to 80386
Introduction to 80386Introduction to 80386
Introduction to 80386
 
INTERRUPTS OF 8086 MICROPROCESSOR
INTERRUPTS OF 8086 MICROPROCESSORINTERRUPTS OF 8086 MICROPROCESSOR
INTERRUPTS OF 8086 MICROPROCESSOR
 
I2C introduction
I2C introductionI2C introduction
I2C introduction
 
8086 microprocessor-architecture
8086 microprocessor-architecture8086 microprocessor-architecture
8086 microprocessor-architecture
 
Stacks & subroutines 1
Stacks & subroutines 1Stacks & subroutines 1
Stacks & subroutines 1
 
MICROCONTROLLER 8051- Architecture & Pin Configuration
MICROCONTROLLER 8051- Architecture & Pin Configuration MICROCONTROLLER 8051- Architecture & Pin Configuration
MICROCONTROLLER 8051- Architecture & Pin Configuration
 
Interrupts of microprocessor 8085
Interrupts of microprocessor  8085Interrupts of microprocessor  8085
Interrupts of microprocessor 8085
 
Microprogrammed Control Unit
Microprogrammed Control UnitMicroprogrammed Control Unit
Microprogrammed Control Unit
 
Addressing modes of 8086
Addressing modes of 8086Addressing modes of 8086
Addressing modes of 8086
 
8051 MICROCONTROLLER ARCHITECTURE.pptx
 8051 MICROCONTROLLER ARCHITECTURE.pptx 8051 MICROCONTROLLER ARCHITECTURE.pptx
8051 MICROCONTROLLER ARCHITECTURE.pptx
 
Memory Organization
Memory OrganizationMemory Organization
Memory Organization
 
8051 architecture
8051 architecture8051 architecture
8051 architecture
 
Special of 80386 registers
Special of 80386 registersSpecial of 80386 registers
Special of 80386 registers
 
8086 new
8086 new8086 new
8086 new
 
Pin Description Diagram of Intel 80386 DX Microprocessor
Pin Description Diagram of Intel 80386 DX MicroprocessorPin Description Diagram of Intel 80386 DX Microprocessor
Pin Description Diagram of Intel 80386 DX Microprocessor
 
8259 Operating Modes.pptx
8259 Operating Modes.pptx8259 Operating Modes.pptx
8259 Operating Modes.pptx
 
8086 in minimum mode
8086 in minimum mode8086 in minimum mode
8086 in minimum mode
 

Similar to Intel® 80386 microprocessor registers

486 or 80486 DX Architecture
486 or 80486 DX Architecture486 or 80486 DX Architecture
486 or 80486 DX Architecture
Muthusamy Arumugam
 
Microprocessors and microcontrollers
Microprocessors and microcontrollersMicroprocessors and microcontrollers
Microprocessors and microcontrollers
gomathy S
 
Microprocessor 8086
Microprocessor 8086Microprocessor 8086
Microprocessor 8086
Waleed Khan
 
PAI Unit 3 Multitasking in 80386
PAI Unit 3 Multitasking in 80386PAI Unit 3 Multitasking in 80386
PAI Unit 3 Multitasking in 80386
KanchanPatil34
 
Assembly programming
Assembly programmingAssembly programming
Assembly programming
Omar Sanchez
 
Advanced Microprocessors
Advanced MicroprocessorsAdvanced Microprocessors
Advanced Microprocessors
BuddiesSairamit
 
8086
80868086
Ch12 microprocessor interrupts
Ch12 microprocessor interruptsCh12 microprocessor interrupts
Ch12 microprocessor interrupts
University of Technology - Iraq
 
Advanced Microprocessor 6.pptx
Advanced Microprocessor 6.pptxAdvanced Microprocessor 6.pptx
Advanced Microprocessor 6.pptx
ShanDimantha1
 
8051 training an interactive tutorial
8051 training an interactive tutorial8051 training an interactive tutorial
8051 training an interactive tutorial
Futura infotech
 
80386_ Bus Cycles & System Architecture.pdf
80386_ Bus Cycles & System Architecture.pdf80386_ Bus Cycles & System Architecture.pdf
80386_ Bus Cycles & System Architecture.pdf
rupalidalvi10
 
Lect 3 ARM PROCESSOR ARCHITECTURE
Lect 3  ARM PROCESSOR ARCHITECTURE Lect 3  ARM PROCESSOR ARCHITECTURE
Lect 3 ARM PROCESSOR ARCHITECTURE
Dr.YNM
 
8051 Interrupts
8051 Interrupts8051 Interrupts
8051 Interrupts
SaravananVijayakumar4
 
The microprocessor and it's architecture
The microprocessor and it's architectureThe microprocessor and it's architecture
The microprocessor and it's architecture
samaa ali
 
x86_1.ppt
x86_1.pptx86_1.ppt
x86_1.ppt
jeronimored
 
Advanced Microprocessors By Er. Swapnil Kaware
Advanced Microprocessors By Er. Swapnil KawareAdvanced Microprocessors By Er. Swapnil Kaware
Advanced Microprocessors By Er. Swapnil Kaware
Prof. Swapnil V. Kaware
 
Advanced Microprocessors By Er. Swapnil Kaware
Advanced Microprocessors By Er. Swapnil Kaware Advanced Microprocessors By Er. Swapnil Kaware
Advanced Microprocessors By Er. Swapnil Kaware
Prof. Swapnil V. Kaware
 
Pentium (80586) Microprocessor By Er. Swapnil Kaware
Pentium (80586) Microprocessor By Er. Swapnil KawarePentium (80586) Microprocessor By Er. Swapnil Kaware
Pentium (80586) Microprocessor By Er. Swapnil Kaware
Prof. Swapnil V. Kaware
 
c++
c++ c++
c++
Arun Nair
 
Pentium processor
Pentium processorPentium processor
Pentium processor
Pranjali Deshmukh
 

Similar to Intel® 80386 microprocessor registers (20)

486 or 80486 DX Architecture
486 or 80486 DX Architecture486 or 80486 DX Architecture
486 or 80486 DX Architecture
 
Microprocessors and microcontrollers
Microprocessors and microcontrollersMicroprocessors and microcontrollers
Microprocessors and microcontrollers
 
Microprocessor 8086
Microprocessor 8086Microprocessor 8086
Microprocessor 8086
 
PAI Unit 3 Multitasking in 80386
PAI Unit 3 Multitasking in 80386PAI Unit 3 Multitasking in 80386
PAI Unit 3 Multitasking in 80386
 
Assembly programming
Assembly programmingAssembly programming
Assembly programming
 
Advanced Microprocessors
Advanced MicroprocessorsAdvanced Microprocessors
Advanced Microprocessors
 
8086
80868086
8086
 
Ch12 microprocessor interrupts
Ch12 microprocessor interruptsCh12 microprocessor interrupts
Ch12 microprocessor interrupts
 
Advanced Microprocessor 6.pptx
Advanced Microprocessor 6.pptxAdvanced Microprocessor 6.pptx
Advanced Microprocessor 6.pptx
 
8051 training an interactive tutorial
8051 training an interactive tutorial8051 training an interactive tutorial
8051 training an interactive tutorial
 
80386_ Bus Cycles & System Architecture.pdf
80386_ Bus Cycles & System Architecture.pdf80386_ Bus Cycles & System Architecture.pdf
80386_ Bus Cycles & System Architecture.pdf
 
Lect 3 ARM PROCESSOR ARCHITECTURE
Lect 3  ARM PROCESSOR ARCHITECTURE Lect 3  ARM PROCESSOR ARCHITECTURE
Lect 3 ARM PROCESSOR ARCHITECTURE
 
8051 Interrupts
8051 Interrupts8051 Interrupts
8051 Interrupts
 
The microprocessor and it's architecture
The microprocessor and it's architectureThe microprocessor and it's architecture
The microprocessor and it's architecture
 
x86_1.ppt
x86_1.pptx86_1.ppt
x86_1.ppt
 
Advanced Microprocessors By Er. Swapnil Kaware
Advanced Microprocessors By Er. Swapnil KawareAdvanced Microprocessors By Er. Swapnil Kaware
Advanced Microprocessors By Er. Swapnil Kaware
 
Advanced Microprocessors By Er. Swapnil Kaware
Advanced Microprocessors By Er. Swapnil Kaware Advanced Microprocessors By Er. Swapnil Kaware
Advanced Microprocessors By Er. Swapnil Kaware
 
Pentium (80586) Microprocessor By Er. Swapnil Kaware
Pentium (80586) Microprocessor By Er. Swapnil KawarePentium (80586) Microprocessor By Er. Swapnil Kaware
Pentium (80586) Microprocessor By Er. Swapnil Kaware
 
c++
c++ c++
c++
 
Pentium processor
Pentium processorPentium processor
Pentium processor
 

Recently uploaded

gray level transformation unit 3(image processing))
gray level transformation unit 3(image processing))gray level transformation unit 3(image processing))
gray level transformation unit 3(image processing))
shivani5543
 
Certificates - Mahmoud Mohamed Moursi Ahmed
Certificates - Mahmoud Mohamed Moursi AhmedCertificates - Mahmoud Mohamed Moursi Ahmed
Certificates - Mahmoud Mohamed Moursi Ahmed
Mahmoud Morsy
 
john krisinger-the science and history of the alcoholic beverage.pptx
john krisinger-the science and history of the alcoholic beverage.pptxjohn krisinger-the science and history of the alcoholic beverage.pptx
john krisinger-the science and history of the alcoholic beverage.pptx
Madan Karki
 
Manufacturing Process of molasses based distillery ppt.pptx
Manufacturing Process of molasses based distillery ppt.pptxManufacturing Process of molasses based distillery ppt.pptx
Manufacturing Process of molasses based distillery ppt.pptx
Madan Karki
 
CHINA’S GEO-ECONOMIC OUTREACH IN CENTRAL ASIAN COUNTRIES AND FUTURE PROSPECT
CHINA’S GEO-ECONOMIC OUTREACH IN CENTRAL ASIAN COUNTRIES AND FUTURE PROSPECTCHINA’S GEO-ECONOMIC OUTREACH IN CENTRAL ASIAN COUNTRIES AND FUTURE PROSPECT
CHINA’S GEO-ECONOMIC OUTREACH IN CENTRAL ASIAN COUNTRIES AND FUTURE PROSPECT
jpsjournal1
 
Optimizing Gradle Builds - Gradle DPE Tour Berlin 2024
Optimizing Gradle Builds - Gradle DPE Tour Berlin 2024Optimizing Gradle Builds - Gradle DPE Tour Berlin 2024
Optimizing Gradle Builds - Gradle DPE Tour Berlin 2024
Sinan KOZAK
 
DEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODEL
DEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODELDEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODEL
DEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODEL
gerogepatton
 
UNLOCKING HEALTHCARE 4.0: NAVIGATING CRITICAL SUCCESS FACTORS FOR EFFECTIVE I...
UNLOCKING HEALTHCARE 4.0: NAVIGATING CRITICAL SUCCESS FACTORS FOR EFFECTIVE I...UNLOCKING HEALTHCARE 4.0: NAVIGATING CRITICAL SUCCESS FACTORS FOR EFFECTIVE I...
UNLOCKING HEALTHCARE 4.0: NAVIGATING CRITICAL SUCCESS FACTORS FOR EFFECTIVE I...
amsjournal
 
LLM Fine Tuning with QLoRA Cassandra Lunch 4, presented by Anant
LLM Fine Tuning with QLoRA Cassandra Lunch 4, presented by AnantLLM Fine Tuning with QLoRA Cassandra Lunch 4, presented by Anant
LLM Fine Tuning with QLoRA Cassandra Lunch 4, presented by Anant
Anant Corporation
 
22CYT12-Unit-V-E Waste and its Management.ppt
22CYT12-Unit-V-E Waste and its Management.ppt22CYT12-Unit-V-E Waste and its Management.ppt
22CYT12-Unit-V-E Waste and its Management.ppt
KrishnaveniKrishnara1
 
NATURAL DEEP EUTECTIC SOLVENTS AS ANTI-FREEZING AGENT
NATURAL DEEP EUTECTIC SOLVENTS AS ANTI-FREEZING AGENTNATURAL DEEP EUTECTIC SOLVENTS AS ANTI-FREEZING AGENT
NATURAL DEEP EUTECTIC SOLVENTS AS ANTI-FREEZING AGENT
Addu25809
 
Curve Fitting in Numerical Methods Regression
Curve Fitting in Numerical Methods RegressionCurve Fitting in Numerical Methods Regression
Curve Fitting in Numerical Methods Regression
Nada Hikmah
 
ML Based Model for NIDS MSc Updated Presentation.v2.pptx
ML Based Model for NIDS MSc Updated Presentation.v2.pptxML Based Model for NIDS MSc Updated Presentation.v2.pptx
ML Based Model for NIDS MSc Updated Presentation.v2.pptx
JamalHussainArman
 
2008 BUILDING CONSTRUCTION Illustrated - Ching Chapter 02 The Building.pdf
2008 BUILDING CONSTRUCTION Illustrated - Ching Chapter 02 The Building.pdf2008 BUILDING CONSTRUCTION Illustrated - Ching Chapter 02 The Building.pdf
2008 BUILDING CONSTRUCTION Illustrated - Ching Chapter 02 The Building.pdf
Yasser Mahgoub
 
KuberTENes Birthday Bash Guadalajara - K8sGPT first impressions
KuberTENes Birthday Bash Guadalajara - K8sGPT first impressionsKuberTENes Birthday Bash Guadalajara - K8sGPT first impressions
KuberTENes Birthday Bash Guadalajara - K8sGPT first impressions
Victor Morales
 
官方认证美国密歇根州立大学毕业证学位证书原版一模一样
官方认证美国密歇根州立大学毕业证学位证书原版一模一样官方认证美国密歇根州立大学毕业证学位证书原版一模一样
官方认证美国密歇根州立大学毕业证学位证书原版一模一样
171ticu
 
Unit-III-ELECTROCHEMICAL STORAGE DEVICES.ppt
Unit-III-ELECTROCHEMICAL STORAGE DEVICES.pptUnit-III-ELECTROCHEMICAL STORAGE DEVICES.ppt
Unit-III-ELECTROCHEMICAL STORAGE DEVICES.ppt
KrishnaveniKrishnara1
 
Comparative analysis between traditional aquaponics and reconstructed aquapon...
Comparative analysis between traditional aquaponics and reconstructed aquapon...Comparative analysis between traditional aquaponics and reconstructed aquapon...
Comparative analysis between traditional aquaponics and reconstructed aquapon...
bijceesjournal
 
Introduction to AI Safety (public presentation).pptx
Introduction to AI Safety (public presentation).pptxIntroduction to AI Safety (public presentation).pptx
Introduction to AI Safety (public presentation).pptx
MiscAnnoy1
 
Material for memory and display system h
Material for memory and display system hMaterial for memory and display system h
Material for memory and display system h
gowrishankartb2005
 

Recently uploaded (20)

gray level transformation unit 3(image processing))
gray level transformation unit 3(image processing))gray level transformation unit 3(image processing))
gray level transformation unit 3(image processing))
 
Certificates - Mahmoud Mohamed Moursi Ahmed
Certificates - Mahmoud Mohamed Moursi AhmedCertificates - Mahmoud Mohamed Moursi Ahmed
Certificates - Mahmoud Mohamed Moursi Ahmed
 
john krisinger-the science and history of the alcoholic beverage.pptx
john krisinger-the science and history of the alcoholic beverage.pptxjohn krisinger-the science and history of the alcoholic beverage.pptx
john krisinger-the science and history of the alcoholic beverage.pptx
 
Manufacturing Process of molasses based distillery ppt.pptx
Manufacturing Process of molasses based distillery ppt.pptxManufacturing Process of molasses based distillery ppt.pptx
Manufacturing Process of molasses based distillery ppt.pptx
 
CHINA’S GEO-ECONOMIC OUTREACH IN CENTRAL ASIAN COUNTRIES AND FUTURE PROSPECT
CHINA’S GEO-ECONOMIC OUTREACH IN CENTRAL ASIAN COUNTRIES AND FUTURE PROSPECTCHINA’S GEO-ECONOMIC OUTREACH IN CENTRAL ASIAN COUNTRIES AND FUTURE PROSPECT
CHINA’S GEO-ECONOMIC OUTREACH IN CENTRAL ASIAN COUNTRIES AND FUTURE PROSPECT
 
Optimizing Gradle Builds - Gradle DPE Tour Berlin 2024
Optimizing Gradle Builds - Gradle DPE Tour Berlin 2024Optimizing Gradle Builds - Gradle DPE Tour Berlin 2024
Optimizing Gradle Builds - Gradle DPE Tour Berlin 2024
 
DEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODEL
DEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODELDEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODEL
DEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODEL
 
UNLOCKING HEALTHCARE 4.0: NAVIGATING CRITICAL SUCCESS FACTORS FOR EFFECTIVE I...
UNLOCKING HEALTHCARE 4.0: NAVIGATING CRITICAL SUCCESS FACTORS FOR EFFECTIVE I...UNLOCKING HEALTHCARE 4.0: NAVIGATING CRITICAL SUCCESS FACTORS FOR EFFECTIVE I...
UNLOCKING HEALTHCARE 4.0: NAVIGATING CRITICAL SUCCESS FACTORS FOR EFFECTIVE I...
 
LLM Fine Tuning with QLoRA Cassandra Lunch 4, presented by Anant
LLM Fine Tuning with QLoRA Cassandra Lunch 4, presented by AnantLLM Fine Tuning with QLoRA Cassandra Lunch 4, presented by Anant
LLM Fine Tuning with QLoRA Cassandra Lunch 4, presented by Anant
 
22CYT12-Unit-V-E Waste and its Management.ppt
22CYT12-Unit-V-E Waste and its Management.ppt22CYT12-Unit-V-E Waste and its Management.ppt
22CYT12-Unit-V-E Waste and its Management.ppt
 
NATURAL DEEP EUTECTIC SOLVENTS AS ANTI-FREEZING AGENT
NATURAL DEEP EUTECTIC SOLVENTS AS ANTI-FREEZING AGENTNATURAL DEEP EUTECTIC SOLVENTS AS ANTI-FREEZING AGENT
NATURAL DEEP EUTECTIC SOLVENTS AS ANTI-FREEZING AGENT
 
Curve Fitting in Numerical Methods Regression
Curve Fitting in Numerical Methods RegressionCurve Fitting in Numerical Methods Regression
Curve Fitting in Numerical Methods Regression
 
ML Based Model for NIDS MSc Updated Presentation.v2.pptx
ML Based Model for NIDS MSc Updated Presentation.v2.pptxML Based Model for NIDS MSc Updated Presentation.v2.pptx
ML Based Model for NIDS MSc Updated Presentation.v2.pptx
 
2008 BUILDING CONSTRUCTION Illustrated - Ching Chapter 02 The Building.pdf
2008 BUILDING CONSTRUCTION Illustrated - Ching Chapter 02 The Building.pdf2008 BUILDING CONSTRUCTION Illustrated - Ching Chapter 02 The Building.pdf
2008 BUILDING CONSTRUCTION Illustrated - Ching Chapter 02 The Building.pdf
 
KuberTENes Birthday Bash Guadalajara - K8sGPT first impressions
KuberTENes Birthday Bash Guadalajara - K8sGPT first impressionsKuberTENes Birthday Bash Guadalajara - K8sGPT first impressions
KuberTENes Birthday Bash Guadalajara - K8sGPT first impressions
 
官方认证美国密歇根州立大学毕业证学位证书原版一模一样
官方认证美国密歇根州立大学毕业证学位证书原版一模一样官方认证美国密歇根州立大学毕业证学位证书原版一模一样
官方认证美国密歇根州立大学毕业证学位证书原版一模一样
 
Unit-III-ELECTROCHEMICAL STORAGE DEVICES.ppt
Unit-III-ELECTROCHEMICAL STORAGE DEVICES.pptUnit-III-ELECTROCHEMICAL STORAGE DEVICES.ppt
Unit-III-ELECTROCHEMICAL STORAGE DEVICES.ppt
 
Comparative analysis between traditional aquaponics and reconstructed aquapon...
Comparative analysis between traditional aquaponics and reconstructed aquapon...Comparative analysis between traditional aquaponics and reconstructed aquapon...
Comparative analysis between traditional aquaponics and reconstructed aquapon...
 
Introduction to AI Safety (public presentation).pptx
Introduction to AI Safety (public presentation).pptxIntroduction to AI Safety (public presentation).pptx
Introduction to AI Safety (public presentation).pptx
 
Material for memory and display system h
Material for memory and display system hMaterial for memory and display system h
Material for memory and display system h
 

Intel® 80386 microprocessor registers

  • 1. Intel® 80386 Microprocessor: FLAG REGISTER AND DEBUG AND CONTROL REGISTER
  • 2. Intel® 80386 Microprocessor • The 80386 processor dramatically extended the 8086 register set. • In addition to all the registers on the 80286 (and therefore, the 8086), the 80386 added several new registers and extended the definition of the existing registers. 2
  • 3. Intel® 80386 Microprocessor: Flag Register 3 •Flag Register of 80386: The Flag register of 80386 is a 32 bit register. Out of the 32 bits, Intel has reserved bits D18 to D31, D5 and D3, while D1 is always set at 1.Two extra new flags are added to the 80286 flag to derive the flag register of 80386. They are VM and RF flags.
  • 4. Intel® 80386 Microprocessor: Flag Register • C (Carry) –It holds the carry after calculations. • P (Parity) –Parity is a logic 0 for odd parity and a logic 1 for even parity. Parity is a count of ones in a number expressed as even or odd. • A (Auxiliary carry) –Carry occurs bits positions 3 and 5 of the results. • Z (Zero) – The zero flag shows that the result of an arithmetic or logical operation is zero. When Z = 1, the result is zero. When Z = 0, the result was non-zero. • T (Trap) – Enables trapping through an on-chip debugging facility. 4
  • 5. Intel® 80386 Microprocessor: Flag Register (CONT’D) • S (Sign) – The sign flag holds the arithmetic sign after an arithmetic or a logical operation. If S =1 the sign bit is set and the result is negative. If S = 0, the sign bit is not set and the result is positive. • I (Interrupt) – The interrupt flag controls the operations of the INTR(Interrupt request) input pint. If I =1, the INTR pin is enabled; if I =0, the INTR pin is disabled. • VM (virtual mode) – If this flag set, the 80386 enters the virtual mode within the protected mode. In this mode, if any privileged instruction is executed, an exception 13 is generated. 5
  • 6. Intel® 80386 Microprocessor: Flag Register (CONT’D) 6 • 9. RF(resume) – The resume flag is used with debugging to control the resumption of execution after the next instruction. • 10. NT (nested task) – The nested task flag is used to indicate that the current task is nested within another task in protected mode operation. This flag is set when the task nested by software. • 11. IOPL (I/O Privilege level) – IOPL is used in protected mode operation to select the privilege level for I/O devices. IF the current privilege level is higher or more trusted than the IOPL, I/O executed without hindrance. If the IOPL is lower than the current privilege level, an interrupt occurs.
  • 7. • VM - Virtual Mode Flag : If this flag is set, the 80386 enters the virtual 8086 mode within the protection mode. This is to be set only when the 80386 is in protected mode. In this mode, if any privileged instruction is executed an exception 13 is generated. This bit can be set using IRET instruction or any task switch operation only in the protected mode. •RF- Resume Flag : This flag is used with the debug register breakpoints. It is checked at the starting of every instruction cycle and if it is set, any debug fault is ignored during the instruction cycle. The RF is automatically reset after successful execution of every instruction, except for IRET and POPF instructions. 7
  • 8. 8
  • 10. Debug Address Registers (DR0-DR3) • Each of these registers contains the linear address associated with one of four breakpoint conditions. • The debug address registers are effective whether or not paging is enabled. • The addresses in these registers are linear addresses. If paging is enabled, the linear addresses are translated into physical addresses by the processor's paging mechanism. • If paging is not enabled, these linear addresses are the same as physical addresses.
  • 11. Debug Control Register (DR7) • For each address in registers DR0-DR3, the corresponding fields R/W0 through R/W3 specify the type of action that should cause a breakpoint. The processor interprets these bits as follows: 00 ── Break on instruction execution only 01 ── Break on data writes only 10 ── undefined 11 ── Break on data reads or writes but not instruction fetches
  • 12. Debug Control Register (DR7) • Fields LEN0 through LEN3 specify the length of data item to be monitored. A length of 1, 2, or 4 bytes may be specified. The values of the length fields are interpreted as follows: 00 ── one-byte length 01 ── two-byte length 10 ── undefined 11 ── four-byte length • If RWn is 00 (instruction execution), then LENn should also be 00. Any other length is undefined.
  • 13. Debug Control Register (DR7) The low-order eight bits of DR7 (L0 through L3 and G0 through G3) selectively enable the four address breakpoint conditions. There are two levels of enabling: • The local (L0 through L3) and global (G0 through G3) levels. The local enable bits are automatically reset by the processor at every task switch to avoid unwanted breakpoint conditions in the new task. • The global enable bits are not reset by a task switch; therefore, they can be used for conditions that are global to all tasks. The LE and GE bits control the "exact data breakpoint match" feature of the processor. If either LE or GE is set, the processor slows execution so that data breakpoints are reported on the instruction that causes them. It is recommended that one of these bits be set whenever data breakpoints are armed. The processor clears LE at a task switch but does not clear GE.
  • 14. Debug Control Register (DR6) • When the processor detects an enabled debug exception, it sets the low-order bits of this register (B0 thru B3) before entering the debug exception handler. • Bn is set if the condition described by DRn, LENn, and R/Wn occurs. The BT bit is associated with the T-bit (debug trap bit) of the TSS. The processor sets the BT bit before entering the debug handler if a task switch has occurred and the T-bit of the new TSS is set. There is no corresponding bit in DR7 that enables and disables this trap; the T-bit of the TSS is the sole enabling bit. The BS bit is associated with the TF (trap flag) bit of the EFLAGS register. The BS bit is set if the debug handler is entered due to the occurrence of a single-step exception. • The single-step trap is the highest-priority debug exception; therefore, when BS is set, any of the other debug status bits may also be set. The BD bit is set if the next instruction will read or write one of the eight debug registers and ICE-386 is also using the debug registers at the same time.
  • 15. Control Registers • A Control register is a processor register which controls the general behavior of a CPU. Common tasks performed by control registers include interrupt control , switching the addressing mode and paging control. • The protected mode includes the 4 system control registers, identified as CR0 to CR3. • These all are 32 bit registers. 15
  • 16. • CR2 :- The control register CR2 is used to store the 32-bit linear address at which the previous page fault was detected(PFLA). • CS3 :- Used when virtual addressing is enabled, hence when the PG bit is set in CR0. CR3 enables the processor to translate linear addresses into physical addresses by locating the page directory and page tables for the current task. Typically, the upper 20 bits of CR3 become the page directory base register (PDBR), which stores the physical address of the first page directory entry
  • 17. Control Registers •CR0 :- Register CR0 contains a number of special control bits that are defined as follow …. 1) PG (pagging) :- if PG is set ,it enables paging and use the CR3 register, else disable paging. 2) ET (Extension Type):- On the 80386 , it allowed to specify whether the external math coprocessor was an 80287 or 80387. if ET=0 than it is 80287, else 80387. 3) TS (Task Switch) :- The processor sets TS with every task switch and tests TS when interpreting coprocessor instructions. 4) EM(Emulation) :- EM indicates whether coprocessor functions are to be emulated. 5) MP(Monitor) :- MP controls the function of the WAIT instruction, which is used to coordinate a coprocessor. 6) PE(Protected Mode Enables):-If 1,System is in protected mode, else system is in real mode.
  • 18. References • Intel386™ EX Embedded Microprocessor Datasheet. • The INTEL Microprocessors: 8086/8088, 80186/80188, 80286, 80386, 80486, Pentium, Pentium Pro Processor, Barry B. Brey. • INTEL 80386 PROGRAMMER'S REFERENCE MANUAL, 1986, MIT Press 18
  • 19. 19