Constant Declaration 

Constants:

In an assembly language program, constants are defined through the use of the EQU directive.

These are the main points in using constant definitions:

The EQU directive is used to assign a name to a constant.
Use of constant names makes an assembly language easier to understand.
No memory is allocated for a constant.
Reference is made to a constant through immediate addressing mode.

Example:

The following shows examples on the declaration of constants.


Constant Declarations
...
.data
	LF  	EQU	0AH 
	PROMPT  EQU 	“Type your name”
	MSG 	DB  	“Type your name”
	MDG 	DB	PROMPT
.code
	...
	MOV DL, 0AH
	MOV DL, LF
	...