Important Assembler Directives of the Microprocessor Data declaration directives: DB, DW, DD, DQ, DT ASSUME END directives EQU. The words defined in this section are directions to the assembler, not instructions for the Richa Upadhyay Prabhu. Microprocessors. Introduction To Segmentation: The microprocessor has 20 bit . The DW directive is used to tell the assembler to define a variable of type.
|Published (Last):||9 March 2012|
|PDF File Size:||17.73 Mb|
|ePub File Size:||17.83 Mb|
|Price:||Free* [*Free Regsitration Required]|
the use of assembler directives in microprocessor
The assembler will ignore any statements after an END directive, 88086 you should make sure micropfocessor use only one END directive at the very end of your program module. This is similar to multiplying four hex numbers by the base In many cases the program is optimized and kept unaltered for the specific application. This directive informs assembler to reserve 16 bytes micrpprocessor consecutive memory locations. A carriage return is required after the END directive. If there is only one value, 10 bytes of consecutive memory locations are reserved.
The program is stored in code segment area. Constants are identified by type: Name or labels referred to as external in one module must be declared public with the PUBLIC directive in the module in which they are defined. It stores addresses and data of the subroutines, saves the contents a specified register or memory locations after PUSH instruction, etc.
An assembler supports directives to define data, to organize segments to control procedures, to define macros etc.
Assembler Directives & Macros
The type FAR is used to call a procedure from some other program module. The names, procedures and labels declared as external in one program module must be declared public using PUBLIC directive in the program module in which they have been defined. In Intel microprocessor, string instructions may use DI register to point the destination memory address for the data. They generate and store information in the memory. The defined variable may have one or microprocessir initial 80886 in the directive statement.
The general format is: A carriage return is used after the END directive. In an assembly language program labels are used to give names to memory addresses. The directive END informs assembler the end of a program module. The stack segment register Durectives holds the starting address of the stack segment allotted by the operating system.
It is the task of the assembler designer to select the suitable strings for using them as directives,pseudo operands or reserved words and decides syntax. The ENDS directive informs assembler that this is the end of the segment.
Segmentation helps in the following way. The above directive informs assembler to reserve 10 bytes of consecutive memory locations for the variable named NUMBER and initialize with the above specified values.
In the directive statement there may be one or more values. It awsembler necessary to do this in any instruction where the type of the operand is not clear. The above directive tells the assembler that the name of the code segment is CODE.
the use of assembler directives in microprocessor | CustomWritings
The general formula is:. The type FAR indicates that the procedure to be called is in some other segment of memory. The directive DB a byte type variable. There are some instructions in the assembly language program which are not a part of processor instruction set. Directives Also called as pseudo operations that control the assembly process. The instructions are translated to machine codes by the assembler whereas the directives are not translated to machine codes. Based on this information and the information generated by the assembler, the loader generates an executable map of the program and further physically loads it into the memory and transfers control to for execution.
The general format for the EQU directive is: Thus the basic task of an microprlcessor is to generate the object module and prepare the loading and linking information. This directive informs the microprocesssor that the names, procedures and labels following this directive have already been defined in some micfoprocessor program modules. If there are multiple values, 8 bytes of memory space are reserved for each value.
Midroprocessor assembler prepares the relocation and linkages information subroutine, ISR for loader. Hence, the two bytes of memory space contain H.
The directive DT defines a variable of ten bytes. The above directive tells the assembler that the name of the stack segment micropeocessor by the programmer is STACK. The assembler directives control organization of the program and provide necessary information to the assembler to understand assembly language programs to generate machine codes. The general format for ENDP directive is: The ,icroprocessor ENDP informs assembler the end of a procedure.
I Definition An assembler directive is a message to the assembler that tells the assembler something it needs to know in order to carry out the assembly process; for example, an assemble directive tell the assembler where a program is to be located in memory. Each time the assembler finds the given name in the program, it replaces the name with the value or symbol which has already microprrocessor equated with that name.
The contents of the segment registers are shifted left four times with zeroes 0?
If there are multiple values, four bytes of memory locations are reserved for each value. But leave the bytes un-initialized.