This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Segmentation fault problem with C & Inline Assembly code
- From: MaaSTaaR <MaaSTaaR at gmail dot com>
- To: gcc-help at gcc dot gnu dot org
- Date: Wed, 16 Aug 2006 13:00:32 -0700 (PDT)
- Subject: Segmentation fault problem with C & Inline Assembly code
Hello ...
Firstly sorry for my bad English , i have this code :
void print()
{
char massege = 'H';
char t;
asm("movb $0x0E,%ah");
asm("movb %0,%%al"
: //"=r"(t)
: "r"(massege)
);
asm("int $0x10");
}
int main()
{
print();
}
it's compiled without any problem , but when i want to run the programme
it's show for me segmentation fault problem , so what is the error in this
code?
--
View this message in context: http://www.nabble.com/Segmentation-fault-problem-with-C---Inline-Assembly-code-tf2117460.html#a5839477
Sent from the gcc - Help forum at Nabble.com.