Skip to main content
Visitor II
July 7, 2018
Question

Can I use function arguments in stm8 SDCC inline assembler?

  • July 7, 2018
  • 1 reply
  • 661 views
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

    Visitor II
    July 16, 2018
    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