This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

I looked, is there a _push_(U8 var)

I looked, is there a _push_(U8 var) to use in C without reverting to inline asm, there is the _nop_() in intrins.h there should be a _push_() and _pop_() as well.

I have ZERO interest in using inlime assembler which I know would solve this. I want to see the C source in the emulator.

Erik

Parents Reply Children
  • good point - especially re portability. The one Keil 'trap' I can see is if you are one of those that pass umpteen parametres to a function.

    Oh, well, nice thought - bubble burested

    Erik

  • Another interesting thing with push/pop in C/C++ code (where the caller is responsible for popping any parameters after a call) is that a compiler can make many function calls before finally shrinking the stack. Such code would not like an intrinsic push/pop directly used by the user code.

    This isn't of course not too common in the embedded world, because a lot of hw doesn't the required stack space.