#include<stdio.h>
void fun()
{
int a [2];
int ebp, esp;
asm
("movl %%ebp, %0; movl %%esp, %1"
:"=r" (ebp),"=r" (esp)
:
);
printf("address of array a is %0x\n", a);
printf("address of ebp is %0x, esp is %0x\n", ebp, esp);
}
int main()
{
printf("start calling\n");
fun();
printf("end calling \n");
void fun()
{
int a [2];
int ebp, esp;
asm
("movl %%ebp, %0; movl %%esp, %1"
:"=r" (ebp),"=r" (esp)
:
);
printf("address of array a is %0x\n", a);
printf("address of ebp is %0x, esp is %0x\n", ebp, esp);
}
int main()
{
printf("start calling\n");
fun();
printf("end calling \n");