Learning assembly

kohlrak

Joined Apr 7, 2010
14
The preferred resources depend on the CPU you plan on programming for. For example, if you're working on an x86, you might want to consider AMD's or Intel's programmer manuals. The reason for this is because each family has it's own instruction sets.
 

Thread Starter

guitarguy12387

Joined Apr 10, 2008
359
Ohh okay that makes sense. Well its for DSP applications so something more along the lines of TI's C55xx series chips or something rather than x86.

So should there be a TI assembly programming manual type of thing?

I am a bit concerned that they will assume some knowledge of assembly, which i have none...
 

BMorse

Joined Sep 26, 2009
2,675
most DSP applications/Programs written for microcontrollers are usually better written in C or another high level programming language other than assembly, especially when running FFT algorithms or routines..... there just isn't a very efficient way of doing those calculations in assembly...


My .02

B. Morse
 

kohlrak

Joined Apr 7, 2010
14
Ohh okay that makes sense. Well its for DSP applications so something more along the lines of TI's C55xx series chips or something rather than x86.

So should there be a TI assembly programming manual type of thing?

I am a bit concerned that they will assume some knowledge of assembly, which i have none...
Believe me, this isn't a problem. Assembly is entirely different between chips. However, something you may need to understand is the arch... That is, what all it assumes it has, what it's registers are, etc. You need as much as possible about your chip itself, which helps greatly in learning the instruction set.
 

rjenkins

Joined Nov 6, 2005
1,013

Thread Starter

guitarguy12387

Joined Apr 10, 2008
359
most DSP applications/Programs written for microcontrollers are usually better written in C or another high level programming language other than assembly, especially when running FFT algorithms or routines..... there just isn't a very efficient way of doing those calculations in assembly...
Hmm can you be more specific? Cuz this seems to go against everything i've found/been told on the subject... in fact, TI's DSPLib functions are all in assembly for efficiency...

Believe me, this isn't a problem. Assembly is entirely different between chips. However, something you may need to understand is the arch... That is, what all it assumes it has, what it's registers are, etc. You need as much as possible about your chip itself, which helps greatly in learning the instruction set.
Ooohhh okay cool! Good to know. I will dig around a bit more. So the assembly programming manual should be included with all the other datasheets for the chip i assume, right? Thanks again for the tips!

Most DSP chip makers supply optimised libraries for such things as FFT and filter algorithms.

If you look at the makers web sites (TI, Microchip etc) you may find source code in the download or application notes areas.

OK, just checked - example code on the Microchip site:
http://www.microchip.com/stellent/id...GE&nodeId=1408
and app notes:
http://www.microchip.com/stellent/id...GE&nodeId=2560

(Not looked at it in detail, hope it's some use).
Interesting! Yeah, i've seen the source code and whatnot... i just don't have the slightest clue what i am looking at haha. I don't know assembly syntax even... other than a semi-colon means a comment haha! Good resource though, thanks!
 

kohlrak

Joined Apr 7, 2010
14
Hmm can you be more specific? Cuz this seems to go against everything i've found/been told on the subject... in fact, TI's DSPLib functions are all in assembly for efficiency...
Except scripting languages, languages with emulated machine code (java), and basic (considered by some to be an assembly dialect) are compiled into assembly. Therefore, assembly makes nice glue between various other languages. Many languages, including C/C++, have an __asm directive to include assembly code in it. Once something is in assembly, it's hard to identify what language it originated in. Though, for all intents and purposes, since it's written in asesmbly, it theoretically would be no problem to interface those libs with assembly, too. It depends a bit on the libs, though.

Ooohhh okay cool! Good to know. I will dig around a bit more. So the assembly programming manual should be included with all the other datasheets for the chip i assume, right? Thanks again for the tips!
Usually it's a separate manual, but yes, it SHOULD be among them (reality is much different, however, as many devices are closed and so forth).

Interesting! Yeah, i've seen the source code and whatnot... i just don't have the slightest clue what i am looking at haha. I don't know assembly syntax even... other than a semi-colon means a comment haha! Good resource though, thanks!
Assembly syntax varies between assembler, not even the cpu. Compare GAS and FASM syntaxes for the x86, and you'll find that the "destination oprand" and the "source oprand" are swapped.

Rich (BB code):
;Copy ebx into eax
mov eax, ebx ;Fasm/masm/(in fact, most common syntax)
movd %ebx, %eax ;GAS (I hate gas, so i'm not 100% sure on the specifics here.)
 
Top