Mm
Mm
Mm
STAR ENDP
EQU: Equate
The directive EQU is used to assign a label with a value or a
symbol. The use of this directive is just to reduce the recurrence of the numerical
values or constants in a program code.
Example
LABEL
EQU
0500H
ADDITI
ON EQU
ADD
The first statement assigns the constant 500H with the label LABEL, while the
second statement assigns another label ADDITION with mnemonic ADD.
EXTRN: External and Public
The directive EXTRN informs the assembler that the names,
procedures and labels declared after this directive have already been defined in
some other assembly language modules.
GROUP: Group the Related segment
The directive is used to form logical groups of segments with
similar purpose or type. This directive is used to inform the assembler to form a
logical group of the following segment names.
PROGRAM GROUP CODE, DATA, STACK
The above statement directs the loader/linker to prepare an EXE file such
that CODE, DATA and STACK segment must lie within a 64kbyte memory
segment that is named as PROGRAM. Now, for the ASSUME statement, one can
use the label PROGRAM rather than CODE, DATA and STACK as shown.
ASSUME CS: PROGRAM, DS: PROGRAM, SS: PROGRAM.
LABEL: Label
The Label directive is used to assign a name to the current content
of the location counter. At the start of the assembly process, the assembler
LOCAL:
The labels, variables, constants or procedures declared LOCAL
in a module are to be used only by thatmodule.
NAME: Logical Name of a Module
The NAME directive is used to assign a name to an assembly
language program module. The module may now be referred to by its declared
name.
OFFSET: Offset of a Label
When the assembler comes across the OFFSET operator along with a
label, it first computes the 16-bit displacement (also called as offset
interchangeably) of the particular label, and replaces the string 'OFFSET LABEL'
by the computed displacement.
ORG: Origin
The ORG directive directs the assembler to start the memory
allotment for the particular segment, block or code from the declared Addressing.
The ORG statement while starting the assembly process for a module, the
assembler initializes a location counter to keep track of the allotted addresses for
the module. If the ORG statement is not written in the program, the location counter
is initialized to 0000. If an ORG 200H statement is present at the starting of the
code segment of that module, then the code will start from 200H Addressing code
segment.
PROC: Procedure
The PROC directive marks the start of a named procedure in the
statement.
PTR: Pointer
The pointer operator is used to declare the type of a label, variable
or memory operand. The operator PTR is prefixed by either BYTE or WORD. If
the prefix is BYTE, then the particular label, variable or memory operand is treated
as an 8-bit quuantitywhile if WORD is the prefix, then it is treated as a 16- bit quantity.
Example:
MOV AL, BYTE PTR [SI];
Moves content of memory location addressed by SI (8-bit) to AL
SEG: Segment of a Label
The SEG operator is used to decide the segment Address of the label,
variable, or procedure and substitutes the segment base Address in place of ‘SEG
label’. The example given below explains the use of SEG operator.
Example MOV AX, SEG ARRAY;
This statement moves the segment address
TYPE :
The TYPE operator directs the assembler to decide the data type
of the specified label and replaces the 'TYPE label' by the decided data type.
For the word type variable, the data type is 2, for double word type, it is 4, and
for byte type, it is 1.
GLOBAL:
The labels, variables, constants or procedures declared
GLOBAL may be used by other modules of the program. Once a variable is
declared GLOBAL, it can be used by any module in the program. The
following statement declares the procedure ROUTINE as a global label.