Chapter 2

GNU Assembly Syntax

Abstract

This chapter begins with a high-level description of assembly language and the assembler. It then explains the five elements of assembly language syntax, and gives some examples. It then goes in to more depth about how the assembler converts assembly language files into object files, which are then linked with other object files to create an executable file. Then it explains the most commonly used directives for the GNU assembler, and gives some examples to help relate the assembly code to equivalent C code.

Keywords

Compiler; Assembler; Linker; Labels; Comments; Directives; Instructions; Sections; Symbols

Get Modern Assembly Language Programming with the ARM Processor now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.