🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.os.msdos.misc
Article #33

Re: More than 4 com-ports under Ms-dos 5.0??

#33
From: phys169
Date: Wed, 28 Oct 1992 22:59
66 lines
4231 bytes
In article <1992Oct27.160957.2524@abo.fi>, MSUORANTA@finabo.abo.fi (Mika Suoranta Tkkk) writes:
>         Does anyone know how one could possibly have
>         more than 4 Com-ports in one computer? I've an 286
>         machine running under Ms-dos 5.0 and as far as I
>         understand the operating system sets the limit.
>         
>         I have to connect:
>         1)      printer (my printer doesn't have parallel)
>         2)      mouse
>         3)      telephone modem *)
>         4)      packet radio modem
>         5)      RTTY-modem

You can have eight coms ports, possibly more, but BIOS & DOS support stops at
four. Good communications programs don't really need that support, of course,
they go straight to the hardware, but still seem to like to learn the port
addresses from the BIOS table at segment 40h (which is limited to 4 entries!).

Also, some cards are going to have to share the same interrupt (IRQ) line, but
not all software likes doing that.  The printer probably doesn't need
interrupts and you probably won't use all the modems at the same time (and even
if you did, the same software would probably handle it), so I'd arrange things
so that the mouse was on COM1, with its normal interrupt (IRQ3), and the
printer on COM2 with interrupts disabled for that port (it probably wouldn't
hurt to have them enabled on IRQ4, but there isn't much point). And the modems
would be on ports COM3 to COM5 (there wouldn't be a device driver for COM5,
which isn't a problem, but there also wouldn't be an address entry, which might
be a problem).  They would all use the same interrupt, IRQ4.

As one other person suggested, if the mouse used a bus interface instead of a
serial, you'd only have 4 serial ports, and no problems.  But I guess you are
stuck with a serial mouse, so the only problem is getting the right
communications software, to gracefully manage the interrupts (most packages
should) and to access COM5 without the help of BIOS (hmm, probably your main
problem).

To explain the IO port address problem further...

When the computer starts up, the ROM checks what adapters are present, and
stores the base IO port addresses in a 4-word table for COMS ports, and a
4-word table for printers (nobody uses LPT4, though).  It also records in a
word (readable with int 11h, and usually stored at location 40h:10h) how many 
of each you have (up to 0-3 printers and 0-7 coms ports in theory).  For
printer ports this is very important, since the physical port addresses depend
on whether you have a mono graphics card installed (which have their own
printer ports, pushing the printer port at 0378h from LPT1 to LPT2). Programs
that use hard-coded port addresses for LPT1 are a great nuisance!  On the other
hand the port addresses for COM1,2 and 3 are pretty standard (3F8, 2F8 & 3E8
respectively).  When you get to COM4 things vary a bit - typically PC/XT
computers have a cards with different port addresses to AT's (2E8 or 3E0). The
normal list of port addresses for AT's is:
   3F8 2F8 3E8 3E0 2F0 2E8 2E0 260

(That information should come with the card. Not all cards can be configured to
go beyond COM2, though).

If you can't run communications software that is flexible enough to work with
high-numbers coms ports, another option would be to create a special device
driver to take LPT1 output and redirect it to COM5 (it wouldn't redirect all
output to the hardware port, but nor would MODE LPT1:=COM2, which you'd use
otherwise), although it would be an interesting idea to port the port address
for COM5 into the area reserved for LPT1.  If you have to do something like
that let me know; I can help.

Hope this helps,
Mark Aitchison, University of Canterbury.
Technical Details
Message-ID: <1992Oct29.115939.1@csc.canterbury.ac.nz>
Path: arc1-ca.pugleaf.net!sparky!uunet!comp.vuw.ac.nz!canterbury.ac.nz!cantva!phys169
References: <1992Oct27.160957.2524@abo.fi>

Show Full Headers
Complete Article Headers
Newsgroups: comp.os.msdos.misc
Path: arc1-ca.pugleaf.net!sparky!uunet!comp.vuw.ac.nz!canterbury.ac.nz!cantva!phys169
From: phys169@csc.canterbury.ac.nz
Subject: Re: More than 4 com-ports under Ms-dos 5.0??
Message-ID: <1992Oct29.115939.1@csc.canterbury.ac.nz>
Nntp-Posting-Host: cantva.canterbury.ac.nz
Organization: University of Canterbury, Christchurch, New Zealand
References: <1992Oct27.160957.2524@abo.fi>
Date: Wed, 28 Oct 1992 22:59:39 GMT
Lines: 66