Do you use C/ASM for specific purposes?

This is a discussion on Do you use C/ASM for specific purposes? within the A Brief History of Cprogramming.com forums, part of the Community Boards category; I just finished reading Just for Fun and it got me wondering. Do any of you use C or ASM ...

  1. #1
    Registered User CompiledMonkey's Avatar
    Join Date
    Feb 2002
    Location
    Richmond, VA
    Posts
    438

    Do you use C/ASM for specific purposes?

    I just finished reading Just for Fun and it got me wondering. Do any of you use C or ASM in ways that require that level of access? For example, I find it pointless to develop a web application in C++ when a fine framework such as .NET or Java can be used. Cut development time by a large amount and still achieve the same functionality.

    So, are you all just having fun with your choice of language, or do you really need to use it?

  2. #2
    Super Moderator
    Join Date
    Sep 2001
    Posts
    4,913
    I use C mainly because it's so widely used.

  3. #3
    unleashed alphaoide's Avatar
    Join Date
    Sep 2003
    Posts
    696
    I used C/C++ for schoolwork and that's it. In a real world I use Java, C#, PHP and leave C/C++ in my toolbox.
    source: compsci textbooks, cboard.cprogramming.com, world wide web, common sense

  4. #4
    Registered User CompiledMonkey's Avatar
    Join Date
    Feb 2002
    Location
    Richmond, VA
    Posts
    438
    From what I've seen of assembly so far, I really like it. I'd have a hard time finding a practical reason to use it though. Maybe if I go on to be a researcher, I'll have more time to dabble in the OS level material I would have learned along the way.

  5. #5
    Super Moderator VirtualAce's Avatar
    Join Date
    Aug 2001
    Posts
    9,590
    I use assembly for graphic functions that either are not supported in hardware or that are too slow in the DX software rasterizer.

    Assembly is quite useful in game programming. Funny how shaders started out looking much like assembly did in the day. And now we have GLSL, and HLSL which are the modern equivs of 'C' for shaders.

    For games you really need to use C/C++. Even compiled Java just can't stand up next to compiled C/C++. People are afraid of C/C++ because it's complex, but shying away from a language because it's complex usually means you are also sacrificing power as well.

  6. #6
    Dae
    Dae is offline
    Deprecated Dae's Avatar
    Join Date
    Oct 2004
    Location
    Canada
    Posts
    1,034
    I'm pretty much using C/C++ for personal projects and fun, but also for practice. I'm practicing because its widely used, and its dominant in game development and obviously if its for fun time isn't that much of an issue. I'd only use another language if it was required, or the advantage was large enough in a different language (like using Java for a web browser).

    I don't think I would know much of what was going on in the background if I started with Java - if I could even handle that, since Java is quite intimidating to beginners. I'll be choosing C++ for courses at college, even though I don't need that much fine control, because I'm more comfortable (not just because I've used it most, because at a time that wasn't true) with it than any other language.
    Last edited by Dae; 12-22-2005 at 11:54 PM.
    Warning: Have doubt in anything I post.

    GCC 4.5, Boost 1.40, Code::Blocks 8.02, Ubuntu 9.10 010001000110000101100101

  7. #7
    Supermassive black hole cboard_member's Avatar
    Join Date
    Jul 2005
    Posts
    1,709
    I use C/C++ for pretty much everything now. I rarely use Assembly for anything (because I can't find a practical use for it) but I have done my best to understand it as much as possible.

    I did touch on Java a couple of times but wasn't really that fussed about it. Same for C#.
    Good class architecture is not like a Swiss Army Knife; it should be more like a well balanced throwing knife.

    - Mike McShaffry

  8. #8
    Registered /usr
    Join Date
    Aug 2001
    Location
    Newport, South Wales, UK
    Posts
    1,262
    I use C all the time, making all sorts of programs, although it is just a hobby at the mo. At the same time I've gained skills in Perl, PHP, etc. for my web exploits.

    But I also use assembly, specifically for poking around in other people programs.

    I've used it to fix old Windows 95-based games that do silly things on startup that causes them to crash on modern Windows (usually by putting NOPs over the offending code). Recently I've also been tying together how C functions are compiled to asm, getting hold of arguments relative to the stack pointer and tidying up afterwards (generates tons of instructions relative to writing the function yourself in pure asm, but it's more flexible). I hope to make my own compiler one day.

    I know some Java, but there's something about it that I don't like and can't quite put my finger on...

  9. #9
    Registered User
    Join Date
    Aug 2002
    Location
    Hermosa Beach, CA
    Posts
    446
    If you want a stack trace, sometimes you need asm, even if it's just to get the frame pointer. I say sometimes you need it because a lot of platforms give you API's to do the stack trace. Others don't give you much of anything, and that's when asm comes in handy.
    The crows maintain that a single crow could destroy the heavens. Doubtless this is so. But it proves nothing against the heavens, for the heavens signify simply: the impossibility of crows.

  10. #10
    Supermassive black hole cboard_member's Avatar
    Join Date
    Jul 2005
    Posts
    1,709
    Quote Originally Posted by SMurf
    I use C all the time, making all sorts of programs, although it is just a hobby at the mo. At the same time I've gained skills in Perl, PHP, etc. for my web exploits.

    But I also use assembly, specifically for poking around in other people programs.

    I've used it to fix old Windows 95-based games that do silly things on startup that causes them to crash on modern Windows (usually by putting NOPs over the offending code). Recently I've also been tying together how C functions are compiled to asm, getting hold of arguments relative to the stack pointer and tidying up afterwards (generates tons of instructions relative to writing the function yourself in pure asm, but it's more flexible). I hope to make my own compiler one day.

    I know some Java, but there's something about it that I don't like and can't quite put my finger on...
    I know exactly what you mean about Java (and C#, same for you?). Sure they're neat languages; I like the way everything is structured - heavily OOP, but there's something I don't like about it. Maybe we're raw power freaks but don't realise it
    Good class architecture is not like a Swiss Army Knife; it should be more like a well balanced throwing knife.

    - Mike McShaffry

  11. #11
    S Sang-drax's Avatar
    Join Date
    May 2002
    Location
    Göteborg, Sweden
    Posts
    2,072
    Learning assembly teaches you a lot about the inner workings of a computer, and that cannot be a bad thing.
    Last edited by Sang-drax : Tomorrow at 02:21 AM. Reason: Time travelling

  12. #12
    Registered User CompiledMonkey's Avatar
    Join Date
    Feb 2002
    Location
    Richmond, VA
    Posts
    438
    I can't seem to find a really good assembly forum anywhere.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. If C++ is king, why was the linux kernel written in C/ASM?
    By CompiledMonkey in forum A Brief History of Cprogramming.com
    Replies: 21
    Last Post: 03-05-2003, 04:24 PM
  2. Reqd. C source code for Testing purposes
    By DP in forum C Programming
    Replies: 5
    Last Post: 01-14-2002, 11:45 AM
  3. which language best for my purposes?
    By plivermo in forum C Programming
    Replies: 5
    Last Post: 10-27-2001, 09:49 AM

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