Search This Blog

Friday, April 13, 2012

Simplified Segment Directives

The simplified segment directives are .CODE, .DATA, .MODEL, .STACK etc.
The .CODE directive may be followed by a name or a label for the segment.
The .STACK directive may be followed by the size of the stack segment. Default is 1k.
The definition of the simplified segment extends from a simplified segment directive to another simplified segment directive or up to END directive if the defined segment is the last one.
For example…
.MODEL SMALL
.DATA
A DW 1234H
B DW 0124H
.CODE
MOV AX,@DATA
MOV DS,AX
MOV AX,A
MOV BX,B
SUB AX,BX
MOV AH,4CH
INT 21H
END

No comments:

Post a Comment