5.3.7.5 When Should I Combine Assembly and C Code?
This is a very application-dependent question. There are some device-specific operations that cannot be done in normal C code. Typically, the language tool will provide a built-in function to provide this feature.
If you decide to combine assembly and C code, ensure that the code complies with the run-time model, i.e., that arguments are transmitted in the correct registers; and that registers are properly used and not overwritten.