首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 嵌入开发 > 汇编语言 >

redhat5 linux 下汇编有关问题

2012-03-03 
redhat5 linux 下汇编问题#cpuid.s.section .dataoutput:.ascii The processor Vendor ID is xxxxxxxxxx

redhat5 linux 下汇编问题
#cpuid.s
.section .data
  output:.ascii "The processor Vendor ID is 'xxxxxxxxxxxx'\n"
.section .text
.globl _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 $output,%ecx
  movl $42 %edx #这里是第16行
  int $0x80
  movl $1,%eax
  movl $0, %ebx
  int $0x80


分别用gas 和gcc 编译 都出现 

cpuid.s:16: Error: suffix or operands invalid for `mov' 请问怎么解决阿

[解决办法]
movl $42 %edx 
怎么,没有逗号啊!

热点排行