masm中以字母开头的十六进制值
masm中的十六进制值是否必须以数字开头?如果我使用
Do hexadecimal values in masm have to start with a number? If I use
.const
_mmx_cons QWORD f000000000000000h
我收到一个构建错误:
test.asm(26): error A2006: undefined symbol : f000000000000000h
但是如果我添加前导0
But if I add a leading 0
.const
_mmx_cons QWORD 0f000000000000000h
该错误消失.这是为什么?我确定它代表64位值0xf000000000000000吗?
The error vanish. Why is that? Am I sure that it represents the 64 bit value 0xf000000000000000?
使用h后缀的十六进制数字必须以十进制数字开头,否则它们将被误认为标签名称.这就是为什么如果最高有效十六进制数字为A .. F.
Hex numbers using the h suffix must start with a decimal digit, otherwise they would be mistaken for label names. That's why you add a leading zero if the most significant hex digit is A..F.
前导零不会影响立即数的值或存储大小要求.例如,写MOV AL, 00000001h完全可以,因为00000001h与1完全相同.
Leading zeroes do not affect the value or storage size requirement of the immediate. For example, it's perfectly ok to write MOV AL, 00000001h, because 00000001h is exactly the same as 1.