-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Maybe have a disclaimer about error returns? #3
Comments
Re: the second point about clobbering: indeed, the syscall to write does seem to reset
|
Examined every register with "write" syscall:
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi, thanks for this great resource, really helps when attempting to program in assembly for MacOS, there's not lot info out there.
I have hardly seen this mentioned anywhere, but the MacOS x86_64 syscall ABI seems to use the Carry Flag in the EFLAGS register to signal that an error happened, unlike Linux which uses negative numbers. I think that it would be cool if that was mentioned on the syscall page, because that info is not simply commonly available, I found it from here: https://stackoverflow.com/questions/47834513/64-bit-syscall-documentation-for-macos-assembly
Another worrying thing is the report that syscalls may clobber rdx, which I also haven't seen mentioned elsewhere...
The text was updated successfully, but these errors were encountered: