点击这里给我发消息 点击这里给我发消息

从汇编的角度分析C语言

添加时间:2013-12-7
    相关阅读: C语言

 #include <stdlib.h> #include <stdio.h>

  int main()

  { int m = 1;int * p;int * q;p = &m;q = p;*p = 2;*q = 3;return 0;} view plain(gdb) disassemble main Dump of assembler code for function main:0x08048394 <+0>:     push   %ebp 0x08048395 <+1>:     mov    %esp,%ebp 0x08048397 <+3>:     sub    $0x10,%esp view plain 0x0804839a <+6>:     movl   $0x1,-0xc(%ebp)

  view plain 0x080483a1 <+13>:    lea    -0xc(%ebp),%eax 0x080483a4 <+16>:    mov    %eax,-0x4(%ebp)

  view plain 0x080483a7 <+19>:    mov    -0x4(%ebp),%eax 0x080483aa <+22>:    mov    %eax,-0x8(%ebp)

  view plain 0x080483ad <+25>:    mov    -0x4(%ebp),%eax 0x080483b0 <+28>:    movl   $0x2,(%eax)

  view plain 0x080483b6 <+34>:    mov    -0x8(%ebp),%eax 0x080483b9 <+37>:    movl   $0x3,(%eax)

  view plain 0x080483bf <+43>:    mov    $0x0,%eax view plain 0x080483c4 <+48>:    leave 0x080483c5 <+49>:    ret End of assembler dump.(gdb)

 

咨询热线:020-85648757 85648755 85648616 0755-27912581 客服:020-85648756 0755-27912581 业务传真:020-32579052
广州市网景网络科技有限公司 Copyright◎2003-2008 Veelink.com. All Rights Reserved.
广州商务地址:广东省广州市黄埔大道中203号(海景园区)海景花园C栋501室
= 深圳商务地址:深圳市宝源路华丰宝源大厦606
研发中心:广东广州市天河软件园海景园区 粤ICP备05103322号 工商注册