flat assembler
Message board for the users of flat assembler.

Index > OS Construction > loading kernel, switching to pmode then jump into kernel?

Author
Thread Post new topic Reply to topic
qyte



Joined: 13 Aug 2006
Posts: 6
qyte
Hi,

after getting my FAT12 bootloader to work i got stuck on the last part. I'm loading the Kernel into Memory-Segment 0x1000. Then jmp 0x1000:0x0000 works just fine.

But if I try to switch to protected mode before the jump into segment 1000h the bootloader crashes. Could someone please explain how I can do my jmp 0x1000:0x0000 in pmode?

Thanks in advance.
Post 28 Dec 2006, 00:45
View user's profile Send private message Reply with quote
hckr83



Joined: 12 Nov 2006
Posts: 86
Location: usa
hckr83
Did you load a temporary gdt first?
in pmode you don't use segments like that
first(after setting up a gdt) you should load the proper segments
like if your data segment is 0x08 and code is 0x10 then you would do
mov ax,0x08
mov ds,ax
mov ss,ax
mov es,ax
mov gs,ax
mov fs,ax
jmp 0x10:0x10000

read some tutorials over pmode @ osdever.net for better explanation..
Post 28 Dec 2006, 01:04
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger Reply with quote
qyte



Joined: 13 Aug 2006
Posts: 6
qyte
thx, man this one did the trick.

also thanks for the hint. osdever.net got a huge number of tutorials about OSdevelopment, just incredible Shocked
Post 28 Dec 2006, 02:01
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2020, Tomasz Grysztar. Also on YouTube, Twitter.

Website powered by rwasa.