I am a DSP, embedded software programmer, looking to improve my assembly language programming skills. For 7 years of my career I have been programming in C, Matlab, little bit of assembly language coding. (ARM assembly, DSP processor assembly).
Now I want to improve my assembly language coding skills(it can be any assembly language, doesn’t matter) by a big quantum, and take it to an ‘expert level’. I know that programming more in it would be the way to it, but what I am asking here is:
-
People’s experience in coding in assembly languages(any),which they have gained over years of coding in assembly language.
-
Guidelines to keep in mind while learning new assembly language
-
Specific tips and tricks to code efficiently and correctly in assembly languages
-
How to efficiently convert a given C code into a optimal assembly code
-
How to clearly understand a given assembly code
-
How does one keep track of the registers which would have operands in it, stack pointer, program counters, how to be closer in understanding the underlying architecture and the resources it provides for a programmer, etc..
Basically I want to get some “real life” tips from people who have done exhaustive and intensive assembly language programming.
thank you.
-AD
A good place to start would be Jeff Duntemann’s book, Assembly Language Step-by-Step. The book is about x86 programming under Linux. As I recall, a previous version of the book covered programming under Windows. It’s a beginner’s book in that it starts at the beginning: bits, bytes, binary arithmetic, etc. You can skip that part if you like, but it might be a good idea to at least skim it.
I think the best way to learn ASM coding is by 1) learning the basics of the hardware and then 2) studying others’ code. The book I mentioned above is worthwhile. You might also be interested in The Art of Assembly Language Programming.
I’ve done quite a bit of assembly language programming in my time, although not much in the last 15 years or so. As one commenter pointed out, the slight size and performance gains are hard to justify when I take into account the increased development and maintenance time compared to a high level language.
That said, I wouldn’t discourage you from your quest to become more efficient with ASM. Becoming more familiar with how a processor works at that level can only improve your HLL programming skills, as well.