1
例如,我想打电话给void exit(int exit_code)
:为什么你必须在OSX上打系统调用?
main:
push 42 ; Push the return value
push 0 ; Pad the value before calling the interrupt
mov eax, 1 ; exit syscall
int 80h ; invoke
ret
为什么我需要垫此参数正常工作?
OSX保持对齐到16字节边界的堆栈,据我所知......我怀疑这就是原因。 –
啊,这表明我正确的方向,谢谢! – sircodesalot