Starting to program microcontrollers in assembler is quite a barrier in the beginning. Searching the web for Assembler tutorials and example code can get confusing really fast, that’s why I want to share my experiences and provide a collection of links that helped me to get started with this topic.

First of all three important differences derive from the three major microcontroller companies: Microchip, Atmel and ARM. Good introduction to Microcontrollers (also for the difference of PIC and AVR) and also this basic Introduction into Assembly Language and a Assembler Hello World ASM Example are worth having a look.

Further there are ways to convert C code to Assembler code, to optimize C code for AVR microcontrollers by Atmel and ways to mix these languages together: Mixing C and Assembly, Atmel tutorial for Mixing C and Assembly

The difference between the .asm and .S file extensions for the assembler code files is not really clear, but this messageboard thread about the file extensions difference of .ASM and .S helped a little bit. Two examples for .S-files can be found with a Linker Script commands for S-code blink example and another S-code blink example. More infos on Linker Scripts here.

Besides the instruction sets and specific libraries for the microcontrollers it is important to understand how the GNU GCC Compiler works. For example does it use the GNU Binutils for i.a. compile command objcopy etc. Here can also be found some compile commands for my AVRFID example.

If you find anything wrong in this collection of informations on microcontroller programming, I would be happy for a comment. I wanted to sum up and share my search results here and maybe it helps other people to get faster into it!?

Advertisements