Skip to content

Latest commit

 

History

History
17 lines (15 loc) · 646 Bytes

README.MD

File metadata and controls

17 lines (15 loc) · 646 Bytes

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