Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

4
  • 1
    Dang... And thanks :). This "i" type was not listed in the online manuals I found. For completeness, could you add a link to an up to date documentation? Btw. I wonder why an example of such an obvious use of the inline assembler is so hard to come by. Commented Aug 8, 2017 at 22:05
  • @kuroineko: The "i" constraint is indeed missing from the avr-libc's Inline Assembler Cookbook. I added a link to the gcc documentation that lists it. Commented Aug 9, 2017 at 6:48
  • Thanks a lot. That sort of cooking is pretty confidential I guess :). Commented Aug 9, 2017 at 9:52
  • The "i" constraint does not mean "integer". "i" specifies an immediate operand, which is the union of "n" (integral operand known at compile-time) and "s" symbolic operand known at link time. For example, addresses of variables in static storage are known at link time, thus "i" will work for them. Commented Nov 7, 2022 at 13:16