Skip to main content
Associate III
Jul 7, 2018 3:37 PM UTC
Question

Can I use function arguments in stm8 SDCC inline assembler?

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
    This topic has been closed for replies.

    1 reply

    Philipp Krause
    Senior II
    Jul 16, 2018 7:47 AM UTC
    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..

    Philipp