RE: [Dev-C++] _outp & _inp under windows 2000
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
|
From: Per W. <pw...@ia...> - 2003-01-23 20:37:10
|
Give a howl if you need some information from DrDobbs May -96. I't seems to the only one from that year I haven't in the bookshelf, but if need be, I should be able to locate the missing issue. /Per W On Thu, 23 Jan 2003, Mark Smith wrote: > In Original Message From: Santiago Palmier Campos > Santy wrote:............. > > What kind of I/O port does Mark Smith really need > to access? And how? > > > Well I'm using 2 cards (PC27E & PC214E) one a A2D & the other a DIO ( fr= om > Amplicon UK) on the ISA bus to control some lab equiptment and take > measurements. > I have written the control software myself using _inp & _outp and can set > the cards address by means of DIP switches on the cards. The console > application works fine but I am looking to future proof the software so i= t > could run also on a more recent windows platforms, it also means that I'm > forced to maintain it on a win98 machine. > I followed up Jaap de Wolff suggestion ( > http://www.beyondlogic.org/porttalk/porttalk.htm ) and took a look at > porttalk, though I have not tried it yet, it looks exactly like what I'm > after and also gives me a way of modifying my source code to achieve the > same functionality. (I'm an old fashioned DOS based programmer & no nothi= ng > about windows API :=AD~( ) > The article states:------------- > Talking to the Device Driver - User Mode APIs > > PortTalk also has IOCTLs to allow reading and writing to I/O Ports. In th= is > case, your usermode program would open the PortTalk device driver and pas= s > data to the driver through IOCTL calls. The driver then talks to the I/O > port(s) in ring 0. > > The Porttalk driver contains two IOCTL calls to read from and write to I/= O > Ports. A c source file, pt_iotcl.c can be used to provide easy support ba= sed > on the popular inportb/outportb and inp/outp calls supported in earlier > programming environments. By simply including pt_ioctl.c and calling > OpenPortTalk when you program starts and ClosePortTalk when your program > finishes you can have the functionality of the inportb/outportb and inp/o= utp > calls > -------------------- > > > > Regards > Mark > > --- > Outgoing mail is certified Virus Free. > Checked by AVG anti-virus system (http://www.grisoft.com). > Version: 6.0.406 / Virus Database: 229 - Release Date: 21/10/02 > > > > The information contained in this e-mail message (and a |