A question about assembler

Started by
9 comments, last by AIDev 16 years, 11 months ago
Is assembler still used today? I mean.. games are still programmed with C++ in combination with assembler? If this is the case.. could you give me some tutorials links or a few good books to buy? thanks :)
--------------------------------Welcome to Silent Hill
Advertisement
Assembly language is still used in various specific areas:

- Systems software development -- use of assembly language, or compiler   intrinsics, is necessary at times because you require access to certain  instructions which aren't normally available- Embedded systems or similar systems where space is of a premium -- however, C  and/or C++ are also often used here, albeit it with certain caveats- Optimization (directly using SSE, say) in performance-intensive programs   where profiling has indicated that a boost would be gained from rewriting  a portion of the code which is running slowly in assembly language and  the developer is skilled enough to gain a boost from doing so
[TheUnbeliever]
It is used in games (or programs) if there is a function that needs to be fast but is slower in C++, or whatever other language you are using. For example, I downloaded a "Mandelbrot set generator" that was written in asm because it runs a lot faster.
Assembly language (and it is assembly, not 'assembler') is useful, indeed essential, just not for high-level programmers. The world of computing wouldn't go 'round without assembly programmers - how else would we produce our C++ compilers? (Please don't take that too seriously) You just need to realise that an important programming mantra is to use the highest-level language you can get away with.

If you're coding the cross-platform interfacing component of a hardware driver, you have no choice but to get involved with ASM, but if you're writing user-mode applications, you should probably stick with what you're used to.

Admiral
Ring3 Circus - Diary of a programmer, journal of a hacker.
Ooook, thanks for your posts.. they were very useful. BTW.. I don't know why I name it "assembler" xD

Could you give me some tutorial links or a good book about it? thank u so much!
--------------------------------Welcome to Silent Hill
This topic has been beat to death, but it is still irresistable. I would encourage any programmer to learn assembly. I think that the most important advantage to understanding assembly is a deeper understanding of how the processor and its peripheral work and interact.

A few uses for assembly I can think of off the top of my head are:
1) Timing
2) Optomizing mathmatical routines using SIMD
3) Speeding up work with large memory buffers

There are, of course, the obvious driver development and operating system development examples.

Learning assembly on a PC these days is difficult for several reasons. Much of the material is outdated and modern operating systems (i.e. Win95+) run in protected mode and do not permit direct access to many of the IO ports and interrupts.

I guess the point of all this is to say that perhaps a fun way to learn assembly would be to start with microcontrollers first. Look up PIC16F84 on Google. This will turn up all kinds of electronic projects and documentation. A good resource for electronic parts is www.digikey.com.
I've been searching on google for a while and I found a lot of webs about it. I just need to know something. Is there any assembly compiler that is updated almost every six months? What compiler should I download? NASM is ok?

Thanks a lot =)
--------------------------------Welcome to Silent Hill
"Assembly compilier" is tecnically an incorrect term.

"Assembly Language" is the language, An "Assembler" is the er. 'compilier'.

I personally like NASM. Alongside NASM, MASM is updated often as well
(I believe so, anyway).
Humm.. I've a problem with english terms hehe. Ok, I downloaded NASM. I'll give it a try.

Thank you for your reply.
--------------------------------Welcome to Silent Hill
What I have used mostly is inline assembly in C++ in Visual Studio. I have used A86/386, NASM, MASM, and a host of other other compilers in the past. Lately, I have mainly used inline assembly in Visual Studio on the rare occassions I need assembly. In answer to your question, I would recommend NASM as I believe there is a larger community.

There are some tutorials out there on writing a SIMPLE OS (like just enough to tell the BIOS your bootable and execute your code). This could provide a good test bed for your code. If you are interested and have trouble finding the tutorials, let me know and I'll help.

As a side not: Assembly compiler is technically correct. I didn't flinch (too much) when I saw it. The only reason it would make a difference what you call it is when searching for one on Google. In this case, use "Assembler." Of course, once you get cracking, you'll figure all this out.

Good luck

This topic is closed to new replies.

Advertisement