Assignment N0.7 - GDTR Writeup
Assignment N0.7 - GDTR Writeup
Experiments No:7
Subject:MPL Department :Computer Engg. Class: SE COMP
Title: display the values of GDTR, LDTR, IDTR,TR and MSW Registers
Problem Statement: Write X86/64 ALP to detect protected mode and display the values of
GDTR, LDTR, IDTR,TR and MSW Registers also identify CPU type using CPUID instruction.
Objective:
Hardware Requirement: NA
Software Requirement: OS:Ubuntu Assembler: NASM version 2.16.07 Linker: ld
I/O addresses and peripheral hardware. Real mode provides no support for memory protection,
multitasking, or code privilege levels.
Protected Mode:
In computing, protected mode, also called protected virtual address mode is an operational
mode of x86-compatible central processing units (CPUs). It allows system software to use
features such as virtual memory, paging and safe multi-tasking designed to increase an
operating system's control over application software.
When a processor that supports x86 protected mode is powered on, it begins executing
instructions in real mode, in order to maintain backward compatibility with earlier x86
processors. Protected mode may only be entered after the system software sets up several
descriptor tables and enables the Protection Enable (PE) bit in the control register 0 (CR0).
Control Register :
Algorithm :
1. Start
Department of Computer Engineering Microprocessor Laboratory (2019 course)
Conclusion: Hence we performed an ALP to program to use GDTR, LDTR and IDTR in
Real Mode
Assignment Question:
1. Explain instruction set of SMSW,SGDT,SLDT, STR?
2. What is GDT and GDTR?
3. What is LDT and LDTR?
4. What is IDT and IDTR?
5. What is selector?
6. Function of Descriptor (GDT ,LDT ,IDT) ?
7. What is mean by Interrupt Handler?
8. Explain Difference between Real Mode & Protected Mode?
9. Explain CR0 in Detail:
10. Explain POST Sequence?
11. Explain Flowchart of Real to Protected Mode Switch?