what does this piece of code means in SVC handler and how are the svc number is passed from application to handler ?

SVC_Handler PROC
                       EXPORT SVC_Handler [WEAK]
                       IMPORT SVC_Handler_Main
                       TST lr, #4
                       ITE EQ
                       MRSEQ r0, MSP
                       MRSNE r0, PSP
                       B SVC_Handler_Main

/*below code is placed in main*/

void SVC_Handler_Main( unsigned int *svc_args )
unsigned int svc_number;

svc_number = ( ( char * )svc_args[ 6 ] )[ -2 ] ;
switch( svc_number )
case 0: 
case 1:
default: /* unknown SVC */

More questions in this forum
There are no posts to show. This could be because there are no posts in this forum or due to a filter.