🔒 Locked
writing operating systems
Advertisement
Original Post
Yeah I tried that once. I managed to get a bootsector onto a floppy and boot it into real mode before i lost interest and went back to games. If youre going to do it you should get the Bochs x86 emulator so you dont have to restart your machine every time.
Cool. I just discovered that grub (which I use - I have Windows and Linux) comes with a sample kernel which I compiled (it took me a while how to do that in a bootable way), put on my extra partition, and added to my boot menu. It doesn''t do much, but its pretty cool. I''m trying to setup bochs but its harder than it looks (and it looks hard).
A friend once did it for a class, and it was rather, interesting. 
It took him a good 6 months of work, and when he was finished, it actually work, and had a GUI(a text GUI, but a GUI nonetheless).
I told him I''d write some programs using it, but I don''t think he finished it...
~~~~~
"Video games could have prevented this tragety." - mortisthecat
Download and play Slime King I.
It took him a good 6 months of work, and when he was finished, it actually work, and had a GUI(a text GUI, but a GUI nonetheless).
I told him I''d write some programs using it, but I don''t think he finished it...
~~~~~
"Video games could have prevented this tragety." - mortisthecat
Download and play Slime King I.
I tried writing an operating system a few months ago. It was fun, but I lost interest after my floppy disc drivers nuked my harddrive 
Now I leave the OS writing to the competant/professionals
My Website
Now I leave the OS writing to the competant/professionals
My Website
I once spent months trying to get my own OS working. I could do real mode fine, but since I couldn''t use my compiled C code in that I tried to get protected mode working, that''s where I failed
. I even downloaded a protected mode kernel, but yep you guessed it not even that worked
. Try it if you want, but be prepared for failure.
GDSAUBY GameDev Society For UnBanning YodaTheCoda
If you want to see yoda unbanned then put this in your sig
GDSAUBY GameDev Society For UnBanning YodaTheCoda
If you want to see yoda unbanned then put this in your sig
id really like to but its such an ambitious project, i like to stick with things i can forseably finish in my lifetime.
quote:The way I see it, the mistake far too many make is trying to write the OS bottom-up. I think it would be much more attainable if your OS design was sufficiently close to something that exists, and was in the public domain or covered by an Open Source/Free Software license, that you could use the existing codebase as scaffolding and replace portions when "higher" levels required more functionality than the existing portions provided. That''s how Linus wrote Linux, by the way.
Original post by Dreddnafious Maelstrom
id really like to but its such an ambitious project, i like to stick with things i can forseably finish in my lifetime.
I mean, how much better can you write a bootloader? Why should you write a bootloader, given the availability of OS-agnostic options like LILO and GRUB? (Especially GRUB.) Where your OS is likely to try something different is in userland - and perhaps in small ways in the kernel - so why not reuse?
That''ll be 2¢...
quote:
Original post by dede
a text GUI
Uhm, contradiction in terms much? I think you maybe mean a ''shell...''
I''d be quite interested, at some point, in building an OS using something stable like Linux as the kernel (cos that way I benefit from the work of people much smarter than me, and of course much more hardware support).
So, my own filesystem, shell, eventually a GUI, and so on. Could be fun working on the ''applications'' section of the operating system.
Superpig
- saving pigs from untimely fates, and when he''s not doing that, runs The Binary Refinery.
Enginuity1 | Enginuity2 | Enginuity3 | Enginuity4
If anyone''s interested, here''s my "flat mode" bootsector + C program compiled with NASM and GCC.
http://www.geocities.com/bpj1138/hello32.html
I used this as a starting point to write a Java VM as the "kernel" of the OS. It used green threads so the entire system was running off the C code of the VM. I got a text console and keyboard drivers working, both written in Java, believe it or not. I also got most of the Java base classes done. The problems were that it was pretty damn slow, plus my garbage collector was flawed or rather was a conceptual error on my part (reference couting gc)...
One day, I''ll probably go back to it, do a rewrite.
http://www.geocities.com/bpj1138/hello32.html
I used this as a starting point to write a Java VM as the "kernel" of the OS. It used green threads so the entire system was running off the C code of the VM. I got a text console and keyboard drivers working, both written in Java, believe it or not. I also got most of the Java base classes done. The problems were that it was pretty damn slow, plus my garbage collector was flawed or rather was a conceptual error on my part (reference couting gc)...
One day, I''ll probably go back to it, do a rewrite.
quote:
Original post by Oluseyiquote:The way I see it, the mistake far too many make is trying to write the OS bottom-up. I think it would be much more attainable if your OS design was sufficiently close to something that exists, and was in the public domain or covered by an Open Source/Free Software license, that you could use the existing codebase as scaffolding and replace portions when "higher" levels required more functionality than the existing portions provided. That''s how Linus wrote Linux, by the way.
Original post by Dreddnafious Maelstrom
id really like to but its such an ambitious project, i like to stick with things i can forseably finish in my lifetime.
I mean, how much better can you write a bootloader? Why should you write a bootloader, given the availability of OS-agnostic options like LILO and GRUB? (Especially GRUB.) Where your OS is likely to try something different is in userland - and perhaps in small ways in the kernel - so why not reuse?
That''ll be 2¢...
hehe, thanks for the input, IIRC you were talking about writing an OS some time ago and i believe your plan was to use the existing Linux kernel and write your own file system. Since i read this post ive been googling a bunch of sites about OS construction and i want to toss some noob systems programmer questions at you, feel free to answer or ignore.
I may reveal a lack of knowledge about what goes on under the hood of a typical OS, because im not a computer scientist, i am(was) a business major. I went to B&N today trying to find a book on the subject but no luck. If you have knowledge of a good book i could educate myself with then please speak up.
* anyone can tackle these but if you''re just taking a stab at it please qualify your answer.
1) Assuming i use a prewritten bootloader would it still be possible to have the project be proprietary?
2) Can i use Cpp for development or would i need to use straight C to achieve a workable speed?
3) Can i use Visual Cpp or would i need a different compiler?
4) I have no experience with WINE but from what i understand it will run Windows programs without any hitches, if this is correct does it suffer a big performance hit? I''m also assuming that it achieves its emulation thru COM technology, is that assumption on target?
5) What is the signifigance of the file system? Ive found plenty of documentary on several file systems.(EXT/[23], Reiser, Joliet, FAT32, HPFS) but nothing on NTFS. I understand empirically what a file system does but i have no grasp of its signifigance with compatability.
6) Im assuming when writing an OS from the ground up you would have to provide your own HAL, are most devices still based on DOS so that a single driver might serve a large range of similar devices or are most drivers manufacturer specific?
7) How much knowledge of x86 compatible assembly would be required to get the job done?
Anyway, thanks for entertaining some noob questions, from what i understand this is the toughest task available to a coder and quite possibly beyond my skill level, but its certainly an interesting task.
Topic Locked
This topic has been locked by a moderator. New replies are not allowed.
Sign in to reply to this topic.
Advertisement