×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

@Data

@Data

(OP)
mov ax,@Data
mov ds,ax
Where does the program gets the corresponding value to @Data? Does DOS, when it loads the program, replaces @Data by the current data segment?
I'm confuse about it.

Note: I'm using Masm 6.14

RE: @Data

@Data is a special label reserved by the assembler when using '.MODEL'.

If you notice most assembly programs now use '.MODEL', because if you do, you can use '.DATA', '.CODE', '.STACK', and '.FARDATA'.  These pseudo-ops define segments in the program (I assume you know about segments).

All segments however MUST have a name and an address.  The old way, you defined segments in this manner:

CODE_SEG SEGMENT PUBLIC PARA 'CODE' (etc...)


So CODE_SEG was the name of the segment which you can refer to if at any time you need to know the address of that segment.

However, in the new way you simply do:

.CODE

without defining a name for that segment.  So how do you now refer to that segment?  Well the assembler gives it the name @CODE.  Similarly, a .DATA segment is named @DATA, a .FARDATA segment is named @FARDATA.


As for what DOS does... leave DOS alone until you're prepared to handle it.  Just know that DOS will handle anything that requires segments by itself.  So if you put @DATA in your program, DOS will replace it with the address it placed @DATA in.  @DATA refers to the .DATA segment, remember that.  If you defined another data segment with a different name, you use that name, but that's advanced technique.  When you start getting tricky and start playing with segments by yourself, that's when you start worrying about what DOS does.

"Information has a tendency to be free.  Which means someone will always tell you something you don't want to know."

RE: @Data

i want to know about .radix16 what it's mean???

plz give me some sample

RE: @Data

.radix16 means that all your numbers will be considered as hexadecimal unless otherwise noted.  That means that a 10 is equivalent to 16 decimal, where if the radix was 10, you could use either 16 or 10h to mean sixteen.  And that means that, instead of writing INT 21H, if you tell the assembler that you're using a base/root 16 counting system, you can just write INT 21 (equivalent to 33 in decimal).  To specify eleven decimal in hexadecimal, you'd write 0b.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close