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
  • Surely, the last thing you want is user code doing PUSH and POP inside a 'C' function?!

    actually there are cases

    push IE
    clear EA
    ....
    ....
    pop IE

    instead of
    U8 IEsave;
    ...
    IEsave = IE;
    EA = 0;
    ....
    ....
    IE = IEsave;

    and specifically for the SILabs chips

    push SFRPAGE
    SFRPAGE = ..;
    ....
    ....
    pop SFRPAGE

    Erik

Reply
  • Surely, the last thing you want is user code doing PUSH and POP inside a 'C' function?!

    actually there are cases

    push IE
    clear EA
    ....
    ....
    pop IE

    instead of
    U8 IEsave;
    ...
    IEsave = IE;
    EA = 0;
    ....
    ....
    IE = IEsave;

    and specifically for the SILabs chips

    push SFRPAGE
    SFRPAGE = ..;
    ....
    ....
    pop SFRPAGE

    Erik

Children