Appendix E. Conditional Assembly and Macros (GCC Assembler)

The paramount task of any assembler is converting mnemonic instructions and symbolic expressions into valid instructions with internally consistent addresses for all references to data, as we discussed in Chapter 3 and elsewhere. In addition, some assemblers provide numerous features intended to lessen the tedium of producing repetitious patterns of data definitions or instructions, as well as to reduce the likelihood of erroneous programming. In this appendix, we take up the topics of repeat blocks, conditional assembly, macros, and the related specific assembler directives for the GCC assembler that provide the programmer with some convenient extensions of the minimal assembly language for the Linux programming environment.

By contrast, neither the Intel nor the Hewlett-Packard assemblers contain capabilities analogous to the material presented in this appendix. If you are using those assemblers, consider instead the capabilities of the C preprocessor (referred to as cpp), which we do not discuss in this book.

Those of our readers who are primarily interested in the machine design aspects of computer architecture may wish to skim this appendix. Those of our readers who are more interested in learning how system software is developed, or in gaining a more comprehensive understanding of programming environments accessible to system developers and compiler writers, may wish to devote closer attention to this appendix, which rounds out the description of assembly language in traditional terms.

Readers who already know GCC software should appreciate that each port of GCC to a new environment can introduce new features or omit certain features.



ItaniumR Architecture for Programmers. Understanding 64-Bit Processors and EPIC Principles
ItaniumR Architecture for Programmers. Understanding 64-Bit Processors and EPIC Principles
ISBN: N/A
EAN: N/A
Year: 2003
Pages: 223

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net