Friday, September 16, 2016

Directives of 8086 microprocessor

Directives are used to control how an assembler assembles the source program. The directives of microprocessor are:

PAGE:
           PAGE is used for the list formatting of the pages.
     Syntax:
          PAGE[length][width]
                          here, length = number of lines per page and
                                   width = number of characters per line
           i.e. it specifies the dimension of the page in terms of number of characters.

TITLE:
          It specfies the title of the page, any text written after TITLE will be displayed at the top of the page.

.DOSSEG:
        It is used to standardize the memory occupied by each segment.

.model:
          It is used to standardize the memory occupied by the entire program.
 types of model:
          .tiny - Both code and data must be less than 64 KB.
          .small (default) - code and data can be equal to 64 KB.
          .medium -  Only code can be greater than 64 KB.
          .compact -  Only data can be greater than 64 KB.
          .large - Both data and code can be greater than 64 KB.
          .huge - All available memory in the system can be used.

.stack:
         It specifies the size of the program stack

.code:
        It carries the actual instructions of the program.

.PROC:
        Contains the starting address and name of the procedure.

.END :
       specifies the end of the entire program.

.ENDP:
       specifies the end of the procedure.

.ENDS:
       specifies the end of the segment.

Data Directive:
          All the variables used in the program is defined in this directive.

Data defination directive:
           It is used to specify the size of each variable.

                DB - data byte (1B)
                DW - data word (2B)
                DD - double word (4B)
                DQ- quad word (8B)
                DT - ten byte (10B)

EQU directive:
               It is used to give a name to an constant value
        eg:
               FACTOR EQU 12

No comments:

Post a Comment