Microsoft KB Archive/24962: Difference between revisions

From BetaArchive Wiki
m (Text replacement - "<" to "<")
m (Text replacement - ">" to ">")
 
Line 12: Line 12:
<div id="TitleRow">
<div id="TitleRow">


= <span id="KB24962"></span><constant&gt; and [<constant&gt;] Are Semantically the Same =
= <span id="KB24962"></span><constant> and [<constant>] Are Semantically the Same =




Line 52: Line 52:
== SUMMARY ==
== SUMMARY ==


While <constant&gt; and [<constant&gt;] are syntactically different (a constant and a constant within brackets), they are semantically the same. For example, the following statement:
While <constant> and [<constant>] are syntactically different (a constant and a constant within brackets), they are semantically the same. For example, the following statement:
<pre class="codesample">  MOV ax, [100]
<pre class="codesample">  MOV ax, [100]
                 </pre>
                 </pre>

Latest revision as of 09:44, 21 July 2020

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