Skip to main content
gamedev.net
🔒 Locked

Operating system necessities

Started by farmersckn 4 replies 250+ views
Original Post
farmersckn
farmersckn
First of all, I want to know what exactly is necessary to make an operating sys. What I mean is, would you have to write your own compiler or something like that? Or would you write it in a dos compiler? What would it have to compile into, a regular dos-format exe or what? This really confuses me. Of course, it wouldn''t make sense to write an os that wasnt'' a gui. So, how would you implement that? My thoughts are: that either (1) You would have all the gui operations compiled into your program, and any non-static variables would somehow be loaded into the program at run-time, such as pointers used by the gui and such. (2) You would pass the addresses of all the functions used by the gui into your program at run-time, as well as any non-static variables. Now, by static, I mean stuff like what you would find in a .ini file or something, non-static is window data, user names, i.e. anything loaded into ram. Third. Windows. Is it legal (is it even possible) to make an o.s. that is compatible w/ windows programs? Fourth. What would be necessary for the os in order to compete with windows on a scale larger than that of linux or unix or macOS? farmersckn
Yesterday is the past, tomorrow is the future. Today is a gift, that is why we call it the present.
a38750
a38750
There''s no confusing paradoxes involved in making an OS. Code is code. The thing that makes it a windows program is the use of the windows API, a DOS program uses DOS interrupts. As for the operating system, it''s also just a program. A modern OS would be a 32 bit program. You don''t make an exe, because they have DOS/windows header information you don''t want. You compile it to a raw binary file. You also need to make a boot loader preferably in asm.

Problem with making an OS is that there''s a lot of very technical stuff. Because 32-bit programs can''t access BIOS interrupts well, you have to make your own hard disk driver code etc. You also have to handle the transition into protected mode, and then there''s all the task switching and semaphores and crap.
If you really want to get into all of this, do some research on the net for OS-development boards, they must be out there.

Frank
Snale
Snale
As a matter of fact, it makes a lot of sense not making a built in GUI. That is one of the big problems with windows, that you can''t use the computer without the GUI, the GUI slows thing down when you could run programs without it etc. It is much smarter to make a command prompt based os with a graphics add on or server or something like that. Linux/Unix are excellent examples of OS''s lacking a built in GUI. Instead they have the X-server wich is a program that you run on the computer, which makes it possible to run a GUI on top of it.
Servers doesn''t need GUIs, there is no point in running a GUI in the background when you are playing quake etc.
If I am not completely mistaken the windows GUI code is included in the Kernel, which is one of the reasons windows is slower than Linux for example.
I can see no reason behind why it wouldn''t be legal to make it binary compatible. To steal or use their code would be, but not to make it compatible. It isn''t illegal to make a os that understand exe files compiled for windows. Microsoft doesn''t own the exe''s, so what could they do?
Just some thoughts...

I hope to see the ultimate gaming os in a year from now

Snale
+--Java Game
Martee
Martee
OS''s are fun....I tried writing one, but it never got past the "bootloader, console-mode text driver, and keyboard driver" stage .

If you really want more info, here are a few sites to check out..
http://nondot.org/sabre/os/
http://www.mega-tokyo.com/os/os-faq.html
http://www.acm.uiuc.edu/sigops/roll_your_own/
http://tunes.org/Review/OSes.html
(Sorry, I''m too lazy to make those into links )

Check out your favourite search engine, and you can find many, many more...these are just a few...


==================
/* todo: insert cool sig */
Martee
Magnum Games.NET
ReactOS - an Open-source operating system compatible with Windows NT apps and drivers
wrenhal
wrenhal
There is also a book about writing your own 32-bit OS. Check Amazon or Barnes & Noble. I was going to do this myself, but don''t believe I have enough low level programming knowledge. Now I write VB programs.


BeS
It's Da BOMB Baby!!!
the darkening
the darkening
There is an OS-development message board at
http://os-dev.isa.net.au/


Darkening

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.