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):||1 January 2010|
|PDF File Size:||11.85 Mb|
|ePub File Size:||6.98 Mb|
|Price:||Free* [*Free Regsitration Required]|
An assembler directive is a message to the assembler that tells assmbler 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.
The type of label is to be specified. The assembler will then put this information in the object code file so that the linker can connect the two modules together.
These instructions are instructions to the assembler, linker and loader. A carriage return is required after the END directive. This directive informs assembler to assemblwr five bytes of consecutive memory space for the variable named ARRAY. 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.
Segmentation helps in the micgoprocessor way. Thus the basic task of an assembler is to generate the object module and prepare the loading and linking information. 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.
the use of assembler directives in microprocessor | CustomWritings
It contains data of the program which is being executed. This directive informs assembler to reserve one byte of memory space for the variable named WEIGHT and initialize with value Type NEAR indicates that the procedure is in the same segment of memory.
The general format for ENDP directive is:. The assembler will ignore any statements after an END directive, so you should microlrocessor sure to use only one END directive at the very end of your program module. The above directive informs the assembler that the name of the data segment is DATA.
The microprocessor has 20 bit address pins; these are capable of addressing 1MegaByte memory. The above directive tells the assembler that the name of the extra segment is EXTRA which is a user defined segment name.
Procedure for assembling a program Assembling a program proceeds statement by statement sequentially. In a given directive statement, there may be single initial value or multiple initial values of the defined variable.
Therefore, the asembler should use END directive at the very end of his program module. If there are multiple values, ten consecutive memory locations are reserved for each value. The content of the location counter holds the address of the memory location assigned to an instruction during assembly process.
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. Memory locations are initialized with ,, , and This is called the base address. The ENDS directive informs assembler that this is the end of the segment. In an assembly language program, each segment is given a name by the programmer.
The low word, H, will be put in memory at a lower address than the high word. The PUBLIC directive is used to ddirectives the assembler that a specified name or label will be accessed from other modules. The final executable map of the assembly language program is prepared by the loader at the time of loading into the primary memory for actual execution. It will initialize the 10 bytes with the values 11, 22, 33, 44, 55, 66, 77, 88, 99, and 00 when the program is loaded into memory to be run.
the use of assembler directives in microprocessor
The data is stored in data segment area. 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. There are ditectives instructions in the assembly language program which are not a part of processor instruction set.
The code segment directive CS register is to be loaded with the starting address of the code segment, given by the operating system for the label CODE in the assembly language program.
An assembler supports directives to define data, to organize segments to control procedures, to define macros etc.