How do I write a syscall in x86 assembly for Windows?
<p>I need to do a system call (syscall) in x86 assembly code that targets the Windows platform.</p>

<p>On Linux, I would just do something like <code>int 0x80</code>, but this doesn't work on Windows. What should the code look like to do a syscall on Windows?</p>

<p>(I am using AT&amp;T syntax and writing 64-bit code, if it matters, but the answer should be the same for Intel syntax and 32-bit code.)</p>