OSDev.org
https://forum.osdev.org/

Help me write an x64 OS making tutorial!
https://forum.osdev.org/viewtopic.php?f=1&t=31291
Page 1 of 1

Author:  moo [ Tue Jan 24, 2017 4:58 pm ]
Post subject:  Help me write an x64 OS making tutorial!

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.)

Author:  Kevin [ Tue Jan 24, 2017 5:07 pm ]
Post subject:  Re: Help me write an x64 OS making tutorial!

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.

Author:  Lowl3v3l [ Tue Jan 24, 2017 5:13 pm ]
Post subject:  Re: Help me write an x64 OS making tutorial!

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.

Author:  moo [ Tue Jan 24, 2017 5:23 pm ]
Post subject:  Re: Help me write an x64 OS making tutorial!

Sorry :?

I learn better when teach, If that makes sense.

Author:  gerryg400 [ Tue Jan 24, 2017 5:24 pm ]
Post subject:  Re: Help me write an x64 OS making tutorial!

If you need help writing a tutorial, then really, do not write a tutorial.

Author:  gerryg400 [ Tue Jan 24, 2017 5:26 pm ]
Post subject:  Re: Help me write an x64 OS making tutorial!

moo wrote:
Sorry :?

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

Author:  Kevin [ Tue Jan 24, 2017 5:29 pm ]
Post subject:  Re: Help me write an x64 OS making tutorial!

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.

Author:  gerryg400 [ Tue Jan 24, 2017 6:05 pm ]
Post subject:  Re: Help me write an x64 OS making tutorial!

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.

Author:  stevej150 [ Mon Jan 30, 2017 4:12 pm ]
Post subject:  Re: Help me write an x64 OS making tutorial!

You just make a tutorial without any knowledge? Don't copy and paste. Learn what things mean. Otherwise, don't make a tutorial.

Author:  SpyderTL [ Tue Jan 31, 2017 8:54 am ]
Post subject:  Re: Help me write an x64 OS making tutorial!

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...

Author:  joegantic [ Sat Feb 18, 2017 10:12 am ]
Post subject:  Re: Help me write an x64 OS making tutorial!

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.

Author:  MajickTek [ Tue Feb 21, 2017 11:14 am ]
Post subject:  Re: Help me write an x64 OS making tutorial!

Note to the OP and anyone else reading this thread: If you absolutely need help writing a tutorial, maybe you should read one first.

Author:  x64dev [ Sun Feb 26, 2017 6:41 pm ]
Post subject:  Re: Help me write an x64 OS making tutorial!

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.

Page 1 of 1 All times are UTC - 6 hours
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/