Thank you all for the quick and informative replies!
[quote author=Nick Gammon link=topic=182761.msg1353988#msg1353988 date=1376543344]
Any particular reason why? Or do you just want to learn assembler?
You can drop into assembler from C, although it's fiddly IMHO. I don't know of a stand-alone assembler but there almost certainly is one.
If you are just doing it for speed, I wouldn't bother personally. If you want to learn more about the architecture, well have fun!
I'm doing it for educational purposes. I don't get much satisfaction out of seeing my C programs work, let alone see an Arduino Sketch work. :P
The avr-gcc toolchain will assemble assembly language source files. After all when avr-gcc compiles a c++ file it first generates an assembly language file. Which it then passes to avr-as to assemble into an object file. Which is then passed to avr-ld to produce an executable. The toolchain comes with the Arduino IDE, or you can get it from the Ubuntu repositories.
I searched for a way to just skip to the assembler part of the compilation, turns out avr-gcc can accept .S assembler files directly. Seems like quite a simple solution for the small amount of support available in the web. I found this out in this site: http://www.nongnu.org/avr-libc/user-manual/assembler.html
I haven't gotten the Arduino Uno to respond though...
I use tavrasm. Here is the syntax I use in my build shell script:
/home/tanhadron/Programs/tavrasm/bin/tavrasm -i PumpController.asm -o PumpController.hex -e PumpController.lst
Then I use avrdude to send the hex file to my ATtiny44. Or 13. Or 85, or whatever.
/home/tanhadron/Programs/arduino-1.0.3/hardware/tools/avrdude -C/home/tanhadron/Programs/arduino-1.0.3/hardware/tools/avrdude.conf -pattiny44 -cstk500v1 -P/dev/ttyACM0 -b19200 -Uflash:w:/home/tanhadron/Projects/PumpController/PumpController.hex:i
There is a little bit of house keeping in the actual asm file. Set up the interrupt vectors, initialize the stack, disable the watchdog timer... but once you have done it once, the template is there and using it for other programs is simply a cut and paste.
How do I know the type of "housekeeping" I need to get it up and running?
I assume that it's either the fact that I haven't done any "housekeeping" in my code, or the shell script that's holding my code back. I'm using the same terminal commands used in http://balau82.wordpress.com/2011/03/29/programming-arduino-uno-in-pure-c/ , maybe they were just made for C?
I would go further as to post my assembler code here to troubleshoot, but I'm afraid I may be going a bit off-topic now for an "arduino programming questions" sub-forums primarily focused on Sketches.