NASM_AssemblyPractice
1.0.0
...
시스템에 따라 아래 단계를 따르십시오.
nasm 설치되어 있는지 확인하고 다음 단계를 따르십시오.
nasm -f macho64 asm/{file}.s
파일에 따라 다음 중 하나를 실행해야 할 수도 있습니다.
ld -arch x86_64 -macosx_version_min 10.9.0 -no_pie -lSystem -e _start -o a.out asm/{file}.o
메인 레이블이 있으면 -e _start 플래그를 제거하십시오.
ld -arch x86_64 -macosx_version_min 10.9.0 -no_pie -lSystem -o a.out asm/{file}.o
c 와 s 믹싱하려면 다음을 실행할 수 있습니다.
gcc c/{file}.c asm/{file}.o
그리고 그냥 실행합니다.
./a.out