[comp.os.os2.misc] Parallel Ports and OS/2

jfarley@pollux.svale.hp.com (Jens Farley) (03/20/91)

dbl@h.cs.wvu.wvnet.edu (David Lawson,,2933607,5999662) writes:

> My parallel port WILL NOT work under OS/2 (any verison I have tried)

Here's how OS/2 expects a parallel port to be configured:

                        Starting
      Port Name        I/O address       Interrupt
      ---------        -----------       ---------
        LPT1              378h             IRQ 7
        LPT2              278h             IRQ 5

As long as you can configure your card as above, and it doesn't
have any hardware design flaws, it should work.

I don't know why, but some card manufactures have opted to scramble
these characteristics -- for example, the Everex Magic I/O card
looks like:

       Everex         OS/2
      Port Name     Port Name     I/O address     Interrupt
      ---------     ---------     -----------     ---------
        LPT1          None           3BCh           IRQ 7
        LPT2          LPT1           378h           IRQ 7
        LPT3          LPT2           278h           IRQ 5

wbonner@eecs.wsu.edu (Wim Bonner) (03/24/91)

In article <7110004@pollux.svale.hp.com> jfarley@pollux.svale.hp.com (Jens Farley) writes:
>                        Starting
>      Port Name        I/O address       Interrupt
>      ---------        -----------       ---------
>        LPT1              378h             IRQ 7
>        LPT2              278h             IRQ 5
>
>As long as you can configure your card as above, and it doesn't
>have any hardware design flaws, it should work.
>
>I don't know why, but some card manufactures have opted to scramble
>these characteristics -- for example, the Everex Magic I/O card
>looks like:
>
>       Everex         OS/2
>      Port Name     Port Name     I/O address     Interrupt
>      ---------     ---------     -----------     ---------
>        LPT1          None           3BCh           IRQ 7
>        LPT2          LPT1           378h           IRQ 7
>        LPT3          LPT2           278h           IRQ 5

Just wondering, but where does the port on an IBM (Or Herc) monochrome
card show up?  And how does the other port in the machine work as port 2 
automaticly when that port is in the machine, but If I pull the mono card
it acts as port 1?

Just curious.

Wim.
-- 
|  wbonner@yoda.eecs.wsu.edu  |
| 27313853@wsuvm1.csc.wsu.edu |
|  72561.3135@CompuServe.com  |

GD.SAR@forsythe.stanford.edu (Sandy Rockowitz) (03/26/91)

In article <1991Mar24.085133.8746@eecs.wsu.edu>,
wbonner@eecs.wsu.edu (Wim Bonner) writes:
>
>Just wondering, but where does the port on an IBM (Or Herc) monochrome
>card show up?  And how does the other port in the machine work as port 2
>automaticly when that port is in the machine, but If I pull the mono card
>it acts as port 1?

The port address on an IBM mono card if fixed at 3BC.  If the
BIOS detects a parallel port at that address, it becomes
LPT1, and 378 and 278 become LPT2 and LPT3.  Otherwise,
378 becomes LPT1 and 278 becomes LPT2.

Sandy Rockowitz
gd.sar@forsythe.stanford.edu

jfarley@pollux.svale.hp.com (Jens Farley) (03/26/91)

Earlier, I wrote:

>                        Starting
>      Port Name        I/O address       Interrupt
>      ---------        -----------       ---------
>        LPT1              378h             IRQ 7
>        LPT2              278h             IRQ 5

The "Port Name" is kind of meaningless.  What I was really trying
to say was:

1.   A port at 378h must use IRQ7.
2.   A port at 278h must use IRQ5.

Further, now that I've looked into it, I might add:

3.   A port not at 278h must use IRQ7.
4.   Any port in a single-port system that fits the above criteria
     will show up as LPT1.
5.   In any dual-port system that fits the above criteria, LPT1 is
     assigned the port of highest I/O address, and LPT2 is assigned
     the port of second-highest I/O address.


Back to something else I wrote:

>       Everex         OS/2
>      Port Name     Port Name     I/O address     Interrupt
>      ---------     ---------     -----------     ---------
>        LPT1          None           3BCh           IRQ 7
>        LPT2          LPT1           378h           IRQ 7
>        LPT3          LPT2           278h           IRQ 5

You can probably change the "None" to "LPT1".  Any single-port
system using an Everex board should appear to have an LPT1.

Something to note is that if you have two Everex boards, you must
configure them as LPT(1|2) and LPT3 for OS/2 to see them as LPT1
and LPT2.  Also, if you have a "normal" card that is configured as
LPT1 or LPT2, you will need to configure your Everex board as LPT3
or LPT(1|2) respectively to use it.  That was the point I was
trying to make with the above table.


I managed to confuse wbonner@yoda.UUCP (Wim Bonner), who writes:

> Just wondering, but where does the port on an IBM (Or Herc) monochrome
> card show up?  And how does the other port in the machine work as port 2 
> automaticly when that port is in the machine, but If I pull the mono card
> it acts as port 1?

It would help to know how your other port is configured.  There's
a good chance the mono card is at port 3BC or 378.  I don't know
about any interrupt it might be using.

The I/O addresses of all ports recognized by the ROM BIOS during
initialization are saved in descending order.  When OS/2
initializes, it uses those port addresses saved by the ROM BIOS and
will assign LPT1 to the mono card port if it is first in the list. 
Let's say the mono card is at port 3BC.  Assuming your other port
is "normal," then whether it's configured as LPT1 or 2, it will be
seen secondly as LPT2.  When you remove the mono card, your other
port is the only port in the system, so regardless of how it's
configured, OS/2 thinks of it as LPT1.


Jens "Hopelessly Caught Up In The Details" Farley