Name: Anonymous 2011-11-18 19:24
Sup /prau/g, I posted many moons ago about assembly and syscall and such. I've written a shitty compiler for some bullshit language I invented, it was awful. I'm now writing a much better C-compiler, and I am testing it out on Macs.
Now gather round, denizens, for I have a tale for you.
It was a cool February evening when I approached /prong/, asking for help about int 80h vs syscall. Now, ungrateful and unremorseful, I entered prog once more, much not dissimilar to the way I entered a sock earlier.
I ask this of you, strange anime creatures of these realms:
Linux
FreeBSD
Unfortunately, the FreeBSD-carry-style seems to work with Mach kernels, but I am unsure how I can get the error number: rax contains 4096, every time.
Help me /prog/, you're my only hope
Now gather round, denizens, for I have a tale for you.
It was a cool February evening when I approached /prong/, asking for help about int 80h vs syscall. Now, ungrateful and unremorseful, I entered prog once more, much not dissimilar to the way I entered a sock earlier.
I ask this of you, strange anime creatures of these realms:
Linux
; various syscall setup
syscall
cmp rax, -1
jle .err
ret
.err:
neg rax
mov [errno], raxFreeBSD
; various syscall setup
syscall
jc .err ; FreeBSD sets the carry flag on syscall errors, errno is in rax
ret
.err:
mov [errno], raxUnfortunately, the FreeBSD-carry-style seems to work with Mach kernels, but I am unsure how I can get the error number: rax contains 4096, every time.
Help me /prog/, you're my only hope