Quantcast
Channel: Active questions tagged gcc - Stack Overflow
Viewing all articles
Browse latest Browse all 22020

syscall from within GCC inline assembly [duplicate]

$
0
0

This question already has an answer here:

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!


Viewing all articles
Browse latest Browse all 22020

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>