这段代码在屏幕上打印 Hello
.data
hello: .string "Hello\n"
format: .string "%s"
.text
.global _start
_start:
push $hello
push $format
call printf
movl $1, %eax #exit
movl $0, %ebx
int $0x80
但是,如果我从 hello 字符串中删除 '\n',如下所示:
.data
hello: .string "Hello"
format: .string "%s"
.text
.global _start
_start:
push $hello
push $format
call printf
movl $1, %eax #exit
movl $0, %ebx
int $0x80
程序不工作。有什么建议么?