End-endp-assemblers directive-microprocessor, Assembly Language

END : END of Program:-

The END directive marks the ending of the assembly language program. When the assembler comes across this END directive, it avoided the source lines available later on. Hence, it should be confirm that the END statement should be the final statement in the file and should not seem in between. Also, after the END statement no useful program statement should lie in the file,.

ENDP : END of Procedure:-

In the assembly language programming, the subroutines are called by the name procedures. Thus, procedures may be independent program modules which return specific results or values to the calling programs. The ENDP directive, which is used for denote the end of a procedure. A procedure is generally assigned a name, for instance Label. To mark the end of a program code. The recurring value is assigned having a label, and that label which is used in place of that numerical value, all through the program. at the same time as assembling, whenever the assembler  comes  across  the  label, it substitutes the numerical value for that label and  finds  out  the equivalent code. By Using the EQU directive, even an instruction mnemonic may be assigned with a label, and the label may then be used in the program in place of that mnemonic. Assume, a numerical constant appears in a program ten times. If that constant is to be changed in later time, one will have to make all these 10 corrections. This can lead to human errors, because it is a chance that a human programmer can miss one of those corrections. This will result in the generation of wrong codes. If the EQU directive is used to assign the value with a label that may be used in place of each recurrence of that constant, just 1 change in the EQU statement will give the proper and modified code. The examples which are given below show the syntax.

Example :        

LABEL        EQU   050   0H


The first statement assigns the constant 500H having the label LABEL, whereas the second statement assigns another labelADDITION having mnemonic ADD.  EXTRN:  External  and PUBLIC: Public The directive EXTRN informs the assembler that the names,labels andprocedures  declared after this directive already have been defined in some other assembly language modules.  In the other module where the names labels and procedures really appear, they ought to be declared public, by using the PUBLIC directive. If anyone wants to call a procedure FACTORIAL that appearing in MODULEI from MODULE 2; in MODULE 1, it ought to be declared PUBLIC by using the statement PUBLIC FACTORIAL and in module 2, it ought to be declared external by using the declaration EXTRN FACTORIAL.The statement ofdeclaration EXTRN oughtto be accompanied by the SEGMENT and ENDS directives of the MODULE 1, before it is called in the MODULE 2. Thus the MODULEI and MODULE 2 must have the following declarations.


Posted Date: 10/12/2012 5:43:36 AM | Location : United States

Related Discussions:- End-endp-assemblers directive-microprocessor, Assignment Help, Ask Question on End-endp-assemblers directive-microprocessor, Get Answer, Expert's Help, End-endp-assemblers directive-microprocessor Discussions

Write discussion on End-endp-assemblers directive-microprocessor
Your posts are moderated
Related Questions
MyLocation SDWORD 14 TheTest        SDWORD 8     mov    eax,MyLocation     mov    ebx,TheTest     neg     eax,ebx     sub     eax,ebx Show exactly what lives in eax after executi

Can any one assist me with this program. I am not efficient with assembly language and I need assistance badly. I am not asking anyone to do my work I just need help step by step

Write an assembly language program to find the maximum of: y = x 6 - 14x 2 + 56x for the range -2 ≤ x ≤ 4, by stepping one by one through the range. The program should in

Overview of Intel Pro-Pentium : The 2 chief players in the PC CPU market are Motorola and Intel.  Intel has enjoyed incredible success with its processors since the early 1980

NAME : Logical Name of a Module: The NAME directive which is used to assign a name to an assembly language program module. The modulecan now be mention to by its declared name.

Write a program on the assembly language to do the following: 1- Allocate array with 32bit 100 element 2- Prompt the user to enter the maximum or the upper bound of the rando

PTR : Pointer:- The pointer operator which is used to declare the type of a variable, label or memory operand. The operator PTR is prefixed by either WORD or BYTE. If the prefi

Interrupt Priority Management The interrupt priority management logic indicated in given figure can be implemented in several ways. It does not required to be present in system

Write Policy A write policy determines how the cache deals with a write cycle. The 2 common write policies areWrite-Throughand Write-Back. In Write-Back policy, the cache behav

IMUL: Signed Multiplication: This instruction multiplies a signed byte by a signed bit in source operand e in the register AL or signed word in source operand by signed word in th