CrYpTiC's Questions

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

CrYpTiC's Questions

Post by CrYpTiC »

Question #1
What do I do if I want to create an os from scratch without using anything at all that has been made by other people. I want to make EVERYTHING from scratch. Is this possible? Would I have to use binary code or what?

Question #2
I know this doesn't have to do with operating systems, but how would I make my own computer language from scratch? Again I don't want to use anything that other people have made.
Tim

Re:CrYpTiC's Questions

Post by Tim »

CrYpTiC wrote:I want to make EVERYTHING from scratch. Is this possible? Would I have to use binary code or what?
You'd probably want to use somebody else's compiler and/or assembler and develop under somebody else's OS -- to do otherwise would be impractical.

If you want to take this to its logical conclusion, you'd have to write your own BIOS, since the BIOS is what loads your boot code from the disk. Or, even further, you'd have to design and build your own computer.

How far do you want to take it?
I know this doesn't have to do with operating systems, but how would I make my own computer language from scratch? Again I don't want to use anything that other people have made.
This is a different topic from OS development, with its own set of techniques, problems and challenges. If you want to do both, I recommend you do one at once -- do the language and compiler first, then the OS, or the other way round.
_mark

Re:CrYpTiC's Questions

Post by _mark »

What do I do if I want to create an os from scratch without using anything at all that has been made by other people.
First you will have to build your own hardware. Once you can do that, then you'll pretty much know how to do the rest.

_mark()
CrYpTiC

Re:CrYpTiC's Questions

Post by CrYpTiC »

So basically, making my own os from "scratch" is impossible unless I want to spend forever making things that have already been made.
CrYpTiC

Re:CrYpTiC's Questions

Post by CrYpTiC »

I would have to build my own hardware? Couldn't I just set the os or bios or whatever to read the hardware? I'm new to this as you can tell.
_mark

Re:CrYpTiC's Questions

Post by _mark »

not exactly... it depends on what you want your OS to do and what you want it to run on. If you do not want to use ANYTHING that someone else has done, to me that includes hardware. But we have guys at work that put together embedded hardware/software all the time.

An assembler is easy to write. If you want to use existing hardware and you are willing to code your OS (or embedded app) in asm. You have a chance of doing it. Depending on how much time you can devote and your experience level, a year is not out of the question.

good luck
_mark()
CrYpTiC

Re:CrYpTiC's Questions

Post by CrYpTiC »

Thanks _mark. I'm only interested in software though. Hardware is WAY out of my league. lol Thanks though man. :)
_mark

Re:CrYpTiC's Questions

Post by _mark »

Here is another idea for you. If you just want to get a basic understanding uf this stuff without having to write a full assembler, bios, and OS. You might try writting a simple virtual machine first. Then you would know the instruction set enough to write an assembler for it. After that your bios could litterally just bridge to crt and native API's. And then a simple OS ontop of that would be a cakewalk.

I'm not saying to reinvent anything like bochs, but a simple VM. A few register, some memory, and an instruction set to move things between them and do basic integer math.

I did something similar a long time ago. It is not that hard to do, and can be a lot of fun. It will certainly give you a better understanding of how things really work under the hood.

_mark()
Tim

Re:CrYpTiC's Questions

Post by Tim »

Maybe you could write your own OS using somebody else's tools (compiler and assembler). When you have done that, you could then write your own compiler and assembler, and everything would be your own. That's probably easier (and more useful) than doing it the other way round.
_mark

Re:CrYpTiC's Questions

Post by _mark »

Good point Tim - I kind of got carried away there.
CrYpTiC

Re:CrYpTiC's Questions

Post by CrYpTiC »

Where could I go to learn how to do that?
_mark

Re:CrYpTiC's Questions

Post by _mark »

ummm...college maybe. :)

Seriously - that is a lot of information. You could start with google and dogpile using all the keywords we have mentioned.

_mark()
pskyboy

Re:CrYpTiC's Questions

Post by pskyboy »

Or you could buy some books, actually thats probably your best bet as when you see how fat they are that will be the first thing to make you realise how much work is involved. Then when you start readign them you will realise just how much work is needed. Don't let me put you off though i am currently building a VM and compiler as well as an OS but it is a hugh amount of work and i will be suprised if i have finished any of it in 10 Years time.

Peter
CrYpTiC

Re:CrYpTiC's Questions

Post by CrYpTiC »

I know pskyboy. It's an @$$ load of work, but I want to work with computers as a career so I've got some time. I'll probably go by some books though because that sounds like the best thing to do. Thanks yall
CrYpTiC

Re:CrYpTiC's Questions

Post by CrYpTiC »

Do you have any suggestions of what books I can buy?
Post Reply