Assembly Language Statements
Assembly language programs are created out of three different classes of statements. Statements in the first class tell the CPU what to do. These instructions are called executable instructions, or instructions for short. Each executable instruction consists of an operation code (op-code for short). Executable instructions cause the assembler to generate machine language instruction. Each executable statement typically generates one machine language instruction.
The second class of statements provide information to the assembler on various aspects of the assembly process. These instructions are called assembler directives or pseudo-ops. Assembler directives are non-executable and do not generate any machine language instructions.
The last class of statements, called macros, are used as a shorthand notation for a group of statements. Macros permit the assembly language programmer to name a group of statements and refer to the group by the macro name. During the assembly process, cach macro is replaced by the group of statements that it represents and assembled in place. This process is referred to as macro expansion. We will use macros to provide the basic input and output capabilities to stand-alone assembly language programs.
Assembly language statements are entered one per line in the source file. Even though up to l128 characters can be used in a line, it is a good practice to limit a line to 80 characters so that it can be displayed on the screen. Except for a few statements, most assembly language statements require far fewer characters than 80.
All three classes of the assembly language statements use the same format:
[label] mnemonic [operands] [comment]
The fields in the square brackets are optional in some statements. As a result of this format, it is a common practice to align the fields to aid readability.