Skip to content

Marsel-marsel/protected-mode-80386

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

Motivation

Learning CPU 'protected mode'. Manually initialize global table descriptors, GDTR registers, CR0 register and execute some code from previously initialized memory segments.

Description

  1. Craft two memory descriptors: first descriptor's linear memory starts somewhere in between 0x7C00:0x7E00 (Master Boot Record). Second descriptor's linear address starts from 0xB8000 (Video Memory)
  2. Initialize GDTR register
  3. Switch 0th bit of CR0 to 1 (enable protected mode)
  4. Jump to code of selector 8 (descriptor one) - copy bytes into second descriptor's memory
  5. Observe text on display

Demo

About

Switch processor from real to protected mode

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published