Operating System

This is a discussion on Operating System within the A Brief History of Cprogramming.com forums, part of the Community Boards category; This is pretty funny... I wrote an OS once in ASM... It was in real mode, had a simple command ...

  1. #46
    Unregistered
    Guest
    This is pretty funny... I wrote an OS once in ASM... It was in real mode, had a simple command prompt and only accepted one command: "reboot".

    I you're really serious about this kid, heck, good luck! Learm assembly lanugage because you're going to need it, and learn algebra (c'mon...)...

  2. #47
    Registered User dirkduck's Avatar
    Join Date
    Aug 2001
    Posts
    428
    Ah, what the heck, ill have a go at this quiz, but I have no intention of writing an OS:

    1. What does BIOS stand for, and what is it?

    Basic Input Output System, the exact purpose im unsure of, but you can adjust 'low level' things about how your computer operates with it (what device to boot from..etc).

    2. What is Object Orientated Programming? (you'll need this for multitasking)

    programming focusing with 'objects' from 'classes'. where an object attains all the attributes from its class. then more things such as polymorphism and such to derive attributes to a class from a 'base' class...and more, but i dont want to go into such detail now.

    3. What are interrupts?
    To be honest, i dont know.

    4. Give me source code to a very simple GUI you have written, DOS or Windows (not anything as big as the Win9x Shell of course, just something that has windows, menu, and mouse support)

    N/A

    5. Explain what a Kernel is

    The core of an OS

    6. Give me source code to a full featured utility and a game. (You can give me this anytime)

    not releasing my source this soon

    7. Explain the difference between 16 bit and 32 bit operating systems

    for one the size of an interger and memory types, some more stuff also.

    8. Explain what a byte is

    8 bits . A unit of memory.

    9. What happens when you turn your computer on?

    Dunno, but electricity goes through your computer and makes it turn on

    10. Give me an equation that will center a graphic right in the middle of the screen, regardless of size. ( this is for windows )

    ((screenwidth/2)-(graphicwidth/2)),
    ((screenheight/2)-(graphicheight/2)

    11. Buy a bunch of Soda and Cheese Puffs, this is the programmers delicasy for long hours of work.

    nonono, pizza and coffee


    12. Explain why an interpreted language is not the way to go

    Its slow. Basicly, compiles your code on the run, as opposed to a compiled language that compiles your code before its run.

    13. Explain what an equation is

    A mathematical expression basiclly (hard to explain )
    expression: 5x+30 //doesnt equal anything
    exuasion: 5x+30=7x //does equal something

    14. Explain how graphics are drawn to the screen

    Put into the drawing buffer then 'flipped' onto the screen through the moniter.

    15. Which is better, Coke or Pepsi

    Carbonated Water .

    Please correct me on anything i got wrong, and the things i didnt get at all (i know there were a few). Im eager to learn this stuff

  3. #48
    Unregistered
    Guest

    Talking

    That little quiz was pretty funny... You don't need to be object oriented to multitask. You need ASM to multitask. If you think I'm kidding, try switching to PM without using any ASM. And if you can do that, then try setting up all of your descriptor tables. I did it once and all I knew how to do was print characters...

  4. #49
    Registered User
    Join Date
    Feb 2002
    Posts
    591
    Just to clear a misconception up. Bill Gates did not write an OS. He bought DOS from a Seattle company for 50000$ and thats what he started MS with. He stole the UI for Windows(and so did Apple) from Xerox labs. So dispite popular belive Gates is not a programing god, just a smart buisnies man.

  5. #50
    Disagreeably Disagreeable
    Join Date
    Aug 2001
    Posts
    711
    >3. What are interrupts? <

    A hardware interrupt happens when a hardware device tells the computer it needs attention. A software interrupt happens when the programmer calls one in the code (okay, this is more of a rough definition, but oh well.). A processor trap is issued when software does the wrong thing and causes an error.

    All interrupts interrupt the currently running code, does its thing, then returns back to the interrupted code (unless it's a trap; it just loops).

    >5. Explain what a Kernel is

    The core of an OS<

    Technically, the kernel is the peice of code that is directly responsible for the tasking model, scheduler, and kernel primitives. Saying it is the "core" is misguided.

    >Explain the difference between 16 bit and 32 bit operating systems<

    A 16-bit OS runs in either real mode or 16-bit protected mode. A 32-bit OS runs in 32-bit protected mode. (This is assuming PC-ISA.)

    >8. Explain what a byte is<

    8 bits (binary digits), 2 nybbles, 0.5 word, 0.25 doubleword, etc. etc...

    >9. What happens when you turn your computer on?<

    The BIOS takes control and performs the POST, then checks the first boot device for a boot sector. (I don't recall the exact offsets off the top of my head; if you really want them, I'll dig them up.) If it finds a valid bootsector, it transfers control to it.

    >11. Buy a bunch of Soda and Cheese Puffs, this is the programmers delicasy for long hours of work.<

    No, pizza and coffee is!!!

    >14. Explain how graphics are drawn to the screen<

    Data is written to video memory...pretty straightforward.

    >15. Which is better, Coke or Pepsi?<

    Duh, Coke!

  6. #51
    Disagreeably Disagreeable
    Join Date
    Aug 2001
    Posts
    711
    >the linux source is like huge ...<

    I'm not sure if someone has posted this since then, but search for the v0.10 code. It is very easy to understand and good to learn from.

    Another OS that really helps newbies learn is GazOS. Cosmos is also a really good one. They are functional (paging, protected mode, multitasking, apps, etc.) but at the same time easy to understand.

    If you are serious about wanting to code one, look at these OS's (do a Google search for them) and then decide for yourself if you can and still want to make an OS. It's not as hard as people think. Of course it's a lot harder than making a Windows console program.

    Good luck!

  7. #52
    Just one more wrong move. -KEN-'s Avatar
    Join Date
    Aug 2001
    Posts
    3,230
    1. What does BIOS stand for, and what is it?

    *Doesn't really matter once you get into the actual OS, you can't USE the BIOS But Basic Input Output System, if you must.

    2. What is Object Orientated Programming? (you'll need this for multitasking)

    *Don't need to know it to make an OS.

    3. What are interrupts?

    *Can't use 'em once you get into PMode, so why bother?

    4. Give me source code to a very simple GUI you have written, DOS or Windows (not anything as big as the Win9x Shell of course, just something that has windows, menu, and mouse support)

    *Well considering that you don't NEED a gui? Plus, WinAPI is totally different from draing a shell with your OS.

    5. Explain what a Kernel is

    *The main part of the OS, resposnible for things like the multitasking model, etc.

    6. Give me source code to a full featured utility and a game. (You can give me this anytime)

    *Are you on crack? What does a gmae have to do with an OS?

    7. Explain the difference between 16 bit and 32 bit operating systems

    *"A 16-bit OS runs in either real mode or 16-bit protected mode. A 32-bit OS runs in 32-bit protected mode." - Quothe the Hillillie.

    8. Explain what a byte is

    *8 bits

    9. What happens when you turn your computer on?

    *The little light flicks on, sometimes you get a beeping sound, and the monitor makes a crackly noise before displaying the splash screen.

    10. Give me an equation that will center a graphic right in the middle of the screen, regardless of size. ( this is for windows )

    *((ScreenW/2)-(GraphicW/2)),
    ((ScreenHt/2)-(GraphicH/2)

    11. Buy a bunch of Soda and Cheese Puffs, this is the programmers delicasy for long hours of work.

    *I'm out of money. Buy some for me?

    12. Explain why an interpreted language is not the way to go

    *Because you have to interpret it?
    Actually, because you need an OS to run the interpreter...

    13. Explain what an equation is

    *Those things you loathe (or love, if you're odd) in math.

    14. Explain how graphics are drawn to the screen

    *Care to elaborate? Drawing to video memory? Reading in a bitmap?

    15. Which is better, Coke or Pepsi?

    *Montain Dew or Dr. Pepper (Mr. Pibb is also acceptable)

  8. #53
    Registered User dirkduck's Avatar
    Join Date
    Aug 2001
    Posts
    428
    Hillbilli - Thanks for the info, I've learned something

  9. #54
    Disagreeably Disagreeable
    Join Date
    Aug 2001
    Posts
    711
    No problem, dirkduck.

    To everyone: Just for the record, I didn't mean to come off as a smart-ass. After I read my post, it seemed to me like I was trying to be a smarty. I wasn't. I was just trying to help.

  10. #55
    Unregistered
    Guest
    Ken, just to tell you, you can use interrupt in PM if you know how to set up the tables.

    Also if you knew anything, you woudl know that Gates wrote Altair BASIC and many other programs...

  11. #56
    Just one more wrong move. -KEN-'s Avatar
    Join Date
    Aug 2001
    Posts
    3,230
    >>Ken, just to tell you, you can use interrupt in PM if you know how to set up the tables.<<

    I know, you have to set up an IDT.

    >>Also if you knew anything, you woudl know that Gates wrote Altair BASIC and many other programs...<<

    Who said I didn't know that? I was forced to watch a movie on the altair once...worst waste of 2 hours I've ever spent.

  12. #57
    Just one more wrong move. -KEN-'s Avatar
    Join Date
    Aug 2001
    Posts
    3,230
    >> He stole the UI for Windows(and so did Apple) from Xerox labs. So dispite popular belive Gates is not a programing god, just a smart buisnies man.<<

    True enough, but he only got the idea from Xerox PARC (had to watch a movie on this, too ) they actually coded it themselves, though. Plus, I'd take the Windows UI over Mac any day.

  13. #58
    Registered User
    Join Date
    Jan 2002
    Posts
    381
    To gurukid:
    Mostly the people here are right. By all means have your ambitions but be realistic. Making an os is bloddy hard work. But if you are really serious about it then I'd suggest going out and learning asm right now. If you are serious enough then this shouldn't be too difficult.
    Then go back and learn ALL the ins and outs of C++ (you really have to get a book for that). To do something the size of an os, you'll need to know the language like the back of your hand.
    If after all that you are still interested in creating an os then by all means go ahead with it. But still keep it simple, make a fully functional command based one first and work up from there.
    Its a long road, but take it step by step and you'll get there

    Also to clear up some things about Gates.
    Yes he is actually smart. He went to some pretty good schools and did quite well.
    He is also a buisnessman and a basterd. I think these two things are pretty closly intertwined.

  14. #59
    train spotter
    Join Date
    Aug 2001
    Location
    near a computer
    Posts
    3,859
    >>NEW Opersting System
    >>OPORATING SYSTEM

    Include a spell checker.

    Start on an OS.

    Why be limited to the normal stuff people start with? (like a virus or trojan or god forbid an programming exercise like 'recursive palindromes')
    "Man alone suffers so excruciatingly in the world that he was compelled to invent laughter."
    Friedrich Nietzsche

    "I spent a lot of my money on booze, birds and fast cars......the rest I squandered."
    George Best

    "If you are going through hell....keep going."
    Winston Churchill

  15. #60
    Registered User
    Join Date
    Jan 2002
    Location
    Vancouver
    Posts
    2,220
    Why be limited to the normal stuff people start with? (like a virus or trojan or god forbid an programming exercise like 'recursive palindromes')
    I started programming with

    Code:
    #include <stdio.h>
    
    void main()
    {
     printf("Hello, world")
    }
    After about a month I finally figured out why it didn't work and updated to version 2:
    Code:
    #include <stdio.h>
    
    void main()
    {
     printf("Hello, world");
    }
    Then about 6 months later I realised void main was bad, and here is version 3:

    Code:
    #include <stdio.h>
    
    int main(void)
    {
     printf("Hello, world");
     return 0;
    }
    wow.

Page 4 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, 01:16 PM
  2. Operating System Project
    By Pete in forum Projects and Job Recruitment
    Replies: 1
    Last Post: 07-15-2004, 10: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, 08:36 AM
  4. Operating system
    By sopranosomega in forum C Programming
    Replies: 6
    Last Post: 10-07-2002, 07: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, 01:32 PM

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