<constant> and [<constant>] Are Semantically the Same (24962)
The information in this article applies to:
- Microsoft Macro Assembler (MASM) 1.25
- Microsoft Macro Assembler (MASM) 1.27
- Microsoft Macro Assembler (MASM) 3.0x
- Microsoft Macro Assembler (MASM) 4.0
- Microsoft Macro Assembler (MASM) 5.0
- Microsoft Macro Assembler (MASM) 5.1
- Microsoft Macro Assembler (MASM) 6.0
- Microsoft Macro Assembler (MASM) 6.0a
- Microsoft Macro Assembler (MASM) 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
Modification Type: | Minor | Last Reviewed: | 10/17/2003 |
---|
Keywords: | KB24962 |
---|
|