Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

OS, anyone ?

  1. Mar 17, 2003 #1
    Did any of you ever try to program his own operating system ?
    I have been trying to do so for some weeks now, i made some little stuff (a loading message, showing a picture on screen ...), but this is far from doing a real OS !
    (all was did in assembly)
    Anyone here has experience in that ?
  2. jcsd
  3. Mar 17, 2003 #2
    I know and old member called Feztaa was creating his own unix based OS. I personally have not. Mactech?
  4. Mar 17, 2003 #3
    Well to start, no I haven't. I've played a bit in years gone by with assembly but mainly, well pretty much exclusively, in win32.

    Just out of interests sake:

    What compiler are you using?
    Are you starting from absolute scratch?
    Do you have a plan of what you want or what you fantasise?
    What platform, cross platform?
    Are you serious or is this just a laugh?

    [Removed Broken Link]

    This link seems to be a good 'from scratch' starting point.

    [Removed Broken Link]

    This one for other OSs, from scratch and linux or DOS like


    This one also seems obvious

    [Removed Broken Link]

    BeOS seems to be a good model and this group is working on an open source clone. They've got some source and if you look around there's a link to NewOS which is what it this open source version is based on

    Raavin :wink:
    Last edited by a moderator: Apr 17, 2017
  5. Mar 18, 2003 #4
    Well, i found some other free OSs online too.
    I am using A86, a compiler that is almost like TASM, but is kind of free (well it is not exactly free, but i assume so ).
    Yes, i am starting from scratch, and this is getting way too hard (From the begining).
    My orignal idea was to make only the basics in Assembly, and then do the real work in C, but i still didn't figure out how to make the whole thing (problems with the fact that the C libraries that i have are made for Win !)
    You wouldn't believe how simply my fantasy is so far !
    I only want to load a background, be able to identify a pointing utility (and the keyboard), and drawing a cursor on screen :smile:, can you think of anything simpler ?
    Till now it is only a kind of test, a way to gain some experience in those stuff.
    But i am planning someday to make totally customized OSs, or maybe make OSs that run certain hardware (only made for my OSs), so that people will have to use my OS with that hardware (tricky, right ? :wink:)

    I am really a beginner in assmebly, so i have a little question.
    How can i load a file without using the interrupter 21h ?
    Cause as you know INT 21h depends on DOS, therefore i cannot use it :smile:.
  6. Mar 18, 2003 #5
    Start with a text-based system.... it will be much easier!

    You need to write your own filesystem drivers first, before you can load any files. :wink:
  7. Mar 18, 2003 #6
    As I said, my assembly experience is almost exclusively win32, and mainly for cracking in my younger days, so manipulating disassembles files and editing in assembly or hex. I do feel much more comfortable with assembly than other languages, although I probably haven't taken much time with others. I see higher level languages as trying to write a story with a word processor that, instead of writing individual letters, only allows predefined sentences. Just an opinion.

    I agree with the text based/command line system as a first go, but I do believe that if you are going for a GUI based goal, then starting with that and throwing a shell on top like win3/win95 or linux isn't the way I'd go. I'd be looking for graphics to be native to the system. Not sure how you accomplish this though.

    As far as the windows libraries go i'm not entirely sure but one suggestion is to look at http://www.xosl.org/ which is not an OS but an open source graphical OS loader. It might give you a start at what libraries to use.

    If you are serious and you want a research assistant I'd be happy to do what I can. If I can't find it on the internet, it just ain't there.

  8. Mar 19, 2003 #7
    Well as you have noticed, my OS does not have any functions, so ... how will this be done in a text-based way :wink: ?
    Kind of a message shows, then no prompt, no nothing ? (i can show the message easily)
    Yeah, it seems so, but since this is far more complicated then what i was planning to do, i will drop it for the moment.
    A very good analogy, i totally agree.
    When you are doing assembly, you feel you are the controller of everything, while you always find limits in other language (i tried VB for a looooooong time ! Maybe C is more powerful than VB anyway).
    I agree that if a big OS is being planned, you have to make a good starting (and a usefull one, and able to be re-used) first, this will be a command based OS at the begining.
    I have seen some OSs that are all GUI dependent, it seems it is harder to accomplish development in those than the ones bases on command lines first.
    I will check the site now.
    And thanks for your offer, i will not forget it when i get serious.
  9. Mar 19, 2003 #8
    C is waaaay closer to assembly than VB! If you don't include libraries, it's actually fairly straightforward to see how your C code gets translated into assembly. You can also inline assembly code into your C as needed, which is very useful for low-level stuff like OS's.

    BTW, Staii, how much do you know about Linux? You might consider installing and playing with its command-line and programming stuff... it gives you a much better feel about how things work, and what the OS does, than Windows. It's also IMO a far far better environment for serious low-level programming.

    Couple question?

    - You are running in protected mode, right? :)

    - Do you know how to get keyboard input?

    - Do you know how to set up interrupt tables and handlers?

    http://www.tldp.org/LDP/tlk/tlk.html has a good overview of the stuff a normal OS does.

    Here are some links to classes on OS design... mostly these focus on advanced and hardware-independent stuff, but you still might find them a little useful:

    http://www.cs.oberlin.edu/faculty/jdonalds/341/ [Broken]

    Have fun... I haven't ever written an OS myself, but some of my friends did (or at least started too) and I have a basic idea of how things are setup... so I might be able to answer a few questions.

    (PS - The problem with Win3/9x wasn't the command-line base, it was running on old code that didn't use modern (386+ on PCs) memory management (protected pages) and multitasking features. Even WinNT has a command-line base (you can get to it in the install), as does UNIX/Linux.)
    Last edited by a moderator: May 1, 2017
  10. Mar 20, 2003 #9
    I'm pretty sure that for win95 and up (98 and up at least), that the command line bits aren't actually required for the OS. I'm pretty sure you can safely delete them, command.com etc. with no ill effects. Unless of course you need to load some stuff from dos before windows loads.

    You can pump out a bootable dos disk by typing sys a: in the run dialog or a dos box.

  11. Mar 25, 2003 #10
    i remember talking to him so much.. i miss the old PF. I personally haven't either.
  12. Mar 27, 2003 #11
    Is anybody really interested in this topic? I played around with low-level programming for a while, and a couple friends of mine wrote their own OSs for our school's OS design class. I can drone on and hit on the basics, if ppl want to hear it...
  13. Mar 31, 2003 #12

    I know nothing, I'm totally illiterate but there're good books by a good author out there that'd help you much:

    All books are by Andrew S. Tannenbaum published by Prentice-Hall.

    Operating Systems: Design and Implementation
    Modern Operating Systems
    Distributed Operating Systems (well, you need something a bit bigger than a PC/Mac/whatever)

    Just finished his "Computer Networks." Great book! Great author! And you may find a free eBook version presented legally/illegaly.

    If you're going the Assembly way, I think you'll also need Norton Guides with a few Assembly guide files. NG runs on MS-DOS as a TSR. It was a light in my dark hours of doing image processing with Assembly.

    Writing C mixed with some extern calls to handcrafted Assembly procedures can help a lot to make your task easier and the outcome closer to optimum. There is only the burden of understanding stack structure for extern calls to pass parameters. That was what I never got to understand!
  14. Apr 1, 2003 #13
    damgo, I would be interested in hearing the basics.
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook