Operating System

This is a discussion on Operating System within the A Brief History of Cprogramming.com forums, part of the Community Boards category; Hehe, same here, except my first language was really C++. It's funny because, I don't code in C++ much anymore...it's ...

  1. #61
    Disagreeably Disagreeable
    Join Date
    Aug 2001
    Posts
    711
    Hehe, same here, except my first language was really C++. It's funny because, I don't code in C++ much anymore...it's more C.

  2. #62
    Back after five years?
    Join Date
    Feb 2002
    Posts
    19

    Yes I am serious...

    For those of you who are asking, I AM serious...
    BMSprint.com - Waste your time reading my drivel about politics and life.
    Please, sometimes there's just nothing else better to do.
    Oh yeah, and pretty soon I am going to host a TV Show on BMSprint.com too. Another time waster.

  3. #63
    Super Moderator VirtualAce's Avatar
    Join Date
    Aug 2001
    Posts
    9,590
    Ken, you are not going to use interrupts in your OS? And you cannot call the BIOS? How do you read the sectors off of the drive w/o using INT 13h. You have to do CHS to LBA or just plain CHS translation and the BIOS takes that info, sends it to the drive, the drive looks it up and sends the right head to the right place.

    I'd be interested in seeing an OS w/o using interrupts. I don't know the Windows internals and most of it is prob undocumented anyways - does it use interrupts? Just cuz we cannot use em in MSVC does not mean it doesn't use them.

    To execute an interrupt in PM you either set up the IDT or pop out of PM, do the int, and pop back in which is slow and ugly.

    Also, Ken, have you decided on the multi-task stuff? If you are not going to use interrupt driven multi-task and task switch, how r u going to do it. I'm very interested. Kudos to you and your partner for doing this OS - you guys have learned a lot and its cool. I guess most of us previous C/C++ people have gotten on this assembly language kick - so much power, so much speed, no GUI or Windows politics. It's addictive.

  4. #64
    Unregistered
    Guest

    byte

    More specifically, a byte is the smallest unit of memory a computer can directly address. We happen to use computers that can access 8 bits, so that is the byte size. Some oddball computers in the 70's-maybe-early-80's had 7 and 9 bit bytes.

    However (there's always an exception)
    I do a lot of programming (SysRPL and Saturn Assembly) for the HP48gx calculator. It has 8 bit bytes yet can access data on the nibble level (4 bits), which is kinda screwy at times (you can have (for example) 32963.5 bytes of free memory)


    <FLAME-RETARDANT>
    Yes you can read/write individual bits, but (as far as I know) this is only done by masking off the other bits with a logical AND and comparing to zero or logically OR-ing the appropriate mask to the byte.
    </FLAME-RETARDANT>

    Rutabega
    It's me again, Margaret

  5. #65
    Disagreeably Disagreeable
    Join Date
    Aug 2001
    Posts
    711
    >I'd be interested in seeing an OS w/o using interrupts. I don't know the Windows internals and most of it is prob undocumented anyways - does it use interrupts?<

    Yes. When you press down a key on your keyboard or move the mouse, an interrupt is fired. I'm sure you're talking about the BIOS interrupts, though. It does (when running DOS programs), however it does not use the BIOS for system calls.

    >To execute an interrupt in PM you either set up the IDT or pop out of PM, do the int, and pop back in which is slow and ugly.<

    There is no way to execute BIOS interrupts while in protected mode.

  6. #66
    Registered User dirkduck's Avatar
    Join Date
    Aug 2001
    Posts
    428
    Heres a question to anyone (I dont know the answer, but id like to learn!):

    WHat exactly does the BIOS do? I know that you can alter certain system settings with it (i.e. the boot device) But im sure its more in-depth then that. Also, what is a 'dual BIOS'. When I start up my comp, it has a little image in the top right (before loading an OS...) that says dual BIOS...but whats the 'dual'? thanks

  7. #67
    Disagreeably Disagreeable
    Join Date
    Aug 2001
    Posts
    711
    >WHat exactly does the BIOS do?<

    BIOS - Basic Input/Output System

    It is either stored on a ROM chip on the motherboard or (in new mobos) on a flash chip on the motherboard.

    The basic function of the BIOS is to provide basic input/output services (duh). This includes access to devices, video I/O, boot up instructions, etc.

    >I know that you can alter certain system settings with it (i.e. the boot device)<

    Actually, I think (could be wrong) the CMOS takes care of that, not the BIOS.

  8. #68
    Registered User
    Join Date
    Nov 2001
    Posts
    38
    Yes Hillbillie, you are correct.


    Just my $/50

    There are two ways of doing things on a computer:

    1. Access the hardware directly
    or
    2. Use someone elses function call / interrupt


    #1 is usually faster yet harder to do
    #2 easier and sometimes more flexible

    Also, when accessing the hardware directly, you have to write all the code yourself.

    So in the beginning everyone had to go straight to the hardware, then they started writing generic routines in the BIOS to do the same thing yet are more flexible. These routines have to access the hardware eventually, though.
    Then you have the OS, which usually provides its version of the same functions. The OS functions either:

    1. Access the hardware directly
    or
    2. Call the BIOS functions which, of course, access the hardware directly.

    So if you use the OS's functions you may be going through 2 levels of code before anything really gets done.
    The OS functions are sometimes more powerfull ( in the sense that they can take a broad array of data types and amounts and do appropriate things with them ) and are, of course, supported by the OS. If you talk directly to the hardware, the OS doesn't know what you are doing, which has the potential to cause problems.
    And there are all of the functions which are provided by the OS which are not included in the BIOS at all, such as sound and graphics support ( other than the pc speaker and text modes ).

    As far as boot instructions go, I think all of those are contained in the boot sector on your boot device ( i.e. your C drive, or a network boot prom/module/thingy ).

  9. #69
    Seņor Member
    Join Date
    Jan 2002
    Posts
    561
    I have a question. Where do you even start with an OS? I think I'd be interested in making a simple one once I get the time/experience/patience to make one.

  10. #70
    In The Light
    Join Date
    Oct 2001
    Posts
    598

    No Way



    howdy tim545666,
    havent you been following this thread - you cant do, its a waste of time, you dont know enough, its simply impossible, dont waste you time.
    all of these gurus have allready made it clear that your run of the mill hacker will NEVER be able to create evan a simple OS.
    after all Bill stole his and Linus.. well he just got lucky


    M.R.

  11. #71
    Disagreeably Disagreeable
    Join Date
    Aug 2001
    Posts
    711
    >As far as boot instructions go, I think all of those are contained in the boot sector on your boot device ( i.e. your C drive, or a network boot prom/module/thingy ).<

    When I said "boot instructions" I meant the instructions the CPU executes before an OS is ever loaded, the instructions that POST, jump to the boot sector, etc...

    An OS has it's boot instructions stored in a program called a bootloader. It is found on a boot disk at the first sector. When a computer boots up, it checks the first specified boot device at sector 0. If there is a bootloader, it loads it into memory and jumps to it. If one isn't found, it moves to the next boot device and so on.

    >I have a question. Where do you even start with an OS? I think I'd be interested in making a simple one once I get the time/experience/patience to make one.<

    Go over to FD and check out the OS section. The bunch of us that are into this type of stuff will help you out.

  12. #72
    ....
    Join Date
    Aug 2001
    Location
    Groningen (NL)
    Posts
    2,386
    >I have a question. Where do you even start with an OS? I think
    >I'd be interested in making a simple one once I get the
    >time/experience/patience to make one.

    I suggest you take a look here:

    http://www.goosee.com/old/mike.htm

    This is a very small and easy to understand RTOS. Just requires you know C, ASM and some more advanced things. Hope it will help.

  13. #73
    Unregistered
    Guest

    Angry OS Dev

    &nbsp;&nbsp;All you guys are really mean. KidGuru, go to www.flashdaddee.com and check out the OS Dev forum. We would be happy to help you there. You can also E-Mail me at Compuboy1521@Yahoo.com.

    &nbsp;&nbsp;I also don't know too much C++ and I have already written the best part of the boot sequence for my OS. It's the best way to learn quickly. As you say, nothing is impossible. If you are willing to work hard and be baffled a large amount of the time (just as I am), there is no reason why you shouldn't make a decent OS. Don't expect it to have a Graphical interface for several years, though. The guys at Microsoft don't have to go to school and there are a lot more of them! My OS will look nothing like Windows (once I get that far). I have ideas for a much more efficient interface.

  14. #74
    Unregistered
    Guest

    Thumbs up OS Dev

    &nbsp;&nbsp;Didn't read past the first page, I see that Hillbille has already snatched you up. Ignore the above post.

  15. #75
    Registered User compjinx's Avatar
    Join Date
    Aug 2001
    Posts
    214

    Hmmm...

    You Should Go Ahead And Program An OS!!!!
    can't say I woud though, im happy now that I am able to print graphics to the screen.

    >15. Which is better, Coke or Pepsi?<
    hmmm... Coke is really nice, for taking corrosion of wires.
    Pepsi sucks.
    Root beer is best.
    "The most overlooked advantage of owning a computer is that if they foul up there's no law against whacking them around a bit."
    Eric Porterfield.

Page 5 of 8 FirstFirst 12345678 LastLast
Popular pages Recent additions subscribe to a feed

Similar Threads

  1. OpenGL and my operating system
    By hauzer in forum C Programming
    Replies: 5
    Last Post: 10-31-2008, 12:16 PM
  2. Operating System Project
    By Pete in forum Projects and Job Recruitment
    Replies: 1
    Last Post: 07-15-2004, 09:33 AM
  3. What is a Microsoft Operating System Like?
    By Troll_King in forum A Brief History of Cprogramming.com
    Replies: 35
    Last Post: 10-21-2002, 07:36 AM
  4. Operating system
    By sopranosomega in forum C Programming
    Replies: 6
    Last Post: 10-07-2002, 06:12 AM
  5. Microsoft = The Best Operating System
    By Troll_King in forum A Brief History of Cprogramming.com
    Replies: 92
    Last Post: 02-08-2002, 12:32 PM

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