NASM_AssemblyPractice
1.0.0
...
Depending on your system, follow the steps below:
Make sure you have nasm installed, and follow the next steps.
nasm -f macho64 asm/{file}.s
Depending on the file, you might need to run one of the following:
ld -arch x86_64 -macosx_version_min 10.9.0 -no_pie -lSystem -e _start -o a.out asm/{file}.o
If there is a main label, remove the -e _start flag:
ld -arch x86_64 -macosx_version_min 10.9.0 -no_pie -lSystem -o a.out asm/{file}.o
And if you wish to mix c and s, you can run the following:
gcc c/{file}.c asm/{file}.o
And just execute with:
./a.out