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.
Hi Experts,
The RTX code contains SVC handlers named with different names. How this can be best made use of ?
Why the option to select numbering of different svc handlers like _svc(0) .... __svc(n) ?
Regards,
Techguyz
The number is just a parameter that the handler can investigate.
Normally, the parameter is used for identifying which function you want to use.
-But the parameter can be anything the designer of the handler wants.
When the SVC instruction is executed, it triggers an interrupt (software interrupt), thus a handler is needed.
The handler is executed in supervisor mode, but as soon as the handler returns, your code continues in user mode.
Some operating systems would use the SVC handler as the interface to system functions.
Other operating systems would load linkable files and use the resolved symbols to call functions; such functions could make use of the SVC instruction to execute code in privileged mode.