Hacker News new | ask | show | jobs
by bitshiffed 1114 days ago
For amd64 they both use the same registers to pass arguments.

But, the BSD syscalls use the carry flag to indicate error, rather than the returned value of rax being negative. If your syscalls always succeed, and never return values within what would be a negative range as a signed value, then the code would run; but that's not exactly "portable".