If you use a normal real mode boot loader can the code he loads be 32bits or has it to be 16bits?
Or do you need a pm boot loader en then let him load the 32bit code then switch to unreal mode? ???
How to boot a unreal mode kernel?
Re:How to boot a unreal mode kernel?
You can load any kind of code you want, as long as you only execute 16 bit code when in real mode. If you load 32 bit code then you will need to be in full 32 bit Protected Mode to execute it, because in real mode (and unreal mode) the processor only uses IP and 32 bit code needs EIP.
Hope this helps.
Hope this helps.
Re:How to boot a unreal mode kernel?
Thx
I used Free Pascal 2 output nams code then build it with nasm to a bin file.
So it wil be 32bit code what means it wil hang on real mode :'(
So i have to use a 16bit compiler that outputs nasm code. Then it should work?
I used Free Pascal 2 output nams code then build it with nasm to a bin file.
So it wil be 32bit code what means it wil hang on real mode :'(
So i have to use a 16bit compiler that outputs nasm code. Then it should work?
Re:How to boot a unreal mode kernel?
You should probably learn how to write your boot loader yourself in asm, you will learn alot about the boot process and you will be able to write better code than the compiler.
There are many boot loaders that you can learn from on this forum, I also have a little example boot loader and kernel that you can use in any way you want. If you want it you can get it here http://home.kooee.com.au/tim_danielle/o ... kernel.zip.
It isn't very well commented but you should be able to catch on.
However if you are content to write it in a high level language then go for it, you will have to be careful when it comes to low level memory structures and registers like the GDTR, IDTR and stuff like that, so I would recommend that you learn a little asm (if you dont already know that is ) and write your boot loader in that.
Anyway, Good Luck!
There are many boot loaders that you can learn from on this forum, I also have a little example boot loader and kernel that you can use in any way you want. If you want it you can get it here http://home.kooee.com.au/tim_danielle/o ... kernel.zip.
It isn't very well commented but you should be able to catch on.
However if you are content to write it in a high level language then go for it, you will have to be careful when it comes to low level memory structures and registers like the GDTR, IDTR and stuff like that, so I would recommend that you learn a little asm (if you dont already know that is ) and write your boot loader in that.
Anyway, Good Luck!
Re:How to boot a unreal mode kernel?
k thx i will try pmode because i want to use pascal and asm code
Re:How to boot a unreal mode kernel?
Hmmm....why make your OS in pascal?
Any special need? It seems that C/C++ is more widly used...and more you can use more code/people can more of you OS's code.
Any special need? It seems that C/C++ is more widly used...and more you can use more code/people can more of you OS's code.