读书人

redhat5 linux 下汇编有关问题

发布时间: 2012-03-03 15:33:04 作者: rapoo

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
怎么,没有逗号啊!

读书人网 >汇编语言

热点推荐