Really newbie!

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
Edge

Really newbie!

Post by Edge »

Hey, guys!

I'm a reeeaaal newbie to this.. I do know C/C++ allready and have been programming for the Mac OS (Pre X and X), Linux and Windows for quite a while. I have computers at home currently running Windows, Mac OS 9 and Mac OS X.

I know some assembly, and I got what it's all about and I know some about how computers work (not all about the memory and such). So, I want to take the step into the dark realm of operating system programming.

  I have been searching the internet for ages, but I haven't been able to find any _good_ and _simple_ documentation. Not for x86, nor for PPC. Is there anyone here who can help me get started and really guide me through the first steps of getting a simple OS to run? Just to print something to the screen would be great!  It doesn't matter if it's x86 or PPC, I just want to learn some and I'm really anxious about digging into it!

   So, please.. If there's someone who can help me with this, it would just be so great!


       Huge thanks in advance!

Regards,
   Anton, Jonkoping-Sweden.
Adek336

RE:Really newbie!

Post by Adek336 »

http://www.nondot.org/sabre/os/files/Bo ... ector.html

hope this helps,
Adrian

ps all it does is hang the computer
Edge

Hm..

Post by Edge »

I need more help than that.. Sorry.

Anything else?  I need someone to tell me what part does what too.. Please?


Huge thanks in advance!
uri

RE:Hm..

Post by uri »

Take a look at http://www.acm.uiuc.edu/sigops/roll_your_own/
It's rather sketchy, but covers all important topics - booting, memory management, multtasking, IPC, etc.
Edge

RE:Hm..

Post by Edge »

I have already done so, but that doesn't give me a clue since I cannot seem to get anything there to work =(

Thanks anyway!
sparkjim

RE:Hm..

Post by sparkjim »

You might want to look around for John Fine's bootloaders. They are a great way to get started.
uri

RE:Hm..

Post by uri »

Hm... Have you seen the turorials at "Bona Fide OS Development" (http://osdev.neopages.net/)?
Edge

RE:Hm..

Post by Edge »

I've tried the stuff at    [http://www.nondot.org/sabre/os/files/Booting/nasmBoot.txt]   but I cannot seem to get it to work. I compile the stuff using NASM and I write it to a floppy using rawrite under win95. All that works just fine!  Then I restart (shutdown+power back on) with the floppy in the drive. The memory loads in (it's an old compac presario 7210) and then it seems to load from the floppy. Then, nothing. The little text-marker is just blinking on the screen. If I have understood this correctly, that is exactly what it should do in the first example that just hangs the computer, right? But in the others, aren't it supposed to print some stuff to the screen? Really need some help here!

Huge thanks.

Gonna check out that site.
darklife

This should help...

Post by darklife »

http://aarongray.members.beeb.net/links ... pment.html

Tons of *good* links in there. If you plan to program systems software for the x86 platform you will
need good knowledge of the processor, BIOS and other tidbits. Look around for the golden
Intel 80386 programmers manual. You could start by using the real-mode addressing on the
Intel platform but I don't recommend it because you may end up like me not knowing **** about
protected mode programming. You will need to know about bootstraps (binary program to load
the OS) and bootsectors (sector on disk that is loaded and ran at computer boot time).
Search around for some *small* example operating systems made for the PC. DS-OS is a good
one, much like DOS but without disk directory support :( Just play with the code and learn from
it by hands on programming and reprogramming, and even more reprogramming.
Most of all, don't make things too hard at first. Learn by example (worked for me) and maybe
start with DOS assembly programming first so you understand a little more about the x86.
Edge

Well..

Post by Edge »

What to do next?
I now know how to write a simple bootstrap in the bootsector of a floppy that can load another program on the same floppy (or other) or on a HD. But what to do next? How to write a kernel? I would prefer using C or C++, since that's what I know best. How to print to the screen using C/C++? Please help!
MastorX

RE:Hm..

Post by MastorX »

Me too...
User avatar
df
Member
Member
Posts: 1076
Joined: Fri Oct 22, 2004 11:00 pm
Contact:

RE:Well..

Post by df »

so buy a book on os development. os development is complex and time consuming. read the documentations. the only way you will learn is to write your own code and examples and see what does and does not work. dont expect eveything to be handed to you on a plate.
-- Stu --
Tim Robinson

RE:Well..

Post by Tim Robinson »

To be honest, OS development is *really* hard. You'll find tutorials on most aspects of software development telling you what to do, how to do it, and why you're doing it. OS development has a bit of 'how' (technical manuals), some 'why' (OS design theory textbooks), and not much 'what'. It is possible to learn from scratch, but only with a lot of effort put in by yourself. People who expect to be taught what to do quickly find that other OS developers generally can't (lack of experience) or won't (lack of time) help them.

You'd generally get the best responses if you read up on a subject, try out some code, then come up with some specific questions on it. An open-ended question isn't going to get any decent responses because it's just not possible to write an adequate answer to such a question, at least not on an Internet message board.
St8ic

Here is a really easy way

Post by St8ic »

If you are one of those people who likes to do something and THEN learn it, I would suggest taking a look at EasyOS.

http://www.groovyweb.20m.com/easyos.zip

This little zip contains a small no-nonsence OS that you can edit and learn from. Start by modifying system.c to make it do what ever you want, and then you can take a look at the rest and start to understand how it works. It's a great meathod for some people. It's how I learnt. :)
Rock

RE:Well..

Post by Rock »

I found those articles to be really helpful for starting my
own OS project:

http://osnews.com/story.php?news_id=1482
http://osnews.com/story.php?news_id=1532

There's no deep technical stuff in there, it's a checklist
of how to do things right. It helped me focus on what I wanted
to do with my OS. _Then_ I looked up how to code it.

Great links (some already listed):

http://osdev.neopages.net/
http://www.washingdishes.freeuk.com/links.html
http://www.nondot.org/sabre/os/articles
http://www.cyberscriptorium.com/osjourn ... ction=home
http://my.execpc.com/CE/AC/geezer/os/
http://www.visopsys.org/osdev/index.html
http://www.mega-tokyo.com/forum/index.php?board=1

This board also has many good people involved in their own projects.

It's very easy to write 99% of your OS in C or C++. If you're not _really
good_ at either language, it will be tough. C++ is especially a mess at
such a low level if you're not really good at using the right tools from
all the things that it brings to the programmer.

I do insist about the articles above, they're great, common sense and
often overlooked advice.

Brian
Post Reply