Guide to Assembly Language Programming in Linux

The objective of this chapter is to introduce the basics of the assembly language. Assembly language statements can either instruct the processor to perform a task, or direct the assembler during the assembly process. The latter statements are called assembler directives. We start this chapter with a discussion of the format and types of assembly language statements. A third type of assembly language statements called macros is covered in the next chapter.
Assemblers provide several directives to reserve storage space for variables. These directives are discussed in detail. The instructions of the processor consist of an operation code to indicate the type of operation to be performed, and the specification of the data required (also called the addressing mode) by the operation. Here we describe a few basic addressing modes. A thorough discussion of this topic is in Chapter 13.
The IA-32 instruction set can be divided into several groups of instructions. This chapter provides an overview of some of the instructions while the next chapter gives details on some more instructions. Later chapters discuss these instructions in more detail. The chapter concludes with a summary.
Assembly language programs are created out of three different classes of statements. Statements in the first class tell the processor what to do. These statements are called executable instructions, or instructions for short. Each executable instruction consists of an operation code ( opcode for short). Executable instructions cause the assembler to generate machine language instructions. As stated in Chapter...