The push szTest works in MSVC but Pelles C throws an error:
#include <stdio.h>
int main()
{
char szText[20] = {0};
char* szTest= "Hello World";
__asm
{
mov eax, szTest
int 3
push eax //works fine
; push szTest // error #3114: [asm] Invalid combination of opcode and operands
pop eax
}
}
Under the hood:
00401016 ³. C745 E8 00404000 mov dword ptr [ebp-18], offset 0040 ; ASCII "Hello World"
0040101D ³. 8B45 E8 mov eax, dword ptr [ebp-18]
00401020 ³. CD 03 int 3
00401022 ³. 50 push eax