2023-08-11 11:37:23 +00:00
|
|
|
#if 0
|
|
|
|
/*─────────────────────────────────────────────────────────────────╗
|
|
|
|
│ To the extent possible under law, Justine Tunney has waived │
|
|
|
|
│ all copyright and related or neighboring rights to this file, │
|
|
|
|
│ as it is written in the following disclaimers: │
|
|
|
|
│ • http://unlicense.org/ │
|
|
|
|
│ • http://creativecommons.org/publicdomain/zero/1.0/ │
|
|
|
|
╚─────────────────────────────────────────────────────────────────*/
|
|
|
|
#endif
|
2024-08-16 13:43:59 +00:00
|
|
|
#include "libc/nt/thunk/msabi.h"
|
2023-08-11 11:37:23 +00:00
|
|
|
#include "tool/build/elf2pe.h"
|
|
|
|
|
|
|
|
#define STD_OUTPUT_HANDLE -11u
|
|
|
|
|
|
|
|
__dll_import("kernel32.dll", long, GetStdHandle, (unsigned));
|
|
|
|
__dll_import("kernel32.dll", int, WriteFile,
|
|
|
|
(long, const void *, unsigned, unsigned *, void *));
|
|
|
|
|
2024-08-16 13:43:59 +00:00
|
|
|
__msabi long WinMain(void) {
|
2023-08-11 11:37:23 +00:00
|
|
|
WriteFile(GetStdHandle(STD_OUTPUT_HANDLE), "hello world\n", 12, 0, 0);
|
|
|
|
return 0;
|
|
|
|
}
|