Mac OS X, like other UNIX/POSIX systems, uses a different calling convention for 64-bit code. Instead of pushing all the arguments to the stack, it uses RDI
, RSI
, RDX
, RCX
, R8
, and R9
for the first 6 arguments. So instead of using push msg
, you'll need to use something like mov RDI, msg
.