Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在尝试获取 esi 保存第一个字节地址的字符串的大小。
mov ebx, SIZEOF [esi]
这个怎么跑不了?对于错误,它给我错误 A2081: mi,对于该行号。
这个怎么跑不了?
的语法SIZEOF是:
SIZEOF
SIZEOF variable | type
这仅在汇编时有效,在运行时无效。而且它没有被翻译成代码。所以你不能在任何你想要的地方使用它。
一个例子:
.data string BYTE "Hello World", 0 .code mov eax, SIZEOF string ; the size will be translated into an immediate value
如果您无法提前知道该字符串的长度,则需要调用一些函数来获取它。
标签)