test

C code posted
created at 12 Feb 03:54, updated at 09 May 02:08

Edit | Back
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#include <stdio.h>


void stack(int i) {
  unsigned int j;
  printf("%3d: %X\n", i, &j);


        asm ("movl %%esp, %0;"
             :"=r"(j)        /* output */
             :         /* input */
             );       


  printf("+%2d: %X\n", i, j);
  
  if (i > 0) {
    --i;
    stack(i);
  }
}

int main() 
{
  stack(10);
}
340 Bytes in 3 ms with coderay