Thursday, 11 June 2020

ASSEMBLER DIRECTIVES

✏️ASSEMBLER DIRECTIVES

Assembler directives are instructions that direct the assembler to do something. This is used to set the program or register address during assembly.

✏️Types of assembler directives are:

πŸ“ŒORG (origin):-
 The origin (ORG) directive is used to indicate the beginning of the addresses the number that comes after ORG can be either in hex or in decimal if the number is not followed by H it is decimal and the assembler will convert it to hex.
         Ex:- ORG 0000H


πŸ“ŒEQU (equate):-
    This is used to define a constant without occupying a memory location. The EQU directive does not set aside storage for a data item but associates a constant value with a data label so that when the label appears in the program its constant value will be substituted for the label to use EQU for the counter constant and then the constant is used to load the register.
   Ex:-
       COUNT EQU 25
       MOV R3, # COUNT


πŸ“ŒEND:-
The END directive indicates to the assembler at the end of the source (asm) file.The END directive is the last line of an 8051 program meaning that in the source code anything after the END directive is ignored by the assembler.

πŸ“ŒDB (define byte) :-
The define assembler directive is used for allocation of storage space. It can be used to reserve as well as initialize one or more bytes.


πŸ“ŒDW (define word) :-

Define Word [DW]- The DW directive defines items that are one word (two bytes) in length.

Define Double word [DD]- It defines the data items that are a double word (four bytes) in length.

Define Quad word [DQ]- This directive is used to tell the assembler to declare variable 4 words in length or to reserve 4 words of storage in memory.


No comments:

Post a Comment

If you have any doubts or clarification you need in my blog topics, I would πŸ’― try to clear it in an efficient manner as possible. I will also accept your suggestions.

πŸ’‍♂️ARTIFICIAL SUN CREATED BY CHINA πŸ‘ˆ

🌞 ARTIFICIAL SUN MADE BY CHINA 🌞 ☀️China successfully powered up its “artificial sun” nuclear fusion reactor for the first ti...