From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (qmail 23158 invoked from network); 17 Apr 1998 17:54:20 -0000 Received: from newsgw.mentorg.com (192.94.38.66) by mail2.redhat.com with SMTP; 17 Apr 1998 17:54:20 -0000 Received: from em-wv03.wv.mentorg.com by newsgw.mentorg.com (8.8.8/CF5.40F) id KAA09281; Fri, 17 Apr 1998 10:51:58 -0700 (PDT) Received: from drdoom.wv.mentorg.com by em-wv03.wv.mentorg.com (8.7.5/CF5.38R) id KAA02144; Fri, 17 Apr 1998 10:51:55 -0700 (PDT) Received: from drdoom by drdoom.wv.mentorg.com (8.7.1/CF5.23L) id KAA17854; Fri, 17 Apr 1998 10:51:54 -0700 (PDT) Message-Id: <199804171751.KAA17854@drdoom.wv.mentorg.com> To: axp-list@redhat.com cc: steve_dum@mentorg.com Subject: io port programming on alpha on redhat 5.0 Date: Fri, 17 Apr 1998 10:51:54 -0700 From: Steve Dum Is anyone doing any io programming on the alpha. I tried a simple test - map in the parallel port and try to read a register. My simple test case ran just fine on x86 redhat 5.0 On axp, I couldn't find a set of headers that I could include because the files like and are incompatible with things like - so I ended up just cuting and pasting the necessary definitions. But even then, I immediately get a segfault in ioperm(). Does anyone have a simple example that runs on Redhat 5.0? Here is esentially what I tried (c++). ----------------------------------------------------------- #include #include extern "C" void _outb (unsigned char b,unsigned long port); extern "C" int ioperm (unsigned long int __from, unsigned long int __num, int __turn_on); int base = 0x378; int main() { if (ioperm(base,3,1)<0) { cout << "unable to access port 0x"<< hex << base << endl; exit (1); } int status = inb(base+1); cout << "Status for lp port 0x" << hex << base << endl; } --------------------------------------------------------------- -------------- Stephen Dum steve_dum@mentorg.com (503)-685-7743 Mentor Graphics Corp. 8005 S.W. Boeckman Rd. Wilsonville, Or 97070-7777