汇编指令——使用函数 杨科华.pptVIP

  • 19
  • 0
  • 约1.38万字
  • 约 37页
  • 2018-05-31 发布于河北
  • 举报
汇编指令——使用函数 杨科华

pushl %ebp movl %esp, %ebp subl $16, %esp movl 8(%ebp), %eax movl %eax, %edx imull 8(%ebp), %edx movl 12(%ebp), %eax imull 12(%ebp), %eax leal (%edx,%eax), %eax movl %eax, -4(%ebp) movl -4(%ebp), %eax leave ret 4 //f_1(i,j)中的j 3 //f_1(i,j)中的i ebp+36 下一条指令的返回地址 ebp+32 main函数的ebp旧值 esp+44,ebp+28 1 //局部变量a esp+40,ebp+24 2 //局部变量b esp+36 esp+32 esp+28 6 //y+b esp+24 4 //x+a esp+20,ebp+4 addl指令的地址 esp+16,ebp f_1函数的ebp旧值 esp+12 esp+8 esp+4 esp pushl %ebp movl %esp, %ebp subl $16, %esp #计算s movl 8(%ebp), %eax movl %eax, %edx imull 8(%ebp), %edx #计算x*x,结果存在edx中 movl 12(%ebp), %eax imull 12(

文档评论(0)

1亿VIP精品文档

相关文档