#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2013
    Posts
    101
    Rep Power
    0

    C well with system programming?


    I'm starting high school this year and it'll be a wreck. But on my free time I want to learn more concepts about programming. I'm very familiar with C. Is using C for system programming a good idea or is it better to use assembly? I'd like to learn system programming with C but I don't know where to go with it (if it's a good idea). Only books and sites I saw on it dealt with Unix programming.
  2. #2
  3. Contributing User
    Devshed Supreme Being (6500+ posts)

    Join Date
    Jan 2003
    Location
    USA
    Posts
    7,172
    Rep Power
    2222
    C and UNIX kind of grew up together. Before then (circa 1970), operating systems were usually written in assembly, which meant that every time you needed an operating system to run on a new computer, you needed to rewrite the entire operating system all over again. It was too much work to take an existing operating system and port it over to a completely different hardware platform. As a result, most computer models had their own unique operating system.

    What they did with UNIX was to write it in C. Well, most of it was written in C with some parts like device drivers still needing to be written in assembly. As a result, UNIX spread quickly. If you had a new hardware platform, porting UNIX to it was almost as easy as simply recompiling the kernel and rewriting the device drivers and other very low-level very hardware-dependent parts of the OS.

    C has been used to write many operating systems, including Windows. And it is a very good tool for doing system programming.

    Since you already know C, I would suggest that you also learn C++. C++ is a super-set of C, which means that by knowing C you already know most of C++.
  4. #3
  5. Banned ;)
    Devshed Supreme Being (6500+ posts)

    Join Date
    Nov 2001
    Location
    Woodland Hills, Los Angeles County, California, USA
    Posts
    9,638
    Rep Power
    4247
    Originally Posted by dwise1_aol
    Since you already know C, I would suggest that you also learn C++. C++ is a super-set of C, which means that by knowing C you already know most of C++.
    Actually, if you're going to learn C++, it is better to forget that you know C at all (at least in the initial stages). While C++ is designed to be largely backward compatible with C, there are also C++ ways of doing things which avoid several of the pitfalls of the C equivalents.
    http://www.stroustrup.com/new_learning.pdf
    For instance, he deals with vectors very early, instead of using arrays, and strings and streams instead of char arrays and fgets().
    Up the Irons
    What Would Jimi Do? Smash amps. Burn guitar. Take the groupies home.
    "Death Before Dishonour, my Friends!!" - Bruce D ickinson, Iron Maiden Aug 20, 2005 @ OzzFest
    Down with Sharon Osbourne

    "I wouldn't hire a butcher to fix my car. I also wouldn't hire a marketing firm to build my website." - Nilpo
  6. #4
  7. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2013
    Posts
    101
    Rep Power
    0
    C++ doesn't really deal with much of system programming as more of game programming. If I wanted to work with system programming using C where's a good source for a windows user? (I know my hardware stuff)
  8. #5
  9. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2012
    Posts
    187
    Rep Power
    82
    If I wanted to work with system programming using C where's a good source for a windows user?
    Check out Windows System Programming, 4th Edition

IMN logo majestic logo threadwatch logo seochat tools logo