Making an OS (x86) Chapter 6 - Entering Protected mode, GDT

preview_player
Показать описание
Corrections:
- You could actually use colors in real mode as well, by setting the bl register
- I wrote binary values as 010010 instead of 0b010010

Coupon code: DAEDALUS

Full Code:

OSDev articles for exercise:

0:00 - Intro
0:09 - Sponsored Segment
1:57 - Protected mode
2:57 - GDT
8:50 - Switching to PM
Рекомендации по теме
Комментарии
Автор

Please don't stop this series. Follow through to the end! I really liked Poncho's OS series, but he decided to drop it. This is a good quality series!

jlhs-xbwo
Автор

You may not finish the series but it definitely helped alot of people to put them on the track of os development. this is by far the most informative video series I've ever watched .

graveyard
Автор

Finally understood how the gdt works.... Thanks a lot man..

maheswaranparameswaran
Автор

I like people that make thing like this it really helps me out

martinojalill
Автор

This playlist was awesome. You delivered what I’ve been looking for in a very concise illustrative and digestible way. Thank you very very much !

cangozpinar
Автор

Молоток, все разложено по полочкам, язык понятен. Скачал весь плейлист.

MrDimonsky
Автор

what a perfect incredible fantastic tutorial. please continue with it

flochforster
Автор

Great content! Thank you for sharing your knowledge to us. God bless you sir!

JE-szyb
Автор

Thank gosh i resolved my mental problem with this

saveriokarol
Автор

Thank you for making this video, it was very helpful and informationally!

Rudolf
Автор

I like how you casually went through privilege levels ;)

zee
Автор

This video may be a year old, but I accidentally made a great animation in VGA graphics mode. It may be 16 bit, but I guess it can be called before entering protected mode as a nice boot screen of sort. I implemented it into the real mode version of my OS and the start of my 32 bit OS - as a boot screen. I may post the code (it will exit graphics mode and go back to text mode since my brain is not working well enough to print a font) but I may only do that if there's demand :P

cirkulx
Автор

I can´t wait for the next vidio thanks

EdgarPatron
Автор

I made a printChar and a printStr functions. I'll share them here. The comments describe what they need. (also the x and y values must be in multiple of 2. if you want x = 1, you give it 2)

; prints single character
; 'al' should contain character
; 'ah' should contain the hex color of text
; 'ecx' is the x axis
; 'edx' is the y axis
printChar:
mov esi, 0xb8000
mov edi, edx
imul edi, 80
add edi, ecx
add esi, edi
mov [esi], ax
ret

; prints string of characters (must end with a null terminator)
; 'bx' must contain start location of string
; 'ah' should contain the hex color of text
; 'ecx' is the x axis
; 'edx' is the y axis
printStr:
pr_loop:
mov al, [bx]
cmp al, 0
je return
call printChar
add ecx, 2
inc bx
jmp pr_loop

; Used to return during conditional jumps
return:
ret

Ali-vlg
Автор

i may or may not have accidentally made it so it prints A (color of blue on red) over the entire video ram and probably go into normal memory

trucookieq
Автор

it's a bit late but I made a black A with blue background (not that intresting) insted of mov ah, 0x0f I did 0x10

jultomten
Автор

Ok, question
Does the CPU always threat the video as memory?

Why did the code there make an white A instead of just one pixel

Im exited for the time we'll finally write something on c/c++

agoogleuser
Автор

In GDT you make CODE_SEG equ … but in switching to protected mode you typed jmp CODESEG:… (where is the underscore?)??

BlackneeedWasHere
Автор

I dont understand this line
jmp CODE_SEG:start_protected_mode

both were declared as offsets in the code, so in which segment is this even making a jump to?

DrittesKonto
Автор

10:04 - what is jmp CODESEG:start_protected_mode - where do we have CODESEG from, and why we do not jump simply to start_protected_mode?

MrDimonsky
join shbcf.ru