We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
How do I access local C variables in Keil using ARM inline Assembly?
Have you read the section on their site about this - Inline assembler support in the compiler
There is a big difference from gcc in that you put the name of the C variable into the instruction directly rather than something like %2 for the variable associated with the third output or input asm operand and the compiler will figure out what the constraints are itself.