syscall should have a stable ABI at the very least, because this would otherwise break all statically linked code.
Ah, here we go: https://github.com/golang/go/issues/36435
> Upcoming changes to the OpenBSD kernel will prevent system calls from being made unless they are coming from libc.so (with some exceptions, for example, a static binary). There are also likely to be changes to the APIs used for system calls. As such, the Go runtime (and other packages) need to stop using direct syscalls, rather calling into libc functions instead (as has always been done for Solaris and now also for macOS).
(and the "with some exceptions" is why I say "strongly encouraged")
As mentioned below, on Windows syscalls are highly unstable. They change with every single update to the OS. You have to call functions in ntdll and they in turn will call the kernel. Think of it like a kind of libc but one that must be dynamically linked. You can't statically link it because it's tied to the exact version of Windows you're using.
Of course Window's actual stable interface is the Win32 API, which will call ntdll which in turn makes the syscall.
I was recently working on generating some assembly language output and I added the ability to generate a breakpoint at the start of my executable.
It took me an embarassingly long time to realize that the reason my executables were crashing, not dropping into the debugger, was that "INT3" was assembled differently than "INT 03h" - I knew I needed 0x03, and I knew it was the one-byte form of the instruction (0xCC) rather than (0xCD 0xNN), to ease patching, but .. yeah.
Why?