Board index » delphi » Accessing hardware I/O from delphi2

Accessing hardware I/O from delphi2

Hello !

Please help, does anyone know if its possible to use a 16 bit DLL
created from Delphi 1.0 which uses Port[xxxx] commands within
Delphi 2.0 ?

As Delphi 2.0 does not support Port[xxxx] instruction for I/O
acces.

B.Rgds
Peter Weichel / Denmark

 

Re:Accessing hardware I/O from delphi2


Quote
Peter Weichel wrote:

> Please help, does anyone know if its possible to use a 16 bit DLL
> created from Delphi 1.0 which uses Port[xxxx] commands within
> Delphi 2.0 ?

> As Delphi 2.0 does not support Port[xxxx] instruction for I/O
> acces.

I doubt it. The limit is Win95/WinNT, not actually Delphi. You'll
need a VxD.

M.

--
Martin Larsson, author of several unknown utilities for DOS and Windows.
mailto:martin.lars...@delfi-data.msmail.telemax.no
http://www.delfi.infonet.no
X.400:G=martin;S=larsson;O=delfi-data;P=msmail;A=telemax;C=no

Re:Accessing hardware I/O from delphi2


I can't answer your 16-bit question, but have been trying to
emulate Port[...] in 32-bit.
I received some asm code from Michael Day (Team-B) in CompuServe
Delphi32 forum. He pointed out that many device drivers trap direct
port reads/writes and it probably won't work. It didn't!
Apparently Port[] was removed because it can no longer work.
--
John Hall / Digital Magic

Re:Accessing hardware I/O from delphi2


Re Port[...] emulation...
OOPS- it DOES work! I screwed up in implementing it.
--
John Hall / Digital magic

Re:Accessing hardware I/O from delphi2


Reposted article:

From: robe...@ishtar.med.jhu.edu (Dale Roberts)
Newsgroups: comp.os.ms-windows.programmer.nt.kernel-mode
Subject: Re: Direct I/O with NT,  It's Possible!
Date: 23 Apr 1996 05:32:11 GMT
Organization: Johns Hopkins University

Just so everyone knows, a ZIP archive with source and executables is now on
the DDJ FTP server at:

   ftp://ftp.mv.com/pub/ddj/1996/1996.05/directio.zip

It was put up *after* the issue came out (sorry!!) so some who checked the
site early may have missed it.

BE AWARE that applications that use serial ports almost always use interrupts.  
As the article mentions, the direct I/O technique ONLY affects port I/O
access, and doesn't help with interrupts.  I have tried running TELIX (a DOS
COMM program) with direct I/O enabled, and it DOES NOT WORK.  But it works
just fine under an NT DOS window without the direct I/O (very fast, no dropped
characters, multitasking works fine, etc.).  So, depending on the needs of
your DOS COMM software, it may run just fine under NT's virtual DOS drivers.

Unfortunately, direct I/O isn't a magic cure-all for running DOS programs
under NT.  As always, though, I'd be interested to hear of any experiences
people have in this area.

dale

Other Threads