The MASM Forum

General => The Campus => Topic started by: StillLearningMasm on May 13, 2019, 10:54:26 AM

Title: Does anybody have an example of using the THIS operator
Post by: StillLearningMasm on May 13, 2019, 10:54:26 AM
I have read in masm that there is a operator call THIS but have not seen any examples of its usage. Does anybody have one?

Thank you for your help.
Title: Re: Does anybody have an example of using the THIS operator
Post by: hutch-- on May 14, 2019, 12:34:13 AM
Out of MASM32 help.

THIS


Syntax: THIS qualifiedtype


Description

Returns an operand of <qualifiedtype> with offset and segment values equal to the current location-counter value. THIS can be used with EQU or = to create labels and variables. THIS NEAR is equivalent to $.

These two lines are equivalent:


tag1 EQU THIS BYTE
tag1 LABEL BYTE


The <qualifiedtype> can be any qualified type.
Title: Re: Does anybody have an example of using the THIS operator
Post by: StillLearningMasm on May 14, 2019, 03:32:45 AM
Thank you