#include char format[] = "%s %s %d\n"; char hello[] = "Hello"; char world[] = "world: num="; int num = 8; int main() { // calling printf from inline assembler __asm { push num ;// pushes parameter to stack lea eax, world ;// load address of array "world" to eax push eax ;// pushes parameter to stack lea eax, hello ;// load address of array "world" to eax push eax ;// pushes parameter to stack lea eax, format ;// load address of array "format" to eax push eax ;// pushes parameter to stack mov eax, printf ;// get address of C-printf function call eax ;// calls C-printf function add esp, 16 ;// clean up the stack } // alternative in C printf(format, hello, world, num); // alternative in C without variables printf("%s %s %d\n", "Hello", "world: num=", 8); }