From: daghakmy AT login DOT eunet DOT no (Dag Håkon Myrdal) Newsgroups: comp.os.msdos.djgpp Subject: Using inportb() Date: 14 Oct 1997 08:58:43 GMT Organization: EUnet Norway Lines: 32 Message-ID: <61vc83$565$1@elle.eunet.no> NNTP-Posting-Host: login.eunet.no To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk Hi, I have had problems reading and writing bytes from an Advantech PCL 711B labcard. Some old routines, written using EMX/gcc: _portaccess(0x220,0x230); /* allow use of port-addresses */ [... various setup...] _outp8(0x22C); /* write to SW trigger */ _inp8(0x225); /* read ADC value and status */ have been replaced by the following for djgpp v2.1: #include [...] outportb(0x22C); /* write to SW trigger */ inportb(0x225); /* read ADC value and status */ What happens is that the compiled program seems not to get in contact with the labcard. The status never changed when used as below. To me, the only obvious difference here is that I no longer explitly ask for access to the IO bus - is this not necessary with djgpp? I haven't seen this mentioned in the FAQ or the mailing list archives. Are there other "tricks" involved? Could the choice of DPMI host or options to go32 be the reason for the lack of contact? Grateful for input from anybody who have made similar arrangements work. Best regards Dag Håkon Myrdal