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-22 20:57:07
|
Sorry, but normally you can't have a portable way of accessing I/O ports, since I/O ports are handled by the OS drivers. For some special ports, such as COM, LPT, the OS have reasonable high-level access methods that wxWindows etc may use to support portable applications. For the majority of ports - such as data acquisition boards, sound cards etc, you normally have to write dedicated low-level drivers for the access. There are a couple of companies that sells multi-platform driver SDK tools, where they supply a low-level assembler part for different OS, and you write a higher-level C/C++ "busines-logic" for the hardware. Thereby, you don't have to know everything about the different operating systems. Old data acquisition software written for MsDos, Win 3.1, Win95, Win98 etc are designed for a situation where there either doesn't exist a memory management unit or no privileged CPU instructions, or where the operating system gives carte blanche and allows a relatively free read/write in the IO and expansion board memory address spaces. This means that the doesn't make use of device drivers, but instead perform port IO or memory operations directly to the hardware. To get such a software to work on a new OS, without rewriting the software, would require the OS exception handler to catch illegal memory and IO accesses and depending on source and/or target perform the same operation instead, and then return the result to the application as if the application had done it itself. Such emulation creates a HUGE overhead meaning that it's only meaningful to even think about it for low-speed devices. /Per W On Wed, 22 Jan 2003, Santiago Palmier Campos wrote: > Hi *, > > You can consider porting your app to wxWindows, it is not only a GUI > library, it is a complete portable framework. > You can use the latest wxWindows stable release (2.4.0) and wxCTB > communications package by Joachim Buermann (http://www.iftools.com/), it = is > not GUI based so it can be used in console apps. > > It's an "easy" way to have a portable app that accesses I/O ports... > > Regards, > Santy > > -----Original Message----- > From: Flameeyes [mailto:dap...@li...] > Sent: mi=E9rcoles, 22 de enero de 2003 19:09 > To: dev...@li... > Subject: Re: [Dev-C++] _outp & _inp under windows 2000 > > > Mark Smith wrote: > > I have some data acquisition software which runs OK on win98 but > > because you cannot address the hardware directly with win 2000 it wont > > work, It is a console based application, is there an easy way for me > > to modify the code so it will run under win 2000? > I think that you can't. > Only SYSTEM level software can access directly the I/O ports, all other > software can only open it as a file [and is not a great method, i tried > it for one program]. > > -- > Flameeyes > > > > ------------------------------------------------------- > This SF.net email is sponsored by: Scholarships for Techies! Can't afford= IT > training? All 2003 ictp students receive scholarships. Get hands-on train= ing > in Microsoft, Cisco, Sun, Linux/UNIX, and more. > www.ictp.com/training/sourceforge.asp > _______________________________________________ > Dev-cpp-users mailing list > Dev...@li... > TO UNSUBSCRIBE: http://www.noicys.cjb.net/devcpp/ub.htm > https://lists.sourceforge.net/lists/listinfo/dev-cpp-users > -------------------------------------------------------------------------= ------------- > This message and any files transmitted with it are confidential and inten= ded solely > for the use of the individual or entity to whom they are addressed. No co= nfidentiality > or privilege is waived or lost by any wrong transmission. > If you have received this message in error, please immediately destroy it= and kindly > notify the sender by reply email. > You must not, directly or indirectly, use, disclose, distribute, print, o= r copy any > part of this message if you are not the intended recipient. Opinions, con= clusions and > other information in this message that do not relate to the official busi= ness of > Ydilo Advanced Voice Solutions, S.A. shall be understood as neither given= nor endorsed by it. > -------------------------------------------------------------------------= ------------- > > > ------------------------------------------------------- > This SF.net email is sponsored by: Scholarships for Techies! > Can't afford IT training? All 2003 ictp students receive scholarships. > Get hands-on training in Microsoft, Cisco, Sun, Linux/UNIX, and more. > www.ictp.com/training/sourceforge.asp > _______________________________________________ > Dev-cpp-users mailing list > Dev...@li... > TO UNSUBSCRIBE: http://www.noicys.cjb.net/devcpp/ub.htm > https://lists.sourceforge.net/lists/listinfo/dev-cpp-users > |