I have written this little code :
#include<iostream>
#include<cstdio>
#include<sys/io.h>
using namespace std;
int main() {
unsigned char a;
cin >> a;
iopl(3);
outb(a, 0x378);
return 0;
} I want to send a signal to the lpt.I compile it without problems(i use gcc in fedora 14), but every time I run it, this message appear on the terminal:"Segmentation error (core dumped)".Anybody know a solution to the problem?