![]() |
![]() |
| |||||||
Appendix BExamples of Pseudo-OperationsThis appendix shows some examples of ways to use various pseudo-ops. B.1 Example 1This example shows how to use the following pseudo-ops to specify the bindings of variables in C: common, .global, .local, .weak The following C definitions/declarations:
can be translated into the following assembly code: Example B-1
B.2 Example 2This example shows how to use the pseudo-op .ident to generate a string in the .comment section of the object file for identification purposes.
B.3 Example 3The pseudo-ops shown in this example are .align, .global, .type, and .size. The following C subroutine:
can be translated into the following assembly code:
B.4 Example 4The pseudo-ops shown in this example are .section, .ascii, and .align. The example calls the printf function to output the string "hello world".
B.5 Example 5This example shows how to use the .volatile and .nonvolatile pseudo-ops to protect a section of handwritten assembly code from peephole optimization.
| |||||||
| |||||||