Message-ID: <37FC2F37.65685249@crosswinds.net> From: Ishpeck Organization: Lunaticnologies X-Mailer: Mozilla 4.6 [en] (X11; I; Linux 2.2.9-19mdk i686) X-Accept-Language: en MIME-Version: 1.0 Newsgroups: comp.os.msdos.djgpp Subject: Re: Portable code for accessing the hardware ports under DOS and Linux References: <006401bf106f$5d63d060$0100a8c0 AT pcpablo> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Lines: 42 NNTP-Posting-Host: 192.41.91.205 X-Trace: typ12.nn.bcandid.com 939274014 192.41.91.205 (Thu, 07 Oct 1999 01:26:54 EDT) NNTP-Posting-Date: Thu, 07 Oct 1999 01:26:54 EDT Date: Wed, 06 Oct 1999 23:27:19 -0600 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com Handling the ports directly under Linux is somewhat tedious. You can use libraries that handle all the sockets information you'll need. DJGPP has some networking libraries for it too. "Pablo M. Dotro" wrote: > > Hi to all! > > I am creating a special made data adquisition software for one of the > Physics labs of the university in which I work, and I have a mixed DOS/Win95 > and Linux network. My idea is to create a software that has to have the same > look and feel under DOS and under Linux (probably using ncurses or sth. like > that). > So I decided to use DJGPP for the DOS/Win95 machines and the GCC of my > RedHat 5.2 in the others. As far as I know, under DOS there are a couple of > functions (inportb() and outportb() ) which handle the access to the > hardware ports (I need to access port 0x220), but I do not know if they work > under Linux... I've tested, and they do not seem ot exist under Linux, so > either I have to use some other function or I need to add another include > file under my Linux project. > Does anyone knows if there is a protable way to access hardware ports > (without assembler)? Are there any standard functions to do this? > > Thanks in advance! > > Pablo M. Dotro > pyd AT sion DOT com pdotro AT USSEnterprise DOT com > pdotro AT labs DOT df DOT uba DOT ar ICQ#: 18144918 > http://www.usuarios.sion.com/abismo > > ----- BEGIN GEEK CODE BLOCK ----- > Version 3.12 > GCS/S/IT/CM d- s: a22 c++$ UL P+ E W++ N++ o K- w > O? M V? PS PE- Y+ PGP>+ t++ 5+ X+ R+>+++ tv b++ DI? D++ > G++ e h! r- y+ > -----END GEEK CODE BLOCK ----- > (para decodificar, visite www.geekcode.com) -- Those who seek enlightenment may turn to Ishpeck the wise. http://come.to/ishpeck/