Create an operating system

This is a discussion on Create an operating system within the Tech Board forums, part of the Community Boards category; I know it's very complex, and I know it's flexibility makes it more complex. I was mearly suggesting an alternative ...

  1. #16
    Woof, woof! zacs7's Avatar
    Join Date
    Mar 2007
    Location
    Australia
    Posts
    3,459
    I know it's very complex, and I know it's flexibility makes it more complex. I was mearly suggesting an alternative route to creating his OS

    You could at least take some chunks... Look at the source for ReactOS, Minix, Linux and a few others -- I'm sure it'd help.

  2. #17
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,821
    Since this is your first attempt at an OS, getting past the boot loader and to something which prints "hello world" and then halts would be a pretty reasonable achievement.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.
    I support http://www.ukip.org/ as the first necessary step to a free Europe.

  3. #18
    Malum in se abachler's Avatar
    Join Date
    Apr 2007
    Posts
    3,189
    Bootloaders arent that difficult to write, you just need to know which BIOS calls to make. You could even put the 'hello world' message in the bootloader. 512 bytes is huge when writing assembly. Like I said, get yoru boot loader runnign in real mode first, then you can have it load the code that switches you to protected mode later. 16 bit code is so much easier to write, not to mention the BIOS calls are pretty much static at this point.
    Until you can build a working general purpose reprogrammable computer out of basic components from radio shack, you are not fit to call yourself a programmer in my presence. This is cwhizard, signing off.

  4. #19
    Super Moderator VirtualAce's Avatar
    Join Date
    Aug 2001
    Posts
    9,598
    If you can get the boot loader to work AND load your kernel AND then get a C program to run on your OS you will have gotten farther than a bunch of old Flashdaddeeans.

    I got as far as the bootstrap but did not get to loading my kernel. BTW if on the rare chance you do get FAT32 working on your OS if MS finds out about it they will ask for royalties. Not likely they will find out but it's a fair warning.

    The main goal for the OS bootup process is to bootstrap (starts at 0000:7C00) and load the kernel into memory and possibly perform a jump to more startup code.

    Once you get the assembler code done you will want to move to C/C++ ASAP. The faster you get C code running on your own OS the faster your development time will be.

    The one thing that absolutely MUST be coded in pure assembler is the 512 byte bootstrap code. This cannot be done in C. Since this is your first attempt at an OS I recommend a real mode operating system. Startup is easier and you can do interrupts easily. With protected mode you must at least setup the GDT and the IVT and perhaps the LDT. The easiest way in protected mode is to setup a simple 2 descriptor system. Each descriptor would cover 50% of the total system RAM. You would then allocate memory out of this RAM and so forth. One portion is for user code and one portion is for OS code. The Intel tech refs explain this system in great detail.
    Last edited by VirtualAce; 10-17-2007 at 01:01 AM.

  5. #20
    Registered User
    Join Date
    Oct 2001
    Posts
    2,129
    Quote Originally Posted by Bubba View Post
    BTW if on the rare chance you do get FAT32 working on your OS if MS finds out about it they will ask for royalties.
    how would linux deal with that then?

  6. #21
    Registered User
    Join Date
    Jun 2007
    Posts
    25
    Thanks everyone.

    I guess it's off to learn assembly then.

Page 2 of 2 FirstFirst 12
Popular pages Recent additions subscribe to a feed

Similar Threads

  1. using an operating system command in c
    By clearrtc in forum C Programming
    Replies: 2
    Last Post: 05-21-2006, 05:26 PM
  2. Floppy Operating System
    By eam in forum Projects and Job Recruitment
    Replies: 10
    Last Post: 10-09-2004, 08:40 AM
  3. Operating system
    By sopranosomega in forum C Programming
    Replies: 6
    Last Post: 10-07-2002, 07:12 AM
  4. idea: operating system
    By roberth9000 in forum Contests Board
    Replies: 6
    Last Post: 09-16-2002, 07:08 AM
  5. What operating system are YOU useing?
    By RoD in forum A Brief History of Cprogramming.com
    Replies: 36
    Last Post: 09-14-2002, 11:02 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21