0

March 7, 2016 AT 2:10 pm

Avrutils: Instructions for AVR Assembly Functions

Nerd Ralph drafted some simple instructions for programming lightweight AVR assembly functions.

avr-assembler_featured

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).

Read more.

Source code can be found on GitHub.


Check out all the Circuit Playground Episodes! Our new kid’s show and subscribe!

Have an amazing project to share? Join the SHOW-AND-TELL every Wednesday night at 7:30pm ET on Google+ Hangouts.

Join us every Wednesday night at 8pm ET for Ask an Engineer!

Learn resistor values with Mho’s Resistance or get the best electronics calculator for engineers “Circuit Playground”Adafruit’s Apps!


Maker Business — How Intel Makes a Chip

Wearables — Tape tactics

Electronics — Ground connections cooler via more vias

Biohacking — Itch Tracker for Apple Watch

Get the only spam-free daily newsletter about wearables, running a "maker business", electronic tips and more! Subscribe at AdafruitDaily.com !



No Comments

No comments yet.

Sorry, the comment form is closed at this time.