Category Archives: assembly language

ATMEL Studio 7 Does Blink in Assembly Language

See the previous post (here) for detailed information on AS7 installation and simulating of an Arduino program execution. As an exercise to gain familiarity with AS7, lets make an assembly language project using the below Blink code: • Select “File>New>Project”. … Continue reading

Posted in arduino, assembly language | Tagged , , , , , , , | Leave a comment

My Cup Overflows

When performing math (even basic addition and subtraction) with signed numbers an overflow problem sometimes arises. The Arduino microcontroller indicates the existence of an overflow error by setting the overflow flag in the SREG. Here’s a demonstration of the overflow … Continue reading

Posted in arduino, assembly language, avr, avr inline assenbly | Tagged , , , , , | Leave a comment

Arduino Inline Assembly Port & Pin Compendium

The following is a compendium of inline assembly functions dealing with ports and pins. Use these at your own risk. These functions have been trimmed of most bounds checking, so they can easily be abused. The Arduino Inline Assembly Tutorial … Continue reading

Posted in arduino, assembly language, avr, avr inline assenbly | Tagged , , , , , , , | 1 Comment

Arduino Inline Assembly Tutorial (Examples)

As the final tutorial in this series, we present four example inline assembly functions for the arduino. Specifically, these cover the conversion of a byte to a hexadecimal string, SPI Mode 0 hardware transfer, SPI Mode 0 Bit-banging, and the … Continue reading

Posted in arduino, assembly language, avr, avr inline assenbly | Tagged , , , , , | Leave a comment

Arduino Inline Assembly Tutorial (Interrupts)

Pardon The Interruption The previous tutorial covered the basics of writing inline functions. A close relative of the function is the Interrupt Service Routine (ISR), which is the topic here. Portions of this tutorial may pertain to functions as well. … Continue reading

Posted in arduino, assembly language, avr, avr inline assenbly | Tagged , , , , , | Leave a comment

Arduino Inline Assembly Tutorial (Functions)

At first consideration, the topic of functions seems simple and trite. Just discuss how to “CALL” and “RETURN” to and from a function, right? However, there are many subtopics involved as well. For example, passing and returning parameters, prologue and … Continue reading

Posted in arduino, assembly language, avr, avr inline assenbly | Tagged , , , , , | 1 Comment