Monthly Archives: March 2016

Towards a More General digitalRead

The arduino digitalRead function is a nice bit of code. However, it takes more than a cursory glance to determine exactly how it performs (see Yak Shaving). It also compiles into approximately 222 bytes of code, and its slow in … Continue reading

Posted in Uncategorized | Tagged , , , , , , | Leave a comment

Arduino Inline Assembly Tutorial #4 (Constraints)

Introduction I have a confession to make. My previous examples were not very efficient assembly code. That might seem like an odd comment, especially since my typical example used just 2-4 lines of code. But, these examples were coded as … Continue reading

Posted in Uncategorized | Tagged , , , , , | 5 Comments

Arduino Inline Assembly Tutorial #3 (Clobbers)

Clobbered Guess what? Our previous tutorial example (Tutorial #2) has a problem. Here is the inline portion of that code: Notice in our example, we use register #26, or r26. Even though we only used this register temporarily, we have … Continue reading

Posted in Uncategorized | Tagged , , , , , , | Leave a comment

Arduino Inline Assembly Tutorial #2 (Extending asm)

The Extended asm Statement The first tutorial in this series can be found here and covers a great amount of necessary background material. The general form of an extended inline assembler statement is: asm(“code” : output operand list : input … Continue reading

Posted in Uncategorized | Tagged , , , , , | 2 Comments

Arduino Inline Assembly Tutorial #1 (Basic asm)

Motivation Learning inline assembly language on the Arduino AVR 8-bit platform is a daunting task for many (at least it was for me). Besides the cryptic syntax and the high level of understanding the semi-official documentation assumes, there exists very … Continue reading

Posted in Uncategorized | Tagged , , , , , | 3 Comments