如何将ascii转换为整数?从ascii转换为AT&T汇编中的整数
data
asd:
.int 32
.text
.globl _start
_start:
movl $4, %eax
movl $1, %ebx
movl $1,(asd)
add $48,(asd)
movl $asd, %ecx
movl $4, %edx
int $0x80
# Exit the program
movl $1, %eax
movl $0, %ebx
int $0x80
该代码正在写一个ascii值,我认为如果我可以添加48的值。我可以写,但我无法打印,两个阶段的数字“例如53或156”。我如何打印?
您必须一次完成一位数字。除以10以隔离下一个数字。 –