Hey, Im new and was wondering what I would need to start

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

Hey, Im new and was wondering what I would need to start

Post by Jr »

I heard from my friend that people build there own os's. I am interested in this. i was wondering what would I need to start. I know I need to learn some programming lang's but Im willing to. Im open to all suggestions. If you want to you can email me.
PlayOS

Re:Hey, Im new and was wondering what I would need to start

Post by PlayOS »

First up you will need knowledge of a systems programming language, the easiest would be C, you should also know some ASM. The tools you will need will be GCC (GNU C Compiler) and NASM. You should probably make sure you get the binutils that come with most GCC distributions. These are the tools I use, maybe someone else can give you a more definitive list.

Once you have these, or maybe even before you get them you should sit down with a good tutorial and some example code, then study it until you understand it, posting questions here as you need to. You can find links to everything you need scattered throughout this forum. ;)

Good Luck!
Tim

Re:Hey, Im new and was wondering what I would need to start

Post by Tim »

Most importantly: learn how to program well.

There's no point learning some programming languages then sitting down to write an OS. You will fail. That is like learning French just before you write a French dictionary.

My advice is to start learning a programming language then come back here in 4 years time.
PlayOS

Re:Hey, Im new and was wondering what I would need to start

Post by PlayOS »

While there is alot of truth to what Tim is saying, IMHO you will not have to wait 4 years, it really depends on how well you pick up programming, some people can learn a language and become a good programmer in 6-12 months, however I believe that the average person needs a minimum of 12 months to master a language (even then it is really impossible to master a language in the sense that you know everything there is to know about a language, there is always little tricks or hacks that float around that you will not know, until you find out of course), IMHO if your are an absolute beginner at programming then I would walk away from this subject for the time being, and learn to create some normal user programs under the OS of your choice. Once you have done this and you have a good foundation in programming, then you would be ready to start here.

However you should definately make sure that you can program rather well, or at least be able to grasp programming really well, I have seen people posting here that have not been able to understand how C header files work, while I am more than willing to help them, I still think they should and must have more understanding before starting such a complex project. Otherwise as Tim said, it is really destined to fail.

Anyway, no one can tell you what to do, if you want to dive in without experience, then go for it.

Once again, Good Luck.
Whatever5k

Re:Hey, Im new and was wondering what I would need to start

Post by Whatever5k »

PlayOS:
I don't think that 1 year is enough...imagine: you needn't only know the syntax, but how to program *well*. How to solve different programming problems, what style is the best, etc...
I'd rather say 2-3 years, better 3..
PlayOS

Re:Hey, Im new and was wondering what I would need to start

Post by PlayOS »

I personally have been programming user programs for about 2 years, when I started OS programming it was like I went back to the beginning not knowing anything, the only thing about creating user programs that has been of use to me in OS programming is the concepts needed in programming.

You could take the most efficient programmer and try to teach him OS development and he may or may not understand, he may never need to learn syntax (syntax can be learned in weeks easily), he may not need to learn how to use the syntax of the language (this can be done in less than 12 mths), but what he will have to learn is all about low level structures, system tables, stack management (something normal C programmers don't normally know or care about) and many other things.

I personally learnt most of the syntax of C++ and how to write a basic program in less than 1 month, this is no lie, but like I said it really depends on the person, how commited they are to learning how interested they are in programming, for me I have always loved programming so I was very determined, spending lots of time learning.

To sum up, I believe that the average person can learn to program well in 12 months, I done it and I am not eaxctly the smartest guy in the world. But with dedication and perserverance and with good help and tutorials it can easily be done.

Dont get me wrong I dont think anybody could write a good fully functioning OS within 12 months, I expect to take at least 3-5 years, this is because OS development definately requires a greater learning curve, one which requires 100 times as much dedication as normal programming.

Anyway, this is my opinion, we are all entitled to one, and this thread is getting way off topic, at least it didn't start that way.
PlayOS

Re:Hey, Im new and was wondering what I would need to start

Post by PlayOS »

BTW, What is the best style of programming?
Jr

Re:Hey, Im new and was wondering what I would need to start

Post by Jr »

I remember when my mom found vb5 at her workplace and brang it to me. I fucked around with it and made some program.(It ran porn(a rather wide selection.lol)).I know if i learn that i can comprehend to the language better because i already know some, But Is that language any good. Or is it worthless?
Tim

Re:Hey, Im new and was wondering what I would need to start

Post by Tim »

There is a big difference between knowing a language and being able to program. After you have learned one language you still need to learn how to program. Also, if you can program well, then picking up another language is easy.

Remember what Niklas Wirth (I think) wrote: "Program = Algorithms + Data Structures". Nowhere does he say: "Program = Being Able To Write In C". It is the algorithms (the implementation) and the data structures (what you work on) that are important; the exact bytes that make up your program aren't.

I myself have been programming for a long time (10 years, I think, in one form or another), and only now am I half-capable of writing a good OS. But I'm still learning new stuff constantly. Someone who learns programming at the same time as they write their OS isn't going to produce a very good OS. At the very least they'll need to rewrite a few times more than someone who is already a competent programmer.
Whatever5k

Re:Hey, Im new and was wondering what I would need to start

Post by Whatever5k »

I agree with Tim...
What I meant with style is the way you solve programming problems. There are quick, efficient solutions and there are working, but time consuming and un-economical solutions...
Let's take one example. We have a data array of integers and we want to check if the array holds a "1". That's a bad solution:

Code: Select all

int array[100]; 

void check(void); /* prototype */

void main(void)
{
 fill_array(); /* fill the array with some numbers */
 check(); /* our function */
}

void check()
{
 if (array[0] == 1)
  printf("found it...\n");
 else if (array[1] == 1)
  printf("found it...\n");
 else if(array[2] == 1)
  printf("found it...\n");
  ...
  ...
}
It would work, but it would be very silly to write this 100 times. The better solution is:

Code: Select all

void check(void)
{
 int i=0;

 for(i; i<100; i++) {
   if (array[i] == 1) {
    printf("found it...\n");
    break;
   }
 }
}
I think you know what I mean...
Curufir

Re:Hey, Im new and was wondering what I would need to start

Post by Curufir »

I completely agree with Tim.

The language/dialect you happen to be programming in is inconsequential. It is the method of thinking, of overcoming logical problems, of understanding flow and control...etc that is truly important.

If someone had no understanding of any computer language but could use flow charts to create a system with viable logic then as far as I'm concerned they can consider themselves a programmer, even if the mechanics of translating that program into a computing language are handled by somebody else.

I suppose it comes down to something simple, a good programmer can design a solution independent of actual language, knowing only the specifics of the problem to be solved.

Here's a link for fun http://my.execpc.com/~geezer/misc/tao.txt

Many truths :)

Curufir
elias

Re:Hey, Im new and was wondering what I would need to start

Post by elias »

oh man. what you guys jsut said really throws me off. ive onyl been programming for about a year. and what exactly do you mean by little hacks in C? you mean knowing how the compiler turns the code into assembly, and writing it a certain way to produce msot optimized code? i know about structures and algorithms and efficiency, but i doubt anyone would would realyl call me a good programmer. so im saying this to you. i dont care really if this OS im writing is fully optimized. im only doing it to learn more. ive learned about interrupts, and hardware programming, and so much in a year(at least for a hobbyist programmer). i struggled ot learn assembly after it first looked impossible, and understand different modes of operation, even thought i dont know the exact deatils yet about how addressing works. so dont worry. learn a language, read a book about OS theory, and knock yourself out! if you have any trouble at all, come to this board and ask the guys whove been programming for a while. thats what this baords for.
Tom

Re:Hey, Im new and was wondering what I would need to start

Post by Tom »

I've been programming in C/C++ for one year. BUT...

you NEED to know how to solve errors and a whole bunch of stuff....but a special book I found helps you learn C in 5 months ( or at least for me ).

And know enough asm to write programs.

I started learning Envelop ( Free VB ).
I could write simple win32 apps...but Envelop was too old..so I read that Asm was the fasted programming language and you could do everything so I get Mastering Turbo Assembler 2.

I gave up learning ASM, because it was too hard.

I read that C/C++ made envelop, so I bought "Learn C++ Today!" and you can't really learn C++ That day...but you could learn C++ fast.

Anyway...not angry with anyone but you can learn programming fast....just depends on what's going on with your life ( i.e. time to learn...books....diet...etc).

But I still think that more experience for me to program is better......
elias

Re:Hey, Im new and was wondering what I would need to start

Post by elias »

hey tom, i just noticed that your the cretor of fritzOS. i remeber a few months back when i first got into OS programming, and was looking for stuff to read on it, and either in a search engine, or some link, i stumbled upon your site. its a pretty small world after all, even online.
PlayOS

Re:Hey, Im new and was wondering what I would need to start

Post by PlayOS »

Hi again,

I cannot understand why you guys are putting every person into the same box, we are all different and we all learn differently.

By saying that every person will have to go through many years of programming before they can achieve a good OS is like saying there will never be a faster PC, or mans technological abilities are completely exahusted. But ask anyone and they will say this is ridiculous, I will too, Why? because there will always be people who can come up with better, smarter and more efficient solutions. It is the same with programming, people are different what takes one man 1 year to code will take another man a couple of months, what takes one man a week to learn, another man may never be able to learn.

Niklas Wirth, what makes this man the final word, even though I was not saying that being able to program in C makes you a good programmer, how many men have made statements that are true for the time, and have continued to stay true? None, not when it comes to technology.

"Program = Algorithms + Data Structures"

Where do people come into it, there was never and never will be a program without a person to code it? This statement needs to be revised, it is too narrow. It does not show the full depth of programming.

What about Bill and Linus, look at their programming experience, and even these two people were not able to create flawless OSes, university degrees and however many years of programming before this, my point is this, no matter how good you can create user programs, this in no way makes you an automatic OS creator, you dont automatically get the skills to create an OS, YOU LEARN THEM!

How many programs or algorithms do you think you would have made without first learning the syntax or use of the syntax? Syntax is everything, without syntax there is no language, without language there is no program.

I personally couldn't write a netwroking program for the life of me, however I could learn, my experience has nothing to do with the final product, however how fast I create the program is related to my experience, how much trial and error I have to go through is directly related to my experience, the more I know when I start, the faster and easier I can complete it, the quality of the final product depends solely upon my dedication to the product, testing a program shows if it is effiecient or not, if something is inefficient then it is up to me to find a better way, it is called LEARNING.

Anyway, once again this is my opinion, I think you all make valid points, however, you are too limiting, and you assume that each person is the same. We are all different and we all can do one thing better than someone else, I personally am dedicated to quality and efficiencey and my OS may take a bit longer than yours because you are ahead of me in your learning, however I am always looking for a better way because there will almost ALWAYS be a better way or faster way.

The final OS will be dependant upon dedication and consistently looking for the best way known, we all must learn from someone no person automatically knows how to program, not even the people who invented programming.

I think all programmers should try OS programming because there are many skills to be learned and much knowledge to be gained.

Good Luck to you all, and I hope that you all succeed in your goals. Remember "Dedication and Commitment = Success"

- PlayOS
Post Reply