Author Topic: Does anybody have an example of using the THIS operator  (Read 687 times)

StillLearningMasm

  • Regular Member
  • *
  • Posts: 21
Does anybody have an example of using the THIS operator
« 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.

hutch--

  • Administrator
  • Member
  • ******
  • Posts: 7542
  • Mnemonic Driven API Grinder
    • The MASM32 SDK
Re: Does anybody have an example of using the THIS operator
« Reply #1 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.
hutch at movsd dot com
http://www.masm32.com    :biggrin:  :skrewy:

StillLearningMasm

  • Regular Member
  • *
  • Posts: 21
Re: Does anybody have an example of using the THIS operator
« Reply #2 on: May 14, 2019, 03:32:45 AM »
Thank you