Page 1 of 1
Os development help
Posted: Sun Apr 09, 2017 6:09 am
by ankitbehera2670
hi I am following the meaty os tutorial. I am currently using grub as the bootloader but I want to use a custom bootloader for my os. As i am new to this I have no idea about how to do that. Please help me!
OS development question
Posted: Sun Apr 09, 2017 6:44 am
by ankitbehera2670
HI I am following the meaty os tutorial but when i run the os in virtualbox, It displays my message but also displays letter "o" at the end of the line. Is it some type of problem??
Re: OS development question
Posted: Sun Apr 09, 2017 9:37 am
by obiwac
This might not be the answer to your problem, but check that you have not mistaken any zeros with the letter o. If you wanted to insert a null character in a string, you would do "some text\0" but you might have done "some text\o".
Re: OS development question
Posted: Sun Apr 09, 2017 10:17 am
by iansjack
It sounds to me as if the printer function is writing the graphic of the "\n" to the screen rather than processing it correctly.
Re: Os development help
Posted: Sun Apr 09, 2017 4:12 pm
by azblue
ankitbehera2670 wrote:hi I am following the meaty os tutorial. I am currently using grub as the bootloader but I want to use a custom bootloader for my os. As i am new to this I have no idea about how to do that. Please help me!
Make sure you code your bootloader for 16 bit real mode (you'd be surprised how many people think it'll run in 32 bit protected mode just because they wrote "[bits32]"!) You'll probably want to set all your segments to 0 and start your code with "org 7c00h".
You'll want to familiarize yourself with Ralf Brown:
http://www.ctyme.com/rbrown.htm
The BIOS will give you your drive number in the dl register; use that when calling the BIOS disk read function (int 13h function 2 or 42h).
Load sectors for whatever runs next (2nd stage bootloader, kernel startup program, kernel itself).
You probably want to be in protected mode before loading your kernel: remap the PIC, setup a GDT, set the PM bit in CR0, and far jump to your PM code.
Re: OS development help
Posted: Mon Apr 10, 2017 6:28 am
by ankitbehera2670
Thanks for the help.