#2
hu9jj2014-11-21 19:46
|
程序代码:
.section .data
output:
.asciz "The processor Vendor ID is \"%s\"\n"
.section .bss
.lcomm buffer,12
.section .text
.global _start
_start:
movq $0,%rax
cpuid
movq $buffer,%rdi
movq %rbx,(%rdi)
movq %rdx,4(%rdi)
movq %rcx,8(%rdi)
pushq $buffer
pushq $output
call printf
addq $8,%rsp
pushq $0
call exit
output:
.asciz "The processor Vendor ID is \"%s\"\n"
.section .bss
.lcomm buffer,12
.section .text
.global _start
_start:
movq $0,%rax
cpuid
movq $buffer,%rdi
movq %rbx,(%rdi)
movq %rdx,4(%rdi)
movq %rcx,8(%rdi)
pushq $buffer
pushq $output
call printf
addq $8,%rsp
pushq $0
call exit
如上代码,为什么运行结果没有换行?这个是AT&T的代码