Search: in
GNU Assembler
GNU Assembler Encyclopedia
  Tutorials     Encyclopedia     Dictionary     Directory  
GNU_Assembler Email this to a friend      GNU_Assembler

GNU Assembler

The GNU Assembler, commonly known as Gas, is the assembler used by the GNU Project. It is the default back-end of gcc, and is used to compile the GNU operating system and Linux, amongst others. It is a part of the GNU Binutils package.

Gas's executable is named after as, an Unix assembler. Gas is cross-platform, and both runs on and assembles for a number of different computer architectures. Released under the GNU General Public License, Gas is free software.

Contents


General Syntax

The GNU Assembler has a general syntax that works for all of the supported architectures. The general syntax includes assembler directives and a method for commenting.

Assembler Directives

The GNU Assembler uses assembler directives (also known as pseudo ops), which are keywords beginning with a period that behave similarly to preprocesser directives in the C programming language. Most of the available assembler directives are valid regardless of the target architecture, however some directives are machine dependent.[1]

Comments

Similar to the C programming language is Gas's implementation of multiline comments which uses /* to begin a comment and */ to end a comment.[2]

For example:

    movl %eax,%edx /* this is a comment,
                      it is made of description
                      and linebreak */

Gas uses the # symbol for a single-line comment.

For example:

    pop  %edx # this is a comment
# as well as this
    movl %edx,%eax

Criticisms

One source of criticism is the fact that on the x86 and x86-64 architecture it uses the AT&T assembler syntax, rather than the Intel syntax used in many other assemblers; however, since version 2.10[3], support for the Intel syntax via the .intel_syntax directive has been added.[4][5]

See also

References

External links

cs:GNU Assembler es:GNU Assembler fr:GNU Assembler ja:GNU????? tr:GNU Assembler





Source: Wikipedia | The above article is available under the GNU FDL. | Edit this article



Related Links in GNU Assembler

Search for GNU Assembler in Tutorials
Search for GNU Assembler in Encyclopedia
Search for GNU Assembler in Dictionary
Search for GNU Assembler in Open Directory
Search for GNU Assembler in Store
Search for GNU Assembler in PriceGig



Help build the largest human-edited directory on the web.
Submit a Site - Open Directory Project - Become an Editor

Advertisement

Advertisement



GNU Assembler
GNU_Assembler top GNU_Assembler

Home - Add TutorGig to Your Site - Disclaimer

©2008-2009 TutorGig.com. All Rights Reserved. Privacy Statement