Inline ASM - Advanced AVR 3.0 Core
Updated with better details and more high quality examples. As always the little note about inline asm found in AVR-c sucks BBC. It's copy-and-pasted content, incomplete and incompetent; 3.0 tries to be practical, precise and easy with fully tested everything and well commented code. Extended documentation can be found in section 6.47 How to Use Inline Assembly Language in C Code in GNU website. Sadly the price for not being too much dumb is to read a lot, but more sadly even if you have read everything, open-source documentations are repetitive and extremely boring and sometimes filled with the same obvious mistakes.
Inline asm can be very complicated. Just the io mapping is a headache, even though it's just a number. Avr-c has this very dumb nesting within nesting definitions for the io address, so something like PORTB that can be easily accessed in c is not as straightforward with asm. Juno Inline ASM 2.0 is actually pretty good in term of quality of examples but it lacks good comments and detailed explanations and of course it avoids using avr-c io definitions, and so making it less portable and useful and fun. For critical project, avoiding avr-c io definition is still a good idea.
1, beginner level, simple asm statements to access some cpu level instructions, such as sleep, nop and wdr.
2, intermediate level, input and output variables between c and asm.
3, advanced level, explore c, asm, compiler and hardware to create new applications and new possibilities.
It's a long long process to test out every tiny bit of thing, and to rewrite 90% of the content and 100% of the examples, but Juno Inline ASM 3.0 makes it fun and easy again to use inline asm and to develop advanced application for the future.