Introduction To Segmentation: The microprocessor has 20 bit address pins; these are capable of addressing 1MegaByte memory. Causes all segments to default to DWORD alignmentP enabled assembly of all instructions (see) enabled assembly of instructions . This directive tells the assembler the name of the logical segment it should use for a specified segment. For example ASSUME CS:CODE, tells.

Author: Moogur Daikinos
Country: Bosnia & Herzegovina
Language: English (Spanish)
Genre: Sex
Published (Last): 12 April 2004
Pages: 318
PDF File Size: 11.57 Mb
ePub File Size: 8.50 Mb
ISBN: 883-9-47537-546-1
Downloads: 43048
Price: Free* [*Free Regsitration Required]
Uploader: Douzragore

EQU This directive is used to give a name to some value or to a symbol.

The label directive can be used to refer to the data segment along with the data type, byte or word. Segmentation helps in the following way. This directive is used with name of the segment to indicate the end of that logic segment. They indicate how an operand or section of a program to difectives processed by the assembler.

Not available in MASM. DD — Define Doubleword.

Assembler Directives & Macros

Each module is individually assembled, tested, and debugged. ENDS This directive is used with name of the segment to indicate the end of that logic segment. If the content of the location counter is already even, then the procedure will be assigned with the same address. Same is the case with stack and extra segments also, which are only different type of data storage facilities.

You get question papers, syllabus, subject analysis, answers – all in one app. The assembler directives can be divided into two categories namely the general purpose directives and the special directives. DQ — Define Quadword This directive is used directivds define a variable of type quadword or to reserve storage location of type quadword in memory. This directive is used to define a variable of type doubleword or to reserve storage location of type doubleword in memory.


Tags Automata Languages and Computation.

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 program is stored in code segment area.

The use of this directive is just to reduce the recurrence of the numerical values or constants in the program code. To generate this 20 bit physical address from 2 sixteen bit registers, the following procedure is adopted. Loader linker further converts the object module prepared by the assembler into executable form, by linking it with other object modules and library modules. Write short notes on assembler directives.

Group the Related Segments: 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 pf memory to the loader.

They are classified into the following categories based on the function performed by them- Simplified segment directives Data allocation directives Segment directives Macros related directives Off label directives Scope directives Listing control directives Miscellaneous directives. Offset Of A Label: The assembler will ignore any statements after an END directive, so you should make sure to use only one END directive at the very end of your program module.

They generate and store information in the djrectives. It consists of the entire instruction set of Define Quad word [DQ]- This directive is used to tell the assembler to declare variable 4 words in length or to assemblr 4 words of storage in memory. This directive is used to refer to the length of a data array or a string. The ENDP directive is used to indicate the end of a procedure.


DD — Define Doubleword This directive is used to define a variable of type doubleword or to reserve storage location of type doubleword in memory. DT — Define Ten Bytes. 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. END- This is placed at the end of a source and it acts as the last statement of a program. This directive instructs the assembler to increment the location of the counter to the next even address if it is not already in the even address.

Without this WORD addition, the segment will be located on the next available paragraph byte address, which might waste as much as 15 bytes of memory.

The started segment is also assigned a name, i. These operators represent arithmetic addition and subtraction respectively. Procedure for assembling a program Assembling a program proceeds statement by statement sequentially.

Macro Assembler Directives

DB — Dirctives Byte. The assembler will then put this information in the object code file so that the linker can connect the two modules together.

Define Ten bytes [DT]- It is used to define the data items that are 10 bytes long. This is similar to multiplying four hex numbers by the base Its format is as follows: