当前位置: 代码迷 >> 汇编语言 >> 请教:这个程序错在哪
  详细解决方案

请教:这个程序错在哪

热度:4262   发布时间:2013-02-26 00:00:00.0
请问:这个程序错在哪?
我这个是在linux下运行的,
我是把字符串压入堆栈,然后想显示字符串,可是没有显示,
请看:
.text
.global _start
_start:
       pushl %ebp
       movl %esp,%ebp
       pushl $0x48494a00
       movl $4,%eax
       movl $1,%ebx
       movl %ebp,%ecx
       movl $4,%edx
       int $0x80
       popl %eax
       popl %ebp
       movl $1,%eax
       movl $0,%ebx
       int $0x80

------解决方案--------------------------------------------------------
movl %ebp,%ecx???
是 movl %esp,%ecx吧

还有你 pushl $0x48494a00写反了吧?
小尾应该是 $0x004a4948
  相关解决方案