Assembler directives : These are the statements that direct the assembler to do something. As the name suggest, it direct the assembler to do a task.
- The specialty of these statements is that they are effective only during the assembly of a program but they do not generate any code that is machine executable.
- We can divide the assembler directives into two categories namely the general purpose directives and the special directives.
They are classified into the following categories namely the general purpose directives and the special directives.
- Simplified segment directives
- Macros related directives.
- Segment directives.
- Data allocation directives.
- Code label directives.
- Scope directives.
- Listing control directives.
- Miscellaneous directives.
Operators : Various operators are as follows :
- Length : It is operator which tells the assembler to determine the number of elements in some named data item such as a string or array. Example, MOV BX, LENGTH STRING 1; Loads the length string in BX.
- OFFSET : It is an operator which tells the assembler to determine the off set or displacement of a named data item (variable) from the start of the segment which contais. Example, MOV AX, OFFSET MESI, : Loads the offset of variable, MESI in AX register.
- Short : A short is an operator. It tells the assembler that only 1 byte displacement is needed to code a jump instruction. If the jump destination is after the jump instruction in the program, the assembler will automatically reserve 2 byte for the displacement. Using the short operator saves 1 byte of memory by telling the assembler that it only needs to reserve 1 byte for this particular jump. The short operator should be used only when the destination is fit the range of 128 bytes of +127 bytes from the address of the instructions after the jump. Example, IMP SHORT NEAR-LABEL
- Type : It is an operator which tells assembler to determine the type of specified variable. Assembler determines the type of specified variable in number of bytes. For byte types variable the assembler gives a value of 1. For word type variable the assembler gives a value 2 and for doubles word type variable the assembler gives a value of 4.
Post a Comment