我要翻译的内容如下:
我要运行的代码如下。我使用nasm工具将其转换为目标文件。当我尝试执行它时,会提示“无法执行二进制文件”。
我运行了以下命令: nasm -f elf -o helloworld.o helloworld.asm
segment .data
msg db "Hello, world!",10
len equ $ - msg
segment .text
global _start
_start:
mov eax,4
mov ebx,1
mov ecx,msg
mov edx,len
int 80h
mov eax,1
mov ebx,0
int 80h
这是我第一次使用汇编语言编写程序,除了编译一些基本的C程序外,我没有使用过Ubuntu。我需要一些帮助,谢谢大家。