how can I return a value within embedded assembler?

Note: This was originally posted on 8th May 2009 at http://forums.arm.com

Hi,

does anybody know how I can write an embedded ASM function that returns the actual PSR value? I prefered to go on like this:

int getCpsr( void )
{
  int currentCPSR;
  MRS currentCPSR, CPSR
  return currentCPSR;
}

how can I return a value within embedded assembler?
Parents Reply Children
No data
More questions in this forum