hi guys
i found a source code that demonstrate the MOV instruction.here is the part of it
mov ax,@data
mov ds,ax
can any one tell me what is this @data means????
thanks :bg :bg
the data segment...
I haven't seen code of this type but it seems to me to mean offset because you're moving initialized data into an registers.
mov ax, offset MyWordValue
2 byte only
@data is one of the MASM predefined symbols. For all models except FLAT it expands to DGROUP, the name of the segment group for near data. DGROUP is defined automatically when you use the .MODEL directive, and it includes the near data segment and the stack segment.
.model small
% echo @code
% echo @data
% echo @stack
end
Assembling: presym.asm
_TEXT
DGROUP
DGROUP
For all models except TINY, and unless you use the .STARTUP directive, before your program can access data it must set DS to the data segment.