Segmentation fault problem with C & Inline Assembly code

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux