Assembly cpuid.o:在函数`#u start';中:(.text+;0x20):对“输出';

Assembly cpuid.o:在函数`#u start';中:(.text+;0x20):对“输出';,assembly,Assembly,为什么我会犯这样的错误?。为什么它不能在数据部分看到我的输出变量?它可以在数据部分看到你的输出变量。它看不到的是您尚未定义的output变量 变量output与output不同。如果我们有超智能的机器能够自动将两者联系起来(就像我们为模式匹配而设计的令人印象深刻的大脑那样),那就太好了,但可惜的是,现在还不是这样 该行应更改为: .section .data output: .ascii "The processor vendor ID is 'XXXXXXXXXXXXXXXXXXXXX

为什么我会犯这样的错误?。为什么它不能在数据部分看到我的输出变量?

它可以在数据部分看到你的
输出变量。它看不到的是您尚未定义的
output
变量

变量
output
output
不同。如果我们有超智能的机器能够自动将两者联系起来(就像我们为模式匹配而设计的令人印象深刻的大脑那样),那就太好了,但可惜的是,现在还不是这样

该行应更改为:

    .section .data
output: .ascii "The processor vendor ID is 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'\n"
.section .text
.global _start
_start:
   movl $0, %eax
   cpuid
   movl $output, %edi
   movl %ebx, 28(%edi)
   movl %edx, 32(%edi)
   movl %ecx, 36(%edi)
   movl $4, %eax
   movl $1, %ebx
   movl $ouput, %ecx
   movl $42, %edx
   int $0X80
   movl $1, %eax
   movl $0, %ebx
   int $0X80
致:


谢谢,该死的。。我习惯于在IDE中工作。在记事本上写这么多代码可能会很痛苦:(
movl $ouput, %ecx
movl $output, %ecx
;       ^