Assembler Directives
Definition: Assembler directives are the instructions used by the assembler at
the time of assembling a source program. More specifically, we can say,
assembler directives are the commands or instructions that control the operation
of the assembler.
Assembler directives are the instructions provided to the assembler, not the
processor as the processor has nothing to do with these instructions. These
instructions are also known as pseudo-instructions or pseudo-opcode.
Functions of Assembler Directives :-
Show the beginning and end of a program provided to the assembler,
Used to provide storage locations to data,
Used to give values to variables,
Define the start and end of different segments, procedures or macros etc. of a
program.
Assembler Directives of 8085
The assembler directives given below are used by 8085 assemblers:
1. DB: Define Byte
This directive is used for the purpose of allocating and initializing single or
multiple data bytes.
Memory name AREA has three consecutive locations where 30H, 52H and 35H
are to be stored.
2. DW: Define Word
It is used for initialising single or multiple data words (16-bit).These two 16-bit
data 1020H and 4216H are stored at 4 consecutive locations in the memory
MARK.
3. END: End of program
This directive is used at the time of program termination.
4. EQU: Equate
It is used to assign any numerical value or constant to the variable.
Variable name ‘DONE’ has value 10H
5. MACRO: Represents beginning
Shows the beginning of macro along with defining name and parameters.
6. ENDM: End of macro
ENDM indicates the termination of macro.
where macroname (STEP) is specified by the user.
7. ORG: Origin
This directive is used at the time of assigning starting address for a module or
segment.
By this instruction, the assembler gets to know that the statements following this
instruction, must be stored in the memory location beginning with address
1050H.