----- Original Message ----- From: Nigel Goodwin To: Sent: Thursday, December 28, 2000 2:42 AM Subject: Re: [PIC]: PIC data via PC parallel port to screen > In message <001101c0703c$70393580$260bf6cd@pc>, Olin Lathrop > writes > >> Any version of Delphi later than 1.0 (that is, any 32 bit version) > >> doesn't allow you to access the hardware directly (version 1.0 had the > >> Port() procedure) - so in order to do so you have to write a small piece > >> of in-line assembler code - this is freely available on the net, and > >> consists of a handful of op-codes. This then reads the port directly, > >> and doesn't wait for Windows to give permission - which is why it's not > >> included in 32 bit Delphi. > > > >This won't work on all versions of Win32, and is very hardware specific. > >The Win98 virtual machine might trap the reference and eventually do it for > >you, but addressing protected memory on NT simply won't work. > > Yes, it won't work on NT, you must use a driver (I use DLPortIO.DLL), > but it works fine under 95, 98, and ME. > > >The right way to do this is to write a parallel port device driver that > >performs the operations you want, then call it thru the official CreateFile, > >ReadFile, WriteFile, etc, interface. > > But that slows everything done massively, this thread was about reading > data via the parallel port being slow!. It won't be slow if the driver does more than a single port access per call to the driver. You need to write your own custom driver to do this. I did hear of a driver that would interpret a byte-code program that could be sent from the application, but I don't know if it really exists or what it is called. Bob Ammerman RAm Systems (contract development of high performance, high function, low-level software) -- http://www.piclist.com hint: PICList Posts must start with ONE topic: [PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads