> Calling system calls by crafting your own assembly is generally a bad idea as the ABI may break underneath you.<p>syscall should have a stable ABI at the very least, because this would otherwise break all statically linked code.
If you're interested in more detail:
<a href="https://0xax.gitbooks.io/linux-insides/content/SysCall/linux-syscall-2.html" rel="nofollow">https://0xax.gitbooks.io/linux-insides/content/SysCall/linux...</a>
In grad school for Operating Systems class, one of our assignments was adding a system call to the linux kernel. I found that a useful exercise - both doable in a reasonable amount of time and also a way to learn a lot.