Microsoft KB Archive/24962

From BetaArchive Wiki
< Microsoft KB Archive
Revision as of 09:00, 21 July 2020 by X010 (talk | contribs) (Text replacement - "<" to "<")
Knowledge Base


<constant> and [<constant>] Are Semantically the Same

Article ID: 24962

Article Last Modified on 10/17/2003



APPLIES TO

  • Microsoft Macro Assembler 1.25
  • Microsoft Macro Assembler 1.27
  • Microsoft Macro Assembler 4.0
  • Microsoft Macro Assembler 4.0
  • Microsoft Macro Assembler 5.0
  • Microsoft Macro Assembler 5.1 Standard Edition
  • Microsoft Macro Assembler 6.0 Standard Edition
  • Microsoft Macro Assembler 6.0a
  • Microsoft Macro Assembler 6.0b



This article was previously published under Q24962

SUMMARY

While <constant> and [<constant>] are syntactically different (a constant and a constant within brackets), they are semantically the same. For example, the following statement:

   MOV ax, [100]
                

will move the value of 100 into ax, not the value that is at address 100.

Another example is using a constant offset in a segment override:

   MOV ax, ds:100     ; This will access the word at offset 100

   MOV ax, ds:[100]   ; This will do the same thing
                


Additional query words: 1.25 1.27 3.0x 4.00 5.00 5.10 6.00 6.00a 6.00b

Keywords: KB24962