RE: [Dev-C++] _outp & _inp under windows 2000
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
|
From: Santiago P. C. <San...@yd...> - 2003-01-23 09:55:02
|
Hi Per, Mark and *, I know that there is no portable way for __low-level__ access to I/O port= s due to OSes differences, but I thought we were talking about some kind of= __high-level__ I/O port access... BTW, it seems to me that we were talking about accesing 'common' I/O port= s: COM, LPT... from a console program, not creating a low level access drive= r for any OS nor accessing special/rare/propietary data acquisition HW, weren't we? So that's why the wxCTB exists, it is not a device driver but an attempt = to create a portable __high-level__ (like the rest of wxWindows itself and i= ts contribs) communications package.=20 We must say that, like all free/open source/etc projects, it is still bei= ng actively developed, so while being completely functional for a lot of situations, it is not complete by now... Anyway, this library (provided as a contrib package for wxWindows) uses internally separate low-level access code for Windows & Linux (the only 2= platfforms currently supported), but provides an external 'common' unique= interface for high-level access, that's why I think it would be a good solution ;o) OTOH, it seems to me that the app is accessing (from a high-level approac= h) a 'common' I/O port (probably a serial one) because Mark Smith has the source code of the 'data acquisition SW', don't you think so? It would be= very strange to have the source code of an app that accesses some propiet= ary interfaces or special device drivers... So the real question is: What kind of I/O port does Mark Smith really nee= d to access? And how? ;o? Best regards, ~Santy -----Original Message----- From: Per Westermark [mailto:pw...@ia...]=20 Sent: mi=E9rcoles, 22 de enero de 2003 22:53 To: Santiago Palmier Campos Cc: 'Flameeyes'; dev...@li... Subject: RE: [Dev-C++] _outp & _inp under windows 2000 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-lev= el access methods that wxWindows etc may use to support portable application= s. For the majority of ports - such as data acquisition boards, sound cards etc, you normally have to write dedicated low-level drivers for the acces= s. There are a couple of companies that sells multi-platform driver SDK tool= s, where they supply a low-level assembler part for different OS, and you wr= ite 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 et= c 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= =20IO and expansion board memory address spaces. This means that the doesn't ma= ke 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 softwar= e, 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 applicat= ion had done it itself. Such emulation creates a HUGE overhead meaning that i= t'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=20 > library, it is a complete portable framework. You can use the latest=20 > wxWindows stable release (2.4.0) and wxCTB communications package by=20 > Joachim Buermann (http://www.iftools.com/), it is not GUI based so it=20 > 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=20 > > because you cannot address the hardware directly with win 2000 it=20 > > wont work, It is a console based application, is there an easy way=20 > > 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=20 > other software can only open it as a file [and is not a great method,=20 > i tried it for one program]. > > -- > Flameeyes > > > > ------------------------------------------------------- > This SF.net email is sponsored by: Scholarships for Techies! Can't=20 > afford IT training? All 2003 ictp students receive scholarships. Get=20 > hands-on training in Microsoft, Cisco, Sun, Linux/UNIX, and more.=20 > 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 intended solely > for the use of the individual or entity to whom they are addressed. No confidentiality > 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,= =20or copy any > part of this message if you are not the intended recipient. Opinions, conclusions and > other information in this message that do not relate to the official business of > Ydilo Advanced Voice Solutions, S.A. shall be understood as neither giv= en nor endorsed by it. > -------------------------------------------------------------------------= --- ---------- > > > ------------------------------------------------------- > This SF.net email is sponsored by: Scholarships for Techies! Can't=20 > afford IT training? All 2003 ictp students receive scholarships. Get=20 > hands-on training in Microsoft, Cisco, Sun, Linux/UNIX, and more.=20 > 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=20 for the use of the individual or entity to whom they are addressed. No co= nfidentiality=20 or privilege is waived or lost by any wrong transmission.=20 If you have received this message in error, please immediately destroy it= =20and kindly=20 notify the sender by reply email. You must not, directly or indirectly, use, disclose, distribute, print, o= r copy any=20 part of this message if you are not the intended recipient. Opinions, con= clusions and=20 other information in this message that do not relate to the official busi= ness of=20 Ydilo Advanced Voice Solutions, S.A. shall be understood as neither given= =20nor endorsed by it.=20 -------------------------------------------------------------------------= ------------- |