Segmentation fault problem with C & Inline Assembly code

MaaSTaaR MaaSTaaR@gmail.com
Wed Aug 16 22:51:00 GMT 2006


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.



More information about the Gcc-help mailing list