delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/10/06/22:58:55

Message-ID: <006401bf106f$5d63d060$0100a8c0@pcpablo>
From: "Pablo M. Dotro" <pyd AT sion DOT com>
To: <djgpp AT delorie DOT com>
Subject: Portable code for accessing the hardware ports under DOS and Linux
Date: Wed, 6 Oct 1999 23:54:57 -0300
MIME-Version: 1.0
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.00.2314.1300
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300
Reply-To: djgpp AT delorie DOT com

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)



- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019