SEG : Segment of a Label:-
The SEG operator is which is used to decide the segment address of the, variable, label or procedure and substitutes the segment base address in place of 'SEG label". Following example given below explained the use of SEG operator.
MOV AX, SEG ARRAY ; This statement moves the segment address of ARRAY in
MOV DS, AX ; which it is appearing, to register AX and then to DS.
SEGMENT : Logical Segment:-
The SEGMENT directive marks the beginning of a logical segment. They began segment is also assigned a name, for example label, by this statement. The ENDS and SEGMENT directive ought to bracket each logical segment of a program. In some particular cases, the segment may be assigned a type like PUBLIC (for instance can be used by other modules of the program whereas linking) or GLOBAL (can be accessed by any other modules). The program structure given below described the use of the SEGMENT directive.
EXE.CODE SEGMENT GLOBAL ; Start of segment named EXE. CODE,
; That may be accessed by other module.
EXE.CODE ENDS ; END of EXE.CODE logical segment.