OSDev.org

The Place to Start for Operating System Developers
It is currently Thu Mar 28, 2024 5:07 pm

All times are UTC - 6 hours




Post new topic Reply to topic  [ 13 posts ] 
Author Message
 Post subject: Help me write an x64 OS making tutorial!
PostPosted: Tue Jan 24, 2017 4:58 pm 
Offline

Joined: Tue Jan 24, 2017 8:01 am
Posts: 2
Hi! :D

I've visited making a bootloader once or twice before (https://github.com/cfenollosa/os-tutorial) but I never actually understood it well. Some of my questions were "What do all the registers mean?" and "Why are we using a 16 and 32 bit mode, and not just a 64-bit mode? What do modes even mean?"

So I'm calling for help to make a tutorial on how to build a basic operating system. One where you don't have to Google every single thing or go back to previous pages. Here's how I'm probably going to structure it:

[list=]
Introduction to ASM: Printing "Hello, World!"
ASM: What are registers and what do they mean?
ASM: Preparing to load up a kernel
C: Your first kernel
C: Drawing shapes
C: Taking input
[/list]

The parts are short because I only want to go over the basics, but this whole time I've been assuming that you don't have to enable a 16 or 32 bit mode to enter it. (This is due to the confusion of many tutorials surrounding loading a kernel.)


Top
 Profile  
 
 Post subject: Re: Help me write an x64 OS making tutorial!
PostPosted: Tue Jan 24, 2017 5:07 pm 
Offline
Member
Member

Joined: Sun Feb 01, 2009 6:11 am
Posts: 1070
Location: Germany
Please don't write another tutorial that misleads beginners by telling them to write a boot sector. Even more importantly, don't write a tutorial while you're still a beginner yourself.

_________________
Developer of tyndur - community OS of Lowlevel (German)


Top
 Profile  
 
 Post subject: Re: Help me write an x64 OS making tutorial!
PostPosted: Tue Jan 24, 2017 5:13 pm 
Offline

Joined: Mon Aug 29, 2016 12:33 pm
Posts: 8
The main problem I see with all "tutorials" on osdev ( and many other topics) I see around is the wrong people writing them, usually the ones with not a full understanding. The experts tend to have other things to do. This is a main problem, because most tutorials will introduce nifty little bugs or big falsehoods that way which then just keep on spreading.
One hard question would be wether a "tutorial" is really needed on this extremely vast and complicated topic, i am not sure wether you, even if you got a dozen experts, could write a "tutorial" that covers everything necessesary in reasonable depth( i suppose you'd end up with several libraries that way), so i am more in line with saying "There don't need to be tutorials on osdev, there are books".
So why not just contribute to the wiki? Due to peer review and the inability to write a full "tutorial" in any reasonable time this would be the course of action i'd advise.

One general Tipp : you should NOT use tutorials, especially not ones from youtube. Read books, they are better. The wiki MIGHT be a good source, at least it had some peer review where tutorials most likely hadn't.


Top
 Profile  
 
 Post subject: Re: Help me write an x64 OS making tutorial!
PostPosted: Tue Jan 24, 2017 5:23 pm 
Offline

Joined: Tue Jan 24, 2017 8:01 am
Posts: 2
Sorry :?

I learn better when teach, If that makes sense.


Top
 Profile  
 
 Post subject: Re: Help me write an x64 OS making tutorial!
PostPosted: Tue Jan 24, 2017 5:24 pm 
Offline
Member
Member

Joined: Thu Mar 25, 2010 11:26 pm
Posts: 1801
Location: Melbourne, Australia
If you need help writing a tutorial, then really, do not write a tutorial.

_________________
If a trainstation is where trains stop, what is a workstation ?


Top
 Profile  
 
 Post subject: Re: Help me write an x64 OS making tutorial!
PostPosted: Tue Jan 24, 2017 5:26 pm 
Offline
Member
Member

Joined: Thu Mar 25, 2010 11:26 pm
Posts: 1801
Location: Melbourne, Australia
moo wrote:
Sorry :?

I learn better when teach, If that makes sense.
It does not make sense.

_________________
If a trainstation is where trains stop, what is a workstation ?


Top
 Profile  
 
 Post subject: Re: Help me write an x64 OS making tutorial!
PostPosted: Tue Jan 24, 2017 5:29 pm 
Offline
Member
Member

Joined: Sun Feb 01, 2009 6:11 am
Posts: 1070
Location: Germany
Well, it does make some sense. It's more or less the same as rubber duck debugging. Just make sure that you don't publish it.

_________________
Developer of tyndur - community OS of Lowlevel (German)


Top
 Profile  
 
 Post subject: Re: Help me write an x64 OS making tutorial!
PostPosted: Tue Jan 24, 2017 6:05 pm 
Offline
Member
Member

Joined: Thu Mar 25, 2010 11:26 pm
Posts: 1801
Location: Melbourne, Australia
Kevin wrote:
Well, it does make some sense. It's more or less the same as rubber duck debugging. Just make sure that you don't publish it.
Agreed.

_________________
If a trainstation is where trains stop, what is a workstation ?


Top
 Profile  
 
 Post subject: Re: Help me write an x64 OS making tutorial!
PostPosted: Mon Jan 30, 2017 4:12 pm 
Offline

Joined: Wed Jan 25, 2017 8:16 am
Posts: 23
You just make a tutorial without any knowledge? Don't copy and paste. Learn what things mean. Otherwise, don't make a tutorial.

_________________
One day in the future... computers will be holograms...


Top
 Profile  
 
 Post subject: Re: Help me write an x64 OS making tutorial!
PostPosted: Tue Jan 31, 2017 8:54 am 
Offline
Member
Member
User avatar

Joined: Sun Sep 19, 2010 10:05 pm
Posts: 1074
On the other hand, adding pages to the Wiki, or editing existing pages helped me a lot when I was just getting started.

This may be a better approach...

_________________
Project: OZone
Source: GitHub
Current Task: LIB/OBJ file support
"The more they overthink the plumbing, the easier it is to stop up the drain." - Montgomery Scott


Top
 Profile  
 
 Post subject: Re: Help me write an x64 OS making tutorial!
PostPosted: Sat Feb 18, 2017 10:12 am 
Offline

Joined: Thu Feb 16, 2017 2:10 pm
Posts: 9
You don't even know how to do Assembly and you want to teach it? That's insane. You don't teach football if you don't even know about the scores. You don't teach swimming or basketball if you don't know how to play. Learn Assembly. Then, come back later to a tutorial.


Top
 Profile  
 
 Post subject: Re: Help me write an x64 OS making tutorial!
PostPosted: Tue Feb 21, 2017 11:14 am 
Offline
Member
Member
User avatar

Joined: Sat Dec 17, 2016 6:58 am
Posts: 101
Location: The Internet
Note to the OP and anyone else reading this thread: If you absolutely need help writing a tutorial, maybe you should read one first.

_________________
Everyone should know how to program a computer, because it teaches you how to think! -Steve Jobs
Code:
while ( ! ( succeed = try() ) );


Top
 Profile  
 
 Post subject: Re: Help me write an x64 OS making tutorial!
PostPosted: Sun Feb 26, 2017 6:41 pm 
Offline

Joined: Sun Feb 26, 2017 4:42 pm
Posts: 16
moo wrote:
The parts are short because I only want to go over the basics, but this whole time I've been assuming that you don't have to enable a 16 or 32 bit mode to enter it. (This is due to the confusion of many tutorials surrounding loading a kernel.)


If the pc starts using the BIOS then it will be in 16-bit mode. If you want to go to 64-bit long mode then you need to switch to 32-bit protected mode, set some control registers, setup a page tabel, enable paging, create a task state segment (TSS), enable long mode and jump to the first identity-mapped 64-bit page at which point you will be in long mode executing the 64-bit code that needs to continue booting the system.


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

All times are UTC - 6 hours


Who is online

Users browsing this forum: Bing [Bot] and 70 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