OSDev.org

The Place to Start for Operating System Developers
It is currently Tue Apr 23, 2024 10:59 am

All times are UTC - 6 hours




Post new topic Reply to topic  [ 6 posts ] 
Author Message
 Post subject: Os development help
PostPosted: Sun Apr 09, 2017 6:09 am 
Offline

Joined: Wed Mar 08, 2017 1:58 am
Posts: 8
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!


Top
 Profile  
 
 Post subject: OS development question
PostPosted: Sun Apr 09, 2017 6:44 am 
Offline

Joined: Wed Mar 08, 2017 1:58 am
Posts: 8
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??


Top
 Profile  
 
 Post subject: Re: OS development question
PostPosted: Sun Apr 09, 2017 9:37 am 
Offline
Member
Member
User avatar

Joined: Fri Jan 27, 2017 12:15 pm
Posts: 149
Location: Belgium
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".

_________________
AQUA OS: https://obiwac.wordpress.com/aqua-os/


Top
 Profile  
 
 Post subject: Re: OS development question
PostPosted: Sun Apr 09, 2017 10:17 am 
Offline
Member
Member
User avatar

Joined: Sat Mar 31, 2012 3:07 am
Posts: 4594
Location: Chichester, UK
It sounds to me as if the printer function is writing the graphic of the "\n" to the screen rather than processing it correctly.


Top
 Profile  
 
 Post subject: Re: Os development help
PostPosted: Sun Apr 09, 2017 4:12 pm 
Offline
Member
Member

Joined: Sat Feb 27, 2010 8:55 pm
Posts: 147
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.


Top
 Profile  
 
 Post subject: Re: OS development help
PostPosted: Mon Apr 10, 2017 6:28 am 
Offline

Joined: Wed Mar 08, 2017 1:58 am
Posts: 8
Thanks for the help.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 posts ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: Majestic-12 [Bot] and 125 guests


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 post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group