News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

please help me

Started by anuradha, May 20, 2007, 12:58:16 PM

Previous topic - Next topic

anuradha

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

evlncrn8


ic2

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

MichaelW

@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.

eschew obfuscation