Scott Davies
Scott Davies

Reputation: 3755

What does the @data directive mean in MASM?

I have come across the following directive in some assembly code:

mov    ax, @data

I've gone through my assembler book and tried some Googl-ing, but can't find a definition.

Thanks,

Scott

Upvotes: 4

Views: 14482

Answers (1)

Zooba
Zooba

Reputation: 11468

@data is a macro for the default data group, which is only relevant if you're not using the FLAT model.

The code you provided is typically followed by mov ds, ax, which sets up the data segment register for the current executable.

(MSDN reference at @data.)

Upvotes: 5

Related Questions