masm中以字母开头的十六进制值 [英] hexadecimal values in masm starting with a letter
问题描述
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
.
这篇关于masm中以字母开头的十六进制值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!