#include "stdio.h"
#include "windows.h"
char szApiTest[] = "API Test";
void main()
{
char szHello[] = "Hello, world!";
__asm
{
push MB_OK;
push offset szApiTest; 全局变量用 offset;
lea eax, szHello; 局部变量用 lea;
push eax;
push 0;
call dword ptr [MessageBoxA];
}
MessageBox(NULL, szHello, szApiTest, MB_OK);
__asm
{
push offset szApiTest;
call printf;
add esp,4;
}
}