syscall from within GCC inline assembly
Posted
by guest
on Stack Overflow
See other posts from Stack Overflow
or by guest
Published on 2010-06-02T13:44:17Z
Indexed on
2010/06/02
14:23 UTC
Read the original article
Hit count: 280
is it possible to write a single character using a syscall from within an inline assembly block? if so, how? it should look "something" like this:
__asm__ __volatile__
(
" movl $1, %%edx \n\t"
" movl $80, %%ecx \n\t"
" movl $0, %%ebx \n\t"
" movl $4, %%eax \n\t"
" int $0x80 \n\t"
::: "%eax", "%ebx", "%ecx", "%edx"
);
$80 is 'P' in ascii, but that returns nothing.
any suggestions much appreciated!
© Stack Overflow or respective owner