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

这么一个简单的程序编译报错,求解答,该怎么解决

2012-03-18 
这么一个简单的程序编译报错,求解答1 .section .data23 .section .text4 .globl _start5 _start:6movl $1,

这么一个简单的程序编译报错,求解答
1 .section .data
  2 
  3 .section .text
  4 .globl _start
  5 _start:
  6 movl $1, $eax
  7 movl $4, $ebx
  8 
  9 int $0x80

我是按照网上教程敲的(详见http://learn.akae.cn/media/ch18s01.html),结果编译报错:
[neil@localhost Assemble]$ as -o hello.o hello.s
hello.s: Assembler messages:
hello.s:6: Error: suffix or operands invalid for `mov'
hello.s:7: Error: suffix or operands invalid for `mov'

谁能告诉我这是为什么

[解决办法]
movl $1, %eax
movl $4, %ebx

ATT语法,寄存器前面用%

热点排行