Board index » delphi » Hardware access with Delphi/C++Builder

Hardware access with Delphi/C++Builder

Hi!

I'm interested in writing port programming with C++Builder.
Could someone tell me whether it is possible to access ports or
hardware IRQs from C++Builder/Delphi?
Is it only possible if I use ASM keyword and compile it with tasm32?

Thanx a lot...
Attila

 

Re:Hardware access with Delphi/C++Builder


Quote
Juhsz Attila wrote:

> Hi!

> I'm interested in writing port programming with C++Builder.
> Could someone tell me whether it is possible to access ports or
> hardware IRQs from C++Builder/Delphi?
> Is it only possible if I use ASM keyword and compile it with tasm32?

> Thanx a lot...
> Attila

You can use the __emit__ keyword to do port I/O.  The code is on the
Knowledge Base page on my web site.  To use TASM you must install the
BCB patch which is publicly available on the Borland Site.
--
        B. Sturk

Curator of the 'Unofficial Homepage for Borland C++ Builder'
http://www.nh.ultranet.com/~bsturk

'Whatever happened to Pong?' -- Frank Black (The Pixies)

Re:Hardware access with Delphi/C++Builder


B. Sturk <bst...@nh.ultranet.com> wrote in article
<33623B76.5...@nh.ultranet.com>...
[]

Quote
> You can use the __emit__ keyword to do port I/O.  The code is on the
> Knowledge Base page on my web site.  To use TASM you must install the
> BCB patch which is publicly available on the Borland Site.

I looked carefully for this 'patch' but found no reference to it.
--
Grace + Peace   *   Peter N Roth  *   Engineering Objects International
Author of "C++ Jump Start" ISBN 0-9655862-2-7.
Tools for Developers: ClassBuilder 4 for Delphi, ClassBuilder++ for C++
Visit our website at http://www.inconresearch.com/eoi

Re:Hardware access with Delphi/C++Builder


On Sat, 26 Apr 1997 19:00:44 +0200, "=?iso-8859-1?Q?Juh=E1sz?= Attila"

Quote
<juha...@ludens.elte.hu> wrote:
>Hi!

>I'm interested in writing port programming with C++Builder.
>Could someone tell me whether it is possible to access ports or
>hardware IRQs from C++Builder/Delphi?
>Is it only possible if I use ASM keyword and compile it with tasm32?

Attila,

The valuable access to the hardware is possible only from drivers
(VxD under Win95 or kernel-mode driver under NT).
You can use an existing component for access to the equipment

http://www.entechtaiwan.com/tools.htm

This component has drivers and works for Delphi 2, Delphi 3 and
C++Builder under both Windows 95 and Windows NT.

Regards,
Victor Ishikeev

Re:Hardware access with Delphi/C++Builder


Quote
"=?iso-8859-1?Q?Juh=E1sz?= Attila" <juha...@ludens.elte.hu> wrote:
>Hi!
>I'm interested in writing port programming with C++Builder.
>Could someone tell me whether it is possible to access ports or
>hardware IRQs from C++Builder/Delphi?
>Is it only possible if I use ASM keyword and compile it with tasm32?
>Thanx a lot...
>Attila

This appears to be a major problem under win32. Some people seem to
get hw access under w95, on my machine asm definitely doesn't work.
Apparaently under NT all hw access is virtualised away. On the delphi
super page there is a driver for hardware called HWPORT95.
I have not tried it. I have chosen to use serial port handshake lines,
for which there is driver support already in both OS's

simon

Re:Hardware access with Delphi/C++Builder


Quote
Peter N Roth wrote:

> B. Sturk <bst...@nh.ultranet.com> wrote in article
> <33623B76.5...@nh.ultranet.com>...
> []
> > You can use the __emit__ keyword to do port I/O.  The code is on the
> > Knowledge Base page on my web site.  To use TASM you must install the
> > BCB patch which is publicly available on the Borland Site.

> I looked carefully for this 'patch' but found no reference to it.
> --
> Grace + Peace   *   Peter N Roth  *   Engineering Objects International
> Author of "C++ Jump Start" ISBN 0-9655862-2-7.
> Tools for Developers: ClassBuilder 4 for Delphi, ClassBuilder++ for C++
> Visit our website at http://www.inconresearch.com/eoi

The patch is on the BCB CD in the TASM directory and on the Borland
site.  Did you do a search on patch and tasm?  I don't have the page
bookmarked but I did find it by searching on those two words I think...
:]
--
        Brian Sturk

Curator of the 'Unofficial Homepage for Borland C++ Builder'
http://www.nh.ultranet.com/~bsturk

'Whatever happened to Pong?' -- Frank Black (The Pixies)

Re:Hardware access with Delphi/C++Builder


Quote
s.brid...@auckland.ac.nz wrote:

> "=?iso-8859-1?Q?Juh=E1sz?= Attila" <juha...@ludens.elte.hu> wrote:

> >Hi!

> >I'm interested in writing port programming with C++Builder.
> >Could someone tell me whether it is possible to access ports or
> >hardware IRQs from C++Builder/Delphi?
> >Is it only possible if I use ASM keyword and compile it with tasm32?

> >Thanx a lot...
> >Attila

> This appears to be a major problem under win32. Some people seem to
> get hw access under w95, on my machine asm definitely doesn't work.
> Apparaently under NT all hw access is virtualised away. On the delphi
> super page there is a driver for hardware called HWPORT95.
> I have not tried it. I have chosen to use serial port handshake lines,
> for which there is driver support already in both OS's

> simon

Using inline assembly or the __emit__keyword is a quick and dirty
solution rather than writing a device driver. But in 95 I have no
problem with direct port I/O.
--
        Brian Sturk

Curator of the 'Unofficial Homepage for Borland C++ Builder'
http://www.nh.ultranet.com/~bsturk

'Whatever happened to Pong?' -- Frank Black (The Pixies)

Re:Hardware access with Delphi/C++Builder


Quote
Victor Ishikeev wrote:

> On Sat, 26 Apr 1997 19:00:44 +0200, "=?iso-8859-1?Q?Juh=E1sz?= Attila"
> <juha...@ludens.elte.hu> wrote:

> >Hi!

> >I'm interested in writing port programming with C++Builder.
> >Could someone tell me whether it is possible to access ports or
> >hardware IRQs from C++Builder/Delphi?
> >Is it only possible if I use ASM keyword and compile it with tasm32?

> Attila,

> The valuable access to the hardware is possible only from drivers
> (VxD under Win95 or kernel-mode driver under NT).
> You can use an existing component for access to the equipment

> http://www.entechtaiwan.com/tools.htm

> This component has drivers and works for Delphi 2, Delphi 3 and
> C++Builder under both Windows 95 and Windows NT.

> Regards,
> Victor Ishikeev

It tried installing this with C++ Builder and it failed when compiling.
Any ideas why?
--
        Brian Sturk

Curator of the 'Unofficial Homepage for Borland C++ Builder'
http://www.nh.ultranet.com/~bsturk

'Whatever happened to Pong?' -- Frank Black (The Pixies)

Re:Hardware access with Delphi/C++Builder


On Sun, 27 Apr 1997 11:50:31 -0400, "B. Sturk"

Quote
<bst...@nh.ultranet.com> wrote:
>Victor Ishikeev wrote:

>> The valuable access to the hardware is possible only from drivers
>> (VxD under Win95 or kernel-mode driver under NT).
>> You can use an existing component for access to the equipment

>> http://www.entechtaiwan.com/tools.htm

>> This component has drivers and works for Delphi 2, Delphi 3 and
>> C++Builder under both Windows 95 and Windows NT.

>It tried installing this with C++ Builder and it failed when
compiling.
>Any ideas why?

My apologies. I have forgotten that shareware has not sources (*.pas).
For desiring I can transfer hw_32.obj and hw_32.hpp via e-mail.

Victor Ishikeev

Other Threads