Hello World
Rumbu
rumbu at rumbu.ro
Thu Feb 18 07:17:45 UTC 2021
Well, since I had a deep dive in the Windows world...
extern(Windows) void GetStdHandle(int);
extern(Windows) void WriteFile(size_t, size_t, int, size_t,
size_t);
extern(Windows) void ExitProcess(int);
int main()
{
asm
{
naked;
push -11;
call GetStdHandle;
mov EBX, EAX;
push 0;
lea EAX, [ESP - 4];
push EAX;
push 11;
push msg;
push EBX;
call WriteFile;
push 0;
call ExitProcess;
msg:
db "Hello Pedro\n";
}
}
More information about the Digitalmars-d
mailing list