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

Does it possible to use local C-vars in "#pragma asm" block?

Hi all.

Does it possible to use local C-vars in "#pragma asm" block? I mean something like this:

void Foo(void)
{ BYTE t;
#pragma asm mov r0, t; // error A45: UNDEFINED SYMBOL
...

Parents
  • "sometimes external assembler subroutine is too expensive (parameters, call/ret)"

    In that case, particularly given all the other issues already noted with C51 inline assembler, expand the assembler part to a suitable extent where the overhead is no longer significant!

    "I use inline asm for more effective bit operations"

    In what way do you find the C51 implementation of bit operations ineffective?

    "Additional benefit is "all code in full view" (no additional files)."

    That's not exactly true: there is an additional file - it's the .SRC file. And this is the one you have to use for debug

Reply
  • "sometimes external assembler subroutine is too expensive (parameters, call/ret)"

    In that case, particularly given all the other issues already noted with C51 inline assembler, expand the assembler part to a suitable extent where the overhead is no longer significant!

    "I use inline asm for more effective bit operations"

    In what way do you find the C51 implementation of bit operations ineffective?

    "Additional benefit is "all code in full view" (no additional files)."

    That's not exactly true: there is an additional file - it's the .SRC file. And this is the one you have to use for debug

Children