can anyone help with an error I'm getting.
I copied and pasted hello.asm from
http://www.csee.umbc.edu/help/nasm/sample.shtml#helloI assembled it using nasm and the command nasm -f elf -l hello.lst hello.asm as suggested by the comment in the program.
However when I tried to compile using the command gcc -o hello hello.o (also suggested in the program) I got the following error message:
pd:~/src penfold$ gcc -o hello hello.o
/usr/bin/ld: hello.o bad magic number (not a Mach-O file)
collect2: ld returned 1 exit status
In case its relevant I'm working on a mac book and typing the commands to the compiler into a terminal window.
I rather like the sound of the error message but its jolly cryptic too.
can anyone help?
best regards
Penfold