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: Zulkizil Tygojind
Country: Bangladesh
Language: English (Spanish)
Genre: Health and Food
Published (Last): 7 February 2010
Pages: 284
PDF File Size: 3.21 Mb
ePub File Size: 17.54 Mb
ISBN: 617-5-23230-686-7
Downloads: 40589
Price: Free* [*Free Regsitration Required]
Uploader: Nezuru

It is necessary to do this in any instruction where the type of the operand is not clear. Loader linker further converts the object module prepared by the assembler into executable form, by linking it with other object modules and library modules. 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 assembler directives can be divided into two categories namely the general purpose directives and the special directives. The first phase of assembling is to analyze the program to be converted. The PUBLIC directive is used to tell the assembler that a specified name or label will be accessed from other modules.

Macro Assembler Directives

The directive EQU is used to assign a label with a value or symbol. IR0 has the highest priority and IR7 has the lowest one. The assembler prepares the relocation and linkages information subroutine, ISR for loader.

DQ — Define Quadword. ENDS This directive is used with name of the segment to indicate the end of that logic segment. 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.


Categories Automata Languages and Computation.

Define Double word [DD]- It defines the data items that are a double word four bytes in length. EVEN 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. The use of this directive is just to reduce the recurrence of the numerical values or constants in the program direvtives.

This directive is used assdmbler insert a block of source code from the named file into the current source module. Download our mobile app and study on-the-go.

Write short notes on assembler directives

CODE [name] The name in this format is optional. The code segment registers are used to hold programs,data segment register to keep data, stack segment register for stack operations and extra segment register to keep strings of data. EQU This directive is used to give a name to some value or to a symbol. The ASSUME directive is used to inform the assembler, the names assemler the logical segments to be assumed for different segments used in the program.

Another type of hint which directuves the assembler to assign a particular constant with a label or initialize particular memory durectives or labels with constants is an operator. These types of hints are given to the assembler using some predefined alphabetical strings called assembler directives, which helps the assembler to correctly understand the assembly language program to prepare the codes.

Segmentation helps in the following way. This multiplication process takes place in the adder and thus a 20 bit number is generated. The started segment is also assigned a name, i. Link list 4 Automata Languages and Computation. Assembly language consists of two types of statements viz. You get question papers, syllabus, subject 800386, answers – all in one app. The program is stored in code segment area.


DD — Define Doubleword This directive is used to define a variable of type doubleword or to reserve storage location of type doubleword in memory.

Executable statements- These are the statements to be executed by or processor. 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. The DW directive serves the same purposes as the DB directive, but it makes the assembler reserves the number of memory words 16bit instead of assembller.

INCLUDE- This directive is used to tell the assembler to insert a block of source code from the named file into the current source module.

The logical errors or other programming errors are not found by the assembler. The DT directive directs the assembler to define the specified variable requiring bytes for its storage and initialize the bytes with the specified values. ALIGN- This directive will tell the assembler to align the next instruction on an address which corresponds to the given value.

To generate this 20 bit physical address from 2 sixteen bit registers, the following procedure is adopted. Additional terms are often added to a SEGMENT directive assemboer to indicate some special way in which we want the assembler to treat the segment. This directive is used to refer to the length of a data array or a string.