What parts of a program in an embedded system need inline as
What parts of a program in an embedded system need in-line assembly code?
Why do you think this is so?
Solution
In line assembly code are usually used for these purposes.
(1) The part of code which effects the optimizations like run time, memory used. Since these are the important characteristics of a effective code. So, if they can be increased by using assembly code, then it is preferred.
Assembly code avoids the need of compiling stage speeding up the things.
(2) Parts where user permission is not enough to access data - SYSTEM CALLS
Ususally OS (operating system) is at a more previliged level than user. So sometimes to access data or command the OS directly we need to use assembly code, may be through some wrapper functions.
(3) Some processor specific instructions
There\'ll be some instructions which wont be in general C syntax, but can be used only for that specific processor. In those, those instructions are given as inline assembly code
