Assembly Language Help (alang.hlp) (Table of Contents; Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software, purely for historical purposes. If you're looking for up-to-date documentation, particularly for programming, you should not rely on the information found here, as it will be woefully out of date.
Current Offset ($) Value
                                             Up Contents Index Back
────────────────────────────────────────────────────────────────────────────
 
  Syntax:   $
 
  See also: LENGTHOF, THIS
 
  Description:
 
     Equates to the current value of the location counter (current
     offset address). Equivalent to THIS NEAR.
 
  Example:
 
     title    BYTE     "Space Mutants II"
     level    WORD     0
     hiscore  BYTE     20 DUP (?)
     tablelen EQU      $-title             ;tablelen = 38
 
     In compatibility mode, the current address operator ($) applied to a
     structure returns the offset of the first byte of the structure. When
     OPTION M510 is not enabled, $ returns the offset of the current field in
     the structure.
                                    -♦-