Question: Write an assembly language program for ARM Cortex M 3 / 4 to handle Supervisor Call ( SVC ) exception. The program should meet the
Write an assembly language program for ARM Cortex M to handle Supervisor Call SVC exception. The program should meet the following requirements:
The SVC should be called from an application task running at Thread unprivileged mode. SVC number is
Two parameters should be passed to the SVC handler.
The SVC number should be determined dynamically by examining the actual SVC instruction in memory.
The SVC exception handler should set up a stack pointer in SVC mode before handling the exception.
If the SVC number matches the handler should perform addition of the two passed parameters.
If the SVC number does not match the handler should perform subtraction of the two passed parameters. Ensure that the program properly handles stack usage and resumes the application task after performing the required operation.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
