Nerd Ralph drafted some simple instructions for programming lightweight AVR assembly functions.
Although I’ve been programming in AVR assembler for a few years now, it has taken me a while to learn inline asm. I still prefer writing in plain asm, but inline asm is the only way I’ve found to call assembler functions from C without having to follow the standard calling convention. The sample code at the start of this post defines a function named eelog that takes a single parameter passed in r26 (the low byte of the X register).
Source code can be found on GitHub.