本文介绍了如何在 x86 汇编编程中表示 FFFFFFBB 等十六进制值?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在学习 x86 内联汇编编程.
I'm learning about x86 inline assembly programming.
我想写 mov ecx, FFFFFFBB
,但是编译器无法识别它.内联汇编代码应该如何编写这样的十六进制数字?
I wanted to write mov ecx, FFFFFFBB
, however the compiler isn’t recognizing it. How should hex numbers like that be written in inline assembler code?
推荐答案
这取决于你的汇编程序的风格.
It depends on the flavour of your assembler.
- AT&T:
movl $0xFFFFFFBB, %ecx
- 英特尔:
mov ecx, 0FFFFFFBBh
仅供参考,GNU Assembler 等汇编器使用 AT&T 语法,而 NASM 和其他大多数使用英特尔的语法.
FYI, AT&T syntax is used by assemblers such as the GNU Assembler, whereas NASM and most of others use Intel's one.
这篇关于如何在 x86 汇编编程中表示 FFFFFFBB 等十六进制值?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!