Skip to content
VUBuddy

CS401 Short Notes Chapter 15

Computer Architecture and Assembly Language Programming PDF 302 KBUpdated 23 Oct 2026
Quiz CS401 Short Notes Chapter 15 PDF 302 KB
vubuddy.com
Type
Quiz
Course
CS401 Computer Architecture and Assembly Language Programming
Size
PDF 302 KB
Updated
23 Oct 2026
Free download 0 of 3 used today
Download free · 302 KB

You get 3 free files a day on the website. Add the Chrome extension for 30 a day.

Unlimited downloads in the Android app Get it free on Google Play

Preview text

Text from pages 1, 2, 3 of 5. Download the file for all 5 pages.

Short Notes Chapter 15 (Lecture 39-43):

Protected Mode:

Switching processor in the newer 32-bit mode is a very easy task. Just turn on the least significant bit of a new register called CR0 (Control Register 0) and the processor switches into 32-bit mode called protected mode. However, manipulations in the protected mode are very different from those in the read mode.

Extended registers:

All registers in 386 have been extended to 32-bits. The new names are EAX, EBX, ECX, EDX, ESI, EDI, ESP, EBP, EIP, and EFLAGS. The original names refer to the lower 16-bits of these registers. A 32-bit address register can access up to 4GB of memory so memory access has increased a lot.

Segment selectors:

We call segment registers as segment selectors and they are still 16-bits wide. We are also given two other segment selectors FS and GS for no specific purpose just like ES.

The working of segment registers as being multiplied by 10 and added into the offset for obtaining the physical address is totally changed.

Working of segment selector:

Now the selector is just an index into an array of segment descriptors where each descriptor describes the base, limit, and attributes of a segment.

Role of selector is to select on descriptor from the table of descriptors and the role of descriptor is to define the actual base address.

For example, an operating system can define the possible descriptors for a program and the program is bound to select one of them and nothing else. This sentence also hints that the processor has some sense of programs that can or cannot do certain things like change this table of descriptors. This is called the privilege level of the program and varies for 0 (highest privilege) to 3 (lowest privilege).

Format of a selector:

The format of a selector is shown below.

The table index (TI):

TI is set to 0 to access the global table of descriptors called the GDT (Global Descriptor Table).

It is set to 1 to access another table, the local descriptor table (LDT).

RPL:

RPL is the requested privilege level that ranges from 0-3 and informs what privilege level the program wants when using this descriptor.

Index:

The 13-bit index is the actual index into the GDT to select the appropriate descriptor. 13 bits mean that a maximum of 8192 descriptors are possible in the GDT.

GDT:

The GDT itself is an array of descriptors where each descriptor is an 8-byte entry. The base and limit of GDT is stored in a 48-bit register called the GDTR.

This register is loaded with a special instruction LGDT and is given a memory address from where the 48-bits are fetched.

The first entry of the GDT must always be zero. It is called the null descriptor. After that any number of entries up to a maximum of 8191 can follow.

Format of code & data descriptor:

The format of a code and data descriptor is shown below. The 32-bit base in both descriptors is scattered into different places because of compatibility reasons.

The limit is stored in 20 bits but the G bit defines that the limit is in terms of bytes of 4K pages therefore a maximum of 4GB size is possible.

The P bit must be set to signal that this segment is present in memory.

DPL is the descriptor privilege level again related to the protection levels in 386.

D bit defines that this segment is to execute code is 16-bit mode or 32bit mode.

C is conforming bit.

R signals that the segment is readable.

A bit is automatically set whenever the segment is accessed.

The combination of S (system) and X (executable) tell that the descriptor is a code or a data descriptor.

All CS401 files →
CS401 Computer Architecture and Assembly Language Programming All CS401 handouts, past papers, quizzes and MCQs in one place. Open course page

Get more out of VUBuddy, for free

Android app Free on Google Play
  • Unlimited downloads
  • The explanation behind every MCQ answer
  • Study offline on slow data
Get the Android app
Chrome extension Free on the Chrome Web Store
  • 30 downloads a day instead of 3
  • Sign in and buy Pro Semester here
Add to Chrome

One Pro Semester membership works in both the extension and the app.