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

Read and set assembler registers c

Hello there,am using keil
I need to be able to access assembly registers from my C code.

Is there a easy way to set the value of a register to the value of a variable and get the value of a register as a variable?? Hope this makes sense..

Parents
  • "I need to be able to access assembly registers from my C code."

    That's not really the way to go about the problem.

    You don't write why you _need_ to be able to access the registers, making it impossible for anyone to suggest alternative solutions.

    A c compiler is normally used when you do _not_ need to access registers - while assembler is used when do you need it. So are you sure your assumptions are correct? Or your choice of tools?

Reply
  • "I need to be able to access assembly registers from my C code."

    That's not really the way to go about the problem.

    You don't write why you _need_ to be able to access the registers, making it impossible for anyone to suggest alternative solutions.

    A c compiler is normally used when you do _not_ need to access registers - while assembler is used when do you need it. So are you sure your assumptions are correct? Or your choice of tools?

Children
No data