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*

9
  • A common way to gain more insight in these sort of cases is to: * compile with optimizations turned off: -O0 * tell gcc to preserve intermediate artifacts (the assembly file generated: -S or --save-temps) Commented Sep 6, 2016 at 20:52
  • I don't use gcc. I use avra Commented Sep 6, 2016 at 21:04
  • You said that the buzzer works with a C sketch. How did you compile it? Commented Sep 6, 2016 at 21:10
  • For compiling C sketches i use Arduino IDE, that uses gcc i think, but for asm compiling i use avra, the AVRStudio assembler Commented Sep 6, 2016 at 21:12
  • 1
    Right. My advice was to observe the intermediate file produced by gcc (you can tell it to preserve the assembly sources) and use them as reference for debugging your own asm program. Commented Sep 6, 2016 at 21:15