如何使用putsAT&T,x86_64重新格式化要打印为字符串的整数

问题描述

在组装项目上,我试图使用“ puts”打印保存在临时变量中的整数。我知道整数必须先重新格式化为字符串格式才能打印,我的问题是如何做到这一点。 使用AT&T语法。 例如:

.data
temp: .quad 0
outbuf: .space 64
.global main
main:
movq $5,temp

reformat: 
// the function to reformat the temp variable and move it to outbuf

printBuf:
movq outbuf,%rdi
call puts
ret

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)