PDA

View Full Version : Do you use C/ASM for specific purposes?



CompiledMonkey
12-22-2005, 11:01 PM
I just finished reading Just for Fun (http://www.amazon.com/gp/product/0066620732/qid=1135313912/sr=8-1/ref=pd_bbs_1/002-4475127-2869640?n=507846&s=books&v=glance) 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?

sean
12-22-2005, 11:35 PM
I use C mainly because it's so widely used.

alphaoide
12-22-2005, 11:51 PM
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.

CompiledMonkey
12-22-2005, 11:59 PM
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.

VirtualAce
12-23-2005, 12:09 AM
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.

Dae
12-23-2005, 12:28 AM
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.

cboard_member
12-23-2005, 03:00 AM
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#.

SMurf
12-23-2005, 06:35 AM
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...

IfYouSaySo
12-23-2005, 09:16 AM
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.

cboard_member
12-24-2005, 05:41 AM
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 :)

Sang-drax
12-24-2005, 12:42 PM
Learning assembly teaches you a lot about the inner workings of a computer, and that cannot be a bad thing.

CompiledMonkey
12-24-2005, 03:43 PM
I can't seem to find a really good assembly forum anywhere.