您好我用汇编语言编写了这段代码:
.data
integer:
.long 0
.text
.globl _start
_start:
movl $3, %eax
movl $0, %ebx
movl $integer, %ecx
movl $5, %edx
int $0x80
movl %ecx, %ebx
end:
movl $1, %eax
int $0x80
我想将输入值写入%ebx寄存器。它不起作用。当我输入4时,%ebx寄存器返回147.我汇编并链接了这些命令:
sukur@sukur-System-Product-Name:~/Desktop$ as program.s -o program.o
sukur@sukur-System-Product-Name:~/Desktop$ ld program.o -o program
如何解决此问题?