Com Port access from PowerBasic 3.5
(too old to reply)
2010-04-11 15:12:33 UTC
Raw Message
Is it possible to access Com Ports greater than 1-4 in PowerBasic
(DOS) 3.5?

I use this on windows machines which have Com Ports up to 9 or 10 and
would like to access them.

I understand this may be a more generic question than just PowerBasic,
but was hoping someone here has dealt with this issue.

Thank you,
Basic Guy
2010-04-12 04:01:45 UTC
Raw Message
Post by tomcee
Is it possible to access Com Ports greater than 1-4 in PowerBasic
(DOS) 3.5?
The open-com-port statement in PB 3.x only allows 1 through 4 as valid

But I believe there is a statement where you can alter or redefine the
address scheme of the com ports, and possibly map com 1 to com 5, 2 to
6, etc.

But that won't do you any good if you're trying to run PB 3.x in a dos
shell under an NT-based OS (2k, XP, etc). NT (or, the NTVDM) doesn't
really give you direct access to the actual com port hardware.

But beyond the first 4 com ports, the NTVDM can be bypassed by a few
third-party helpers (port-talk for one) that can give your compiled PB
app direct hardware I/O access.

It's trivial to do com port I/O via direct in and out commands instead
of using the traditional Open-Com and read/write statements.

In one machine I have a PCI-based dual com port card (with 128 byte
read/write buffer) and the card can do 1 meg-baud if I want. The com
ports sit at I/O address 1D00 and when running in pure DOS (or win-98) I
don't even need a driver to access those ports (I just perform direct
I/O in PB at 1D00 instead of 3F8).