[英]Convert Inline C Assembler (Intel syntax to AT&T)
I am trying to convert this function from MSVC++ to MINGW (this is the original MSVC function) 我正在尝试将此功能从MSVC ++转换为MINGW(这是原始的MSVC功能)
VOID __declspec(naked) BNSTUB()
{
__asm
{
pushad;
call OnChatPacketReceived;
TEST EAX,EAX;
popad;
jnz oldCall;
MOV EAX,0;
MOV DWORD PTR DS:[EBX+0x6FF3EBA0],1
ret;
oldCall:
CALL eax;
MOV DWORD PTR DS:[EBX+0x6FF3EBA0],1
ret;
}
}
But I have problems with pushad and popad. 但是我在pushad和popad上有问题。 they give me a "undeclared identifier"
他们给我一个“未声明的标识符”
pusha popa(无d)
在Mingw中,它可能被称为“ pushall”而不是“ pusha”:所以请尝试“ pushalld”和“ popalld”。
You can compile something in C and also keep the assembler listing with -S
parameter. 您可以在C语言中进行编译,还可以使用
-S
参数保留汇编程序列表。 That should display the AT&T syntax in all its glory. 那应该显示AT&T语法的全部荣耀。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.