mirror of
https://github.com/cfenollosa/os-tutorial.git
synced 2024-10-27 20:34:19 +00:00
lessons 8, 9, 10, entering 32-bit mode
This commit is contained in:
parent
f6e71806d5
commit
adc8463383
@ -4,14 +4,16 @@ memory*
|
|||||||
**Goal: Print on the screen when on 32-bit protected mode**
|
**Goal: Print on the screen when on 32-bit protected mode**
|
||||||
|
|
||||||
32-bit mode allows us to use 32 bit registers and memory addressing,
|
32-bit mode allows us to use 32 bit registers and memory addressing,
|
||||||
protected memory, virtual memory and other advangades, but we will lose
|
protected memory, virtual memory and other advantages, but we will lose
|
||||||
BIOS interrupts and we'll need to code the GDT (more on this later)
|
BIOS interrupts and we'll need to code the GDT (more on this later)
|
||||||
|
|
||||||
In this lesson we will write a print string routine by directly manipulating
|
In this lesson we will write a new print string routine which works in
|
||||||
|
32-bit mode, where we don't have BIOS interrupts, by directly manipulating
|
||||||
the VGA video memory instead of calling `int 0x10`. The VGA memory starts
|
the VGA video memory instead of calling `int 0x10`. The VGA memory starts
|
||||||
at address `0xb8000` and it has a text mode which is useful to avoid
|
at address `0xb8000` and it has a text mode which is useful to avoid
|
||||||
manipulating direct pixels.
|
manipulating direct pixels.
|
||||||
|
|
||||||
|
|
||||||
The formula for accessing a specific character on the 80x25 grid is:
|
The formula for accessing a specific character on the 80x25 grid is:
|
||||||
|
|
||||||
`0xb8000 + 2 * (row * 80 + col)`
|
`0xb8000 + 2 * (row * 80 + col)`
|
||||||
|
Loading…
Reference in New Issue
Block a user