gcc problem [SOLVED]

Started by kko, September 13, 2013, 12:06:29 PM

Previous topic - Next topic

kko

Hi, everyone...

i have a little problem with my studies about exploitation...

i have to create this executable to know the value of my esp

___________________________________
#include <stdio.h>

unsigned int get_sp(void)

{

   asm("mov1 %esp, %eax") ; // i tried also __asm__("mov1 %esp, %eax")

}

int main ()

{

printf ("Stack pointer  (ESP) : 0x%x\n", get_sp() ) ;

}

_____________________________________________

but when i try to compile this with gcc...

#gcc -o  get_sp ./get_sp.c

i receive this message error...

./get_sp.c: Assembler messages:
./get_sp.c:6: Error: no such instruction: `mov1 %esp,%eax'

I tried to find a solution in google and in my books , but no idea... and no solution... it seem all ok; no syntax errors...

b4d_bl0ck

kko,
that's MOVL not MOV1 ;D

Happy studying...
bool secure = check_paranoia() ? true : false;

kko

ah ah ah ah ah ah ok...

this is the first thing i thought.... but also i thought :"it's not possible... it's too stupid... i read 1 not L..."

you are right, in the book it's not so evident the difference between low L and 1..


thanks :-)