Chapter 8. Frequently-asked Questions

Q: Are functions reentrant?
Q: Can the compiler generate an assembly source file?

Q: Are functions reentrant?

A: Functions are not reentrant. The local variables are not placed on a stack; their address is set at compile time. If a function calls itself, or a function is being executed from both the main loop and within an interrupt, the second call to the function will use the same memory. In this case local variables will become corrupted.

Q: Can the compiler generate an assembly source file?

A: No. The compiler does not generate an intermediate assembly source file. The compiler and linker have built-in macro assembly functionality, so a separate assembly source file is not necessary. The assembly found in the listing file is acually a disassembly of the generated opcodes.