Quantcast
Channel: executing assembly code in c - Stack Overflow
Viewing all articles
Browse latest Browse all 6

executing assembly code in c

$
0
0

I want to know if there is a way of calling in a .c assembly code?I want to put this code in my .c file

The assembly code i want to execute in .c file to return the address

1. mov eax, 0x2d2. mov ebx, 03. int 0x80

I know the answer is put eax.

This is the part of .c file:

1. void function(void)2. {3. void *sp;4. sp = eax;5. fprintf(stderr, "system break:   %p\n", sp);6. }

How can I do it?


Viewing all articles
Browse latest Browse all 6

Latest Images

Trending Articles





Latest Images