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.
Join us every Wednesday night at 8pm ET for Ask an Engineer!
Maker Business — Transforming Today’s Bad Jobs into Tomorrow’s Good Jobs
Wearables — Avoid burnout
Electronics — USB Powered Mayhem!
Biohacking — Biohacking : BiAffect – App that Detects BiPolar Disorder
No comments yet.
Sorry, the comment form is closed at this time.