This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]