Showing results for 
Search instead for 
Did you mean: 

Can I use function arguments in stm8 SDCC inline assembler?

Vyacheslav Azarov
Associate III
Posted on July 07, 2018 at 17:37

Hello everyone,

Is it possible to get the values of the offset of variables in a frame, for use it in inline assembler? Or does is exist any other way to function arguments passing? As is possible in GNU GCC or COSMIC and other compilers.

Thanks in advance.

#sdcc #syntax #inline #stm8-toolchain
Philipp Krause
Senior II
Posted on July 16, 2018 at 09:47

SDCC currently passes all function arguments on the stack. If the function does not otherwise use stack space, the offset from the stack pointer only depends on which function argument you want to access..