Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

davidlt

macrumors member
Original poster
May 22, 2007
56
0
Lithuania
Hello, I have never did Asm programming on UNIX type operating system and now I have tried it. I am using preisntalled NASM as compiler. I took simple Hello World program to try it for the first time and compiled like this:
nasm -f macho -o hello hello.asm

and tried to launch it:
./hello

I got message that permission was denied and then I tried with sudo the same and got message: "sudo: ./hello: command not found".

The question would be how to compile to Mac executive file and run it without any problems?
 

davidlt

macrumors member
Original poster
May 22, 2007
56
0
Lithuania
Okay, Linux was even easier, I did not know that UNIX is using stack for the arguments, thanks... :)

Any doc with full syscalls information for Mac?
 

larkost

macrumors 6502a
Oct 13, 2007
534
1
I don't know a thing about asm, but it seems to be that the problem might be that the output file is not set as executable. If you "chmod +x" it, then it might work.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.