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):||4 October 2004|
|PDF File Size:||13.22 Mb|
|ePub File Size:||10.98 Mb|
|Price:||Free* [*Free Regsitration Required]|
Its general format is:. The contents of the segment registers are shifted left four directivex with zeroes 0? They indicate how an operand or section of a program to be processed by the assembler.
Normally the data is variable. Segmentation helps in the following way. If any value or symbol is used many times in an assembly language program, a name is given to the value or symbol to make programming easier and simpler.
This is a user defined segment name. In a microproccessor directive statement, there may be single initial value or multiple initial values of the defined variable.
II Use Of Assembler Directives The assembler directives control organization of the program and provide necessary information to the assembler to understand assembly language programs to generate machine codes. So in order to test the program with a different set of data, one need not change the program but only have to alter the data.
The general format for the EQU directive is: If there are multiple values, 8 bytes of memory space are reserved for each value. The microprocesso DB a byte type variable. It also finds out codes of the instructions from the instruction machine, code database and the program data. The directive ENDP informs assembler the end of a procedure.
The above directive informs assembler to reserve 8 bytes of consecutive memory locations for the variable idrectives NUMBER and initialize with the above mentioned number. Type NEAR indicates that the procedure is in the same segment of memory. 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. But leave the bytes un-initialized.
the use of assembler directives in microprocessor | CustomWritings
It has been defined with EQU directive in another program module. The program is stored in code segment area.
The ENDS directive informs assembler that this is the end of the segment. When the programmer informs assembler that the declared item is an external one, the assembler puts this information in the object code file so that the linker can connect the concerned two program modules together.
The low word, Assemmbler, will be put in memory at a lower address than the high word. This multiplication process takes place in the adder and thus a 20 bit number is generated. In the directive statement there may be one or microproocessor values.
Assembler Directives & Macros
To generate this 20 bit physical address from 2 sixteen bit registers, the following procedure is adopted. 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.
These are referred to as pseudo-operations or as assembler directives. The assembler directives control organization of the program and provide necessary information to the assembler to understand assembly language programs to generate machine codes.
There are several other models too. The above directive informs assembler to reserve four bytes of memory locations for the variable named NUMBER and initialize with the number For example, if you want to call a procedure, which in a program module assembled at a different time from that which contains the CALL instruction, you must tell the assembler that the procedure is external.
the use of assembler directives in microprocessor
In order for the modules to link together correctly, dieectives variable name or label referred to in other modules must be declared PUBLIC in the module in which it is defined. If there is only one value, four bytes of consecutive memory locations are reserved.
The ASSUME directives is used to inform the assembler the names of the logical segments, which are to be assigned to the different segments used in an assembly language program. The code segment registers are used to hold programs,data segment register to keep data, stack segment register for stack operations and assembleer segment register to keep strings of data.
The stack segment register SS holds the starting address of the stack segment allotted by the operating system. These instructions are instructions to the assembler, linker and loader.
The memory locations are to be initialized with the values 32, 42, 59, 67 and The operating system that actually has the control of the memory, which is to be allotted to the program for execution, passes the memory address at which the program is to be loaded for execution and the map of the available memory to the loader.
The microprocessr variable may have one or more initial values in the directive statement. Dirextives is used after the last statement of the program module.
It contains data of the program which is being executed. Directives Also called as pseudo operations that control the assembly process.