I've got a decent amount of programming experience but it is all in high level languages. I recently picked up C and that project went really well and the learning experience was well worth it.
Now I want to take that one step further and learn assembly language but ideally I'd like to learn on an embedded platform as that's where I see some of my future projects lying. The question is, which is the best starting point or 'kit' for a beginner?
I'm looking for something that's reasonably easy to put together, can do 'real world' things and generally provide a good foundation that can be built on.
These include MASM (Macro Assembler from Microsoft), TASM (Turbo Assembler from Borland), NASM (Netwide Assembler for both Windows and Linux), and GNU assembler distributed by the free software foundation.
Assembly Language and the Rise of Inexpensive Memory Currently, most embedded systems programming is done in C; if not C, then another high-level language like C++. It was not always like this. In the early days of embedded systems, code was all written in assembly language; that was the only option.
Most assembly languages do not provide specific syntax for operating system calls, and most assembly languages can be used universally with any operating system, as the language provides access to all the real capabilities of the processor, upon which all system call mechanisms ultimately rest.
AVR is not the best instruction set. I would save it for a second or third instruction set. But eventually you may end up there as the arduino is incredibly popular and has good support through the community (although asm is exception not the rule in that world).
right now you can get a msp430 board for $4.30, basically TI is eating the cost to give these things away. msp430 is a good instruction set to learn.
The armmite pro is not a bad, arduino sized, board but uses an arm instead of avr. arm and thumb are good instruction sets.
There are emulators for pretty much everything, if or if not, writing an emulator is a very good way to learn how things work. If nothing else I normally recommend writing a disassembler.
Also an instruction set with a C compiler is good in that you can write some C code, play with the optimization, and see what kind of assembler is output, and learn different things about assembler. At first learn some tricks for efficiency and performance, later you will be able to outperform the compiler, or at least be on par. all of the ones mentioned have some sort of C compiler, avr and msp have ways to get gcc working, arm and thumb are supported by the mainline compilers. Llvm is automatically a cross compiler so you do not have to compile a compiler to get started, the msp430 backend to llvm is experimental but should work or be close, the arm and thumb backends are fine (use -m32 in clang to avoid 64 bit integers on a 64 bit host).
The stellaris chips formerly luminary micro, now ti (texas instruments) are good, thumb/thumb2 only. The mbed is actually pretty good other than the blue leds (give me migraines) you dont need to commit to a sandbox, plug in the usb, it mounts like a file system, copy your .bin file to the flash, press the reset button and it runs your program.
sparkfun.com is your friend, developer tools, and there is a long list of micrcontroller based boards, from all the players. the msp430 board I mentioned is about $5 something there, the armmite pro, many flavors of arduino, I recommend the lilly pad, it is about the same price as the arduino pro, but already has the header soldered on to use with the little usb to serial thing which you will want to purchase as well. stellaris is not represented at sparkfun, but many sub $50 boards are.
The msp430 boards, armmite pro, arduino boards, stellaris, mbed and others need power which is usually through the usb cable or for some get the ftdi based usb to serial thing
If you go the emulator route, qemu has support for a number of instruction sets, arm/thumb. there are gameboy and nds emulators out there. the ideas nds emulator, in source form comes with arm cores for both the arm9 and arm7, I have not tried to extract and use them on their own though. If you want to go old school there are tons of 6502 and z80 emulators out there, and some compilers believe it or not, certainly assembler.
The last assembler I would learn is x86, horrible instruction set and with the variations and microcoding you are not going to outperform the compiler across the board, yes your computer at that moment, but all x86 computers it is not worth the time. Other instruction sets are more important to know (arm, thumb, thumb2, avr).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With