Solved by @PeterCordes: "Ok, then there's your problem. Write 64-bit code, and don't use any int instructions. int 21h is DOS, other int numbers are mostly BIOS. int 80h is Linux's 32-bit system-call interface, which you don't want to use either in 64-bit code even on Linux. You also don't want to use syscall; Windows doesn't have a stable/documented syscall ABI; call through the DLLs instead. So if you see examples showing int or syscall, they're not for x64 Windows (or they're about low-level fun stuff like reverse-engineering the syscall ABI the DLLs use), look for a different tutorial."