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

ASM + C

I have a problem.
My program with inline work, but when I add Printf or Scanf it do nothing. If smbd have working project with inline #pragma asm ... and Printf Help me, Please.

Parents
  • "I'd really like to get rid of inline ASM"

    So just get rid of it, then!

    You're not doing anything that can't be done in C51 - study the Manual for its specific features to handle bit-addressable registers, etc!

    As the assembler is only in the ISR anyhow, you don't even need to worry about calling it from 'C', and it's not interacting with any 'C' variables - so just take it out and put it into a separate assemblre module!

Reply
  • "I'd really like to get rid of inline ASM"

    So just get rid of it, then!

    You're not doing anything that can't be done in C51 - study the Manual for its specific features to handle bit-addressable registers, etc!

    As the assembler is only in the ISR anyhow, you don't even need to worry about calling it from 'C', and it's not interacting with any 'C' variables - so just take it out and put it into a separate assemblre module!

Children