本文主要是介绍64位ATT汇编语言整数除法printf输出,报错,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
.section .datastringToShow:.ascii "%d\n\0"
.global main
.section .text
main:movq $18,%rax # rax存储被除数movq $6,%rdidivq %rdimovq %rax,%rsimovq $stringToShow,%rdimovq $0,%raxcall printfmovq $60,%raxmovq $0,%rdisyscall
.section .datastringToShow:.ascii "%d\n\0"
.global main
.section .text
main:movq $0,%rdxmovq $18,%raxmovq $6,%rdidivq %rdimovq %rax,%rsimovq $stringToShow,%rdimovq $0,%raxcall printfmovq $60,%raxmovq $0,%rdisyscall
gcc divideWithPrint.s -static -o divideWithPrint
./divideWithPrint
idivideWithPrint.s
里边内容为
.section .datastringToShow:.ascii "%d\n\0"
.global main
.section .text
main:movq $1,%rdxmovq $18,%raxmovq $6,%rdiidivq %rdimovq %rax,%rsimovq $stringToShow,%rdimovq $0,%raxcall printfmovq $60,%raxmovq $0,%rdisyscall
这篇关于64位ATT汇编语言整数除法printf输出,报错的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!