OS Development (PLEASE READ THIS!)

Hi, I've been working on my own OS for a couple of weeks and I have gotten surprisingly far. If you'd like help on your own OS project or would like to help me at all, e-mail me at bthompson67665@yahoo.com

This entire OS project started out from me playing with a great file loading bootstrap. It could load any .COM (raw machine code) file from [italic][b]ANY[/b][/italic] floppy. Next I wrote an extended loader that had a few DOS functions and allowed you to specify the file you would like to load so I wrote my own test programs and they worked great. The current DOS functions that have been implemented are print character (INT29H), print string (function 9H,INT21H), exit program (INT20H and function 4CH,INT21H), and terminate-stay-resident (function 31H,INT21H). I'm planning to write an XMS manager (4gigs of RAM max., 64 terabytes of virtual memory), a GUI (640x480 pixels,16 colors and 320x200 pixels,256 colors are easiest), and mouse support right through the PS/2 port and COM ports (lots of experimentation!).

Comments

  • please make a website with this information, I'll try to do the same thing with my FrUnix proyect....

    osprogrammers@hotmail.com

    can you post some sources please??



  • : please make a website with this information, I'll try to do the same thing with my FrUnix proyect....
    :
    : osprogrammers@hotmail.com
    :
    : can you post some sources please??

    Yeah ,a website would be great. I'm also very interrested on this subject , but I realy don't know where to start.
    especialy when it comes to PM and cross development with C.
    maybe we could Talk about it off the message board.


    mo




  • : : please make a website with this information, I'll try to do the same thing with my FrUnix proyect....
    : :
    : : osprogrammers@hotmail.com
    : :
    : : can you post some sources please??
    :
    : Yeah ,a website would be great. I'm also very interrested on this subject , but I realy don't know where to start.
    : especialy when it comes to PM and cross development with C.
    : maybe we could Talk about it off the message board.
    :
    :
    : mo
    :
    :
    :
    :

    well, for the info for protected mode is at developer.intel.com/design/pentium/manuals
    I think that's the right link, otherwise go to developer.intel.com and look for manuals for the pentium in the Intel Architechture area.

    That will tell you all you need to program protected mode, except some hardware stuff like setting the A20, which you probably don't even have to do, and reprogramming the PIC which you have to do, or else a keyboard int will generate a coprocessor segment overrun exception, and the timer will generate a double fault exception, or worse, the exceptions will be handled like hardware ints. You only have to reprogram the lower ints, but most people seem to simply program the interrupts to 20h-30h. Reprogramming the PIC is fairly simple, Ralph Brown's Interrupt list will give you the info you need and there are plenty of examples out there. Also, there are plenty of examples of setting the A20 line, however, on most computers it is already set.

    I'm not sure what part of cross-development with C you don't know. Of course, you can be a MAN and right everything in assembly, or well, you could be sane and use some C/C++ for certain parts where C/C++ would make things a lot easier to deal with. Anyways, MASM and TASM should come with examples of linking C and asm together. The basics are pretty much you push the parameters right to left, the caller cleans up the stack, and you decorate the names with an underscore (_). Most things are returned in al/ax/eax depending on the size, though other things are returned in other places, but those shouldn't come up too much in programming this low-level. Also, in protected mode always push in DWORD size increments. That means a char takes a dword of stack space, and structures are just pushed in DWORD sized chunks that are padded to a DWORD if necessary. In C/C++ all you need to do is a declare a function _cdecl to call it from assembly, to call assembly functions from C, you need to extern "C" them (in C++).

    Since, I mentioned the Intel System Programmer's manual, and Ralph Brown's Interrupt List, it just wouldn't be complete without throwing the AoA in there. Though not designed for protected mode, at least at this level, the Art of Assembly has some info that may be helpful anytime.

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories