I am trying to convert this function from MSVC++ to MINGW (this is the original MSVC function)
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. they give me a "undeclared identifier"
Upvotes: 0
Views: 2837
Reputation: 4834
You can compile something in C and also keep the assembler listing with -S
parameter. That should display the AT&T syntax in all its glory.
Upvotes: 0
Reputation: 56123
In Mingw it might be called "pushall" instead of "pusha": so try "pushalld" and "popalld".
Upvotes: 0