mac上运行王爽老师的第一个汇编程序的问题
asm1.asm
代码如下:
assume cs:abc
abc segment
mov ax,2
add ax,ax
add ax,ax
mov ax,4c00H
int 21H
abc ends
end
nasm版本是2.11
cpu是i5的
osx 10.9
编译连接命令
nasm -f macho64 -o asm1.o asm1.asm
ld -o asm1 -e _main asm1.o
错误信息
hello.asm:1: error: parser: instruction expected
hello.asm:2: error: parser: instruction expected
hello.asm:8: error: symbol `abc' redefined
hello.asm:8: error: parser: instruction expected
求指导