Re: [newbie] compile asm in C
On Wed, 10 Mar 2004 15:14:33 -0500 Chungwei Hsiung <[EMAIL PROTECTED]> wrote: > Hello guys > I have a question. I've seen things like that being done on some > articles, but somehow it doesn't work on my machine. If you know how to > solve this problem, please let me know. I really appreciate it. > I would like to know how to compile a C file when there are assembly > code in it like the following: > void main() { > __asm__(" > move $0x0, %ebx > move $0x1, %eax > int$0x80 > "); > } > I tried to compile it, and it doesn't work. Do I miss any library or > what can I do to resolve this problem??? > > btw, mine is MDK9.2 OK, Mandrake 9.2. I tried it like this and it compiled without errors. int main() { __asm__( "mov $0x0, %ebx\n" "mov $0x1, %eax\n" "int $0x80\n" ); return 0; } -- Len Lawrence Want to buy your Pack or Services from MandrakeSoft? Go to http://www.mandrakestore.com
Re: [newbie] compile asm in C
On Wed, 10 Mar 2004 15:14:33 -0500 Chungwei Hsiung <[EMAIL PROTECTED]> wrote: > Hello guys > I have a question. I've seen things like that being done on some > articles, but somehow it doesn't work on my machine. If you know how to > solve this problem, please let me know. I really appreciate it. > I would like to know how to compile a C file when there are assembly > code in it like the following: > void main() { > __asm__(" > move $0x0, %ebx > move $0x1, %eax > int$0x80 > "); > } > I tried to compile it, and it doesn't work. Do I miss any library or > what can I do to resolve this problem??? > > btw, mine is MDK9.2 OK, Mandrake 9.2. I tried it like this and it compiled without errors. int main() { __asm__( "mov $0x0, %ebx\n" "mov $0x1, %eax\n" "int $0x80\n" ); return 0; } -- Len Lawrence Want to buy your Pack or Services from MandrakeSoft? Go to http://www.mandrakestore.com
[newbie] compile asm in C
Hello guys I have a question. I've seen things like that being done on some articles, but somehow it doesn't work on my machine. If you know how to solve this problem, please let me know. I really appreciate it. I would like to know how to compile a C file when there are assembly code in it like the following: void main() { __asm__(" move $0x0, %ebx move $0x1, %eax int$0x80 "); } I tried to compile it, and it doesn't work. Do I miss any library or what can I do to resolve this problem??? btw, mine is MDK9.2 best regards, Chungwei Want to buy your Pack or Services from MandrakeSoft? Go to http://www.mandrakestore.com