|Ada 95 Quality and Style Guide||Chapter 7|
7.6.3 Machine Code Inserts
Avoid machine code inserts.
The Ada Reference Manual (1995, Annex C) suggests that the package that implements machine code inserts is optional. Additionally, it is not standardized so that machine code inserts are most likely not portable. In fact, it is possible that two different vendors' syntax will differ for an identical target, and differences in lower-level details, such as register conventions, will hinder portability.
If machine code inserts must be used to meet another project requirement, recognize and document the portability decreasing effects.
In the declarative region of the body of the routine where machine code inserts are being used, insert comments explaining what functions inserts provide and (especially) why the inserts are necessary. Comment the necessity of using machine code inserts by delineating what went wrong with attempts to use other higher level constructs.
|< Previous Page||Search||Contents||Index||Next Page >|