Discussion:
COM port functionality (powerbasic program wrapped for use on XP)
(too old to reply)
DOS Guy
2009-06-10 00:46:56 UTC
Permalink
I'm working with a DOS app (written in PowerBasic) where two PC's are
communicating with each other over the com port. I open the ports at
115k-baud. Data is transfered mainly from one system to the other
(although there is some bi-directional coordination).

I get pretty close to the theoretical max transfer rate when both
systems have booted into DOS to run the app.

Now this app talks to some custom hardware in one of the PC's using some
machine code and i/o reads and writes. This app was made XP-compatible
by "wrapping" it in a port-mapper (I forget the name - port-talk I
think). This allows the app to function perfectly when running under
XP.

However, the serial communications aspect of the program functions
extremely poorly. At first I thought that XP was interfering with the
app's ability to talk to the com port via BIOS calls, but then I
realized that PowerBasic probably has it's own com port interface and
interrupt handler.

So, I'm wondering if anyone out there has any experience with a compiled
basic DOS app (powerbasic or otherwise) that performs serial I/O and
running such an app under win-XP.

Or if I'll have to poke more holes in the I/O permission table in order
to give the app full access to the serial ports - and how do I "remove"
XP's influence or control over the ports?
Sjouke Burry
2009-06-10 02:04:34 UTC
Permalink
Post by DOS Guy
I'm working with a DOS app (written in PowerBasic) where two PC's are
communicating with each other over the com port. I open the ports at
115k-baud. Data is transfered mainly from one system to the other
(although there is some bi-directional coordination).
I get pretty close to the theoretical max transfer rate when both
systems have booted into DOS to run the app.
Now this app talks to some custom hardware in one of the PC's using some
machine code and i/o reads and writes. This app was made XP-compatible
by "wrapping" it in a port-mapper (I forget the name - port-talk I
think). This allows the app to function perfectly when running under
XP.
However, the serial communications aspect of the program functions
extremely poorly. At first I thought that XP was interfering with the
app's ability to talk to the com port via BIOS calls, but then I
realized that PowerBasic probably has it's own com port interface and
interrupt handler.
So, I'm wondering if anyone out there has any experience with a compiled
basic DOS app (powerbasic or otherwise) that performs serial I/O and
running such an app under win-XP.
Or if I'll have to poke more holes in the I/O permission table in order
to give the app full access to the serial ports - and how do I "remove"
XP's influence or control over the ports?
Google for "userport.zip"
It should enable full port access.
Gerard Bok
2009-06-10 14:01:54 UTC
Permalink
Post by DOS Guy
I'm working with a DOS app (written in PowerBasic) where two PC's are
communicating with each other over the com port.
So, I'm wondering if anyone out there has any experience with a compiled
basic DOS app (powerbasic or otherwise) that performs serial I/O and
running such an app under win-XP.
When porting a DOS application to Win32 I found out, that
although the serial control stuff compiled without a single error
or warning, it didn't function at all ;-)
Reading some help subjects and adapting the syntax solved all
problems :-)
--
Kind regards,
Gerard Bok
DOS Guy
2009-06-11 00:11:02 UTC
Permalink
Post by Gerard Bok
Post by DOS Guy
So, I'm wondering if anyone out there has any experience with a
compiled basic DOS app (powerbasic or otherwise) that performs
serial I/O and running such an app under win-XP.
When porting a DOS application to Win32
I am NOT porting a DOS app to win32.

I am trying to run a DOS-compiled PowerBasic program in XP.
Sjouke Burry
2009-06-11 02:09:26 UTC
Permalink
Post by DOS Guy
Post by Gerard Bok
Post by DOS Guy
So, I'm wondering if anyone out there has any experience with a
compiled basic DOS app (powerbasic or otherwise) that performs
serial I/O and running such an app under win-XP.
When porting a DOS application to Win32
I am NOT porting a DOS app to win32.
I am trying to run a DOS-compiled PowerBasic program in XP.
So get userport.zip.
DOS Guy
2009-06-11 02:20:21 UTC
Permalink
Post by Sjouke Burry
Post by DOS Guy
I am trying to run a DOS-compiled PowerBasic program in XP.
So get userport.zip.
How does userport.zip handle hardware interrupts, such as those
generated by the com port?

If this app is going to work properly when run on XP, it must be allowed
to set up it's own interrupt handler and com port buffer as I presume it
does when it operates under DOS.

I see no reference to interupt handling in the userport documentation
file.
Sjouke Burry
2009-06-11 16:08:24 UTC
Permalink
Post by DOS Guy
Post by Sjouke Burry
Post by DOS Guy
I am trying to run a DOS-compiled PowerBasic program in XP.
So get userport.zip.
How does userport.zip handle hardware interrupts, such as those
generated by the com port?
If this app is going to work properly when run on XP, it must be allowed
to set up it's own interrupt handler and com port buffer as I presume it
does when it operates under DOS.
I see no reference to interupt handling in the userport documentation
file.
It opens port access , so that dostype software can
access ports without windows blocking the normally illegal
instructions.
DOS Guy
2009-06-11 20:19:53 UTC
Permalink
Post by Sjouke Burry
Post by DOS Guy
How does userport.zip handle hardware interrupts, such as those
generated by the com port?
It opens port access , so that dostype software can
access ports without windows blocking the normally illegal
instructions.
That doesn't answer my questions regarding the com port interrupt
handling.

Do any of those port-mapping or port-access utilities allow a DOS app
running under XP to set up it's own com port interrupt handler?

Access to the com port I/O addresses is useless without the ability to
set up an interrupt handler too.

Loading...