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
  • Well, I always says that it's best to keep your assembler in assembler modules, and call them from 'C'.

    the issue is "do you want to fight your way through or just do it"..The real *** with #pargma asm is that the entire module must be debugged in assembler. OK, do it and then - have fun

    Erik

Reply
  • Well, I always says that it's best to keep your assembler in assembler modules, and call them from 'C'.

    the issue is "do you want to fight your way through or just do it"..The real *** with #pargma asm is that the entire module must be debugged in assembler. OK, do it and then - have fun

    Erik

Children
  • "The real *** with #pargma asm is that the entire module must be debugged in assembler"

    Yes, that's true.

    So, given that you have to study the assembler in the .SRC file, and you have to debug it in assembler, where is the advantage in having it inline in a 'C' file?!

    That's the other reason not to do inline assembler - specifically in C51