test

  1     .file   "test.c"
  2     .section    .rodata
  3 .LC0:
  4     .string "address of i = %u\n"
  5 .LC1:
  6     .string "input please"
  7 .LC2:
  8     .string "%d"
  9 .LC3:
 10     .string "%d\n"
 11     .text
 12 .globl main
 13     .type   main, @function
 14 main:
 15     leal    4(%esp), %ecx
 16     andl    $-16, %esp
 17     pushl   -4(%ecx)
 18     pushl   %ebp
 19     movl    %esp, %ebp
 20     pushl   %ecx
 21     subl    $36, %esp
 22     leal    -5(%ebp), %eax
 23     leal    -12(%ebp), %edx
 24     subl    %edx, %eax
 25     movl    %eax, 4(%esp)
 26     movl    $.LC0, (%esp)
 27     call    printf
 28     movl    $0, -12(%ebp)
 29     jmp .L2
 30 .L3:
 31     movl    $.LC1, (%esp)
 32     call    puts
 33     leal    -5(%ebp), %eax
 34     movl    %eax, 4(%esp)
 35     movl    $.LC2, (%esp)
 36     call    scanf
 37     movl    -12(%ebp), %eax
 38     movl    %eax, 4(%esp)
 39     movl    $.LC3, (%esp)
 40     call    printf
 41     movl    -12(%ebp), %eax
 42     addl    $1, %eax
 43     movl    %eax, -12(%ebp)
 44 .L2:
 45     movl    -12(%ebp), %eax

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值