Board index » delphi » Writing to an I/O port (20c) with Delphi (32.bit)

Writing to an I/O port (20c) with Delphi (32.bit)

I'm trying to develop an app that will control my Radio Reveal FM adapter
The adapter is controlled by sending commands to I/O port 20c
(alternatively 30f)

Is there a way to acces that port directly (32-bit app for Win95) or is
there a component or vxd that will let me do that?  There is a 16-bit DLL i
could use, but thunking just plain scares me :-)

Thankful for any information...
--

- Aarto Reponen -

EMail     :aarto.repo...@mbox301.swipnet.se
HTTP      :http://www.algonet.se/~aarto
Voicemail :Aa...@pub1.ipn.vocaltec.com

 

Re:Writing to an I/O port (20c) with Delphi (32.bit)


In article <01bc3cfb$6f83d5a0$3d4af...@Compaq-120.SAMBANET.HOME>, "Aarto Reponen" <aarto.repo...@mbox301.swipnet.se> wrote:

Quote
>I'm trying to develop an app that will control my Radio Reveal FM adapter
>The adapter is controlled by sending commands to I/O port 20c
>(alternatively 30f)

>Is there a way to acces that port directly (32-bit app for Win95) or is
>there a component or vxd that will let me do that?  There is a 16-bit DLL i
>could use, but thunking just plain scares me :-)

>Thankful for any information...

Look at any of the Delphi FAQ's and on various sites that show you the
assembly needed to access ports under Win95.

BTW, your other alternative radio card address should be 30C, not 30F. I've
done what you are planning on doing with the Reveal card, unfortunately I
never did get a full command set on what that card can do.

Joel

Re:Writing to an I/O port (20c) with Delphi (32.bit)


darksoft <darks...@ripco.com> wrote in article
<5hm67l$5k...@gail.ripco.com>...

Quote
> In article <01bc3cfb$6f83d5a0$3d4af...@Compaq-120.SAMBANET.HOME>, "Aarto
Reponen" <aarto.repo...@mbox301.swipnet.se> wrote:
> >I'm trying to develop an app that will control my Radio Reveal FM
adapter
> >The adapter is controlled by sending commands to I/O port 20c
> >(alternatively 30f)

> Look at any of the Delphi FAQ's and on various sites that show you the
> assembly needed to access ports under Win95.

That was my first step..  alas, i failed miserably

Quote

> BTW, your other alternative radio card address should be 30C, not 30F.
I've
> done what you are planning on doing with the Reveal card, unfortunately I
> never did get a full command set on what that card can do.

I'm confident that once i know how to access that cursed I/O address, i
will be able to find out the commands  (there is only a few of them)

Thanks for your response.. If you still have some code left from your
eperience, i'd be more than glad to take a look at it :-)

--

- Aarto Reponen -

EMail     :aarto.repo...@mbox301.swipnet.se
HTTP      :http://www.algonet.se/~aarto
Voicemail :Aa...@pub1.ipn.vocaltec.com

Re:Writing to an I/O port (20c) with Delphi (32.bit)


In article <01bc3d3f$4fbf43a0$0100a...@Compaq-120.SAMBANET.HOME>, "Aarto Reponen" <aarto.repo...@mbox301.swipnet.se> wrote:

Quote

>darksoft <darks...@ripco.com> wrote in article
><5hm67l$5k...@gail.ripco.com>...
>> In article <01bc3cfb$6f83d5a0$3d4af...@Compaq-120.SAMBANET.HOME>, "Aarto
>Reponen" <aarto.repo...@mbox301.swipnet.se> wrote:
>> >I'm trying to develop an app that will control my Radio Reveal FM
>adapter
>> >The adapter is controlled by sending commands to I/O port 20c
>> >(alternatively 30f)

>> Look at any of the Delphi FAQ's and on various sites that show you the
>> assembly needed to access ports under Win95.

>That was my first step..  alas, i failed miserably

>> BTW, your other alternative radio card address should be 30C, not 30F.
>I've
>> done what you are planning on doing with the Reveal card, unfortunately I

>> never did get a full command set on what that card can do.

>I'm confident that once i know how to access that cursed I/O address, i
>will be able to find out the commands  (there is only a few of them)

>Thanks for your response.. If you still have some code left from your
>eperience, i'd be more than glad to take a look at it :-)

Here's the portin and port out commands I use:

  function portin(ioaddr : WORD) : BYTE;
  begin
     asm
        mov dx,ioaddr
        in al,dx
        mov result, al
     end;
  end;

  procedure portout(ioaddr : WORD; data : BYTE);
  begin
     asm
        mov dx,ioaddr
        mov al,data
        out dx,al
     end;
  end;

Email if you can't figure this out.

Joel

Other Threads