On 4/5/07, Tony Duell <ard at p850ug1.demon.co.uk> wrote:
There are minor differences, mainly due to the
fact that the MDA card's
printer port is at a different address (you can have the MDA card _and_ 2
printer adapters in the same machine).
That's handy to know - every once in a while, I long for a machine
with 2 or 3 parallel adapters, for things like old Connectix cameras,
LCD displays and the like. I've never assembled an ISA machine with
more than one printer adapter. I know that it really doesn't matter
to your own code what the I/O address is, but I wasn't sure how
flexible the underlying hardware might be to being assigned to
alternate addresses.
Well, you can have as may printer adapters as yopu like if you can set
them all to different addresses and if you're writing your own software
to talk to them...
The way the BIOS looks for printer adapters (and for that matter async
adapters) is quite nice IMHO. The BIOS drivers allow for up to 4 of each
type of adapter, the 'base address' -- the lowest port address used by
each card -- is stored in a parameter table in RAM (I can find the
addresses if you want them). If you store your own values there, you can
have adapters at non-standard addresses, etc.
At boot-up, the BIOS (or is it the POST?) looks for rpinter adapters at
0x3bc (MDA card printer port), 0x378 (primary printer adapter) and 0x278
(secondary printer adapter) in that order. If it finds one, it stores the
base address at the next location in the parameter table. So :
If you have an MDA card, its printer port will always be LPT1: (no matter
what other printer adapters you have).
If you have one printer adapter (wherter on the MDA card, or on a
separate card irrespective as to wheter that card is set to the primary
or secondary address), it'll be LPT1
If you have an MDA card and one printer adapter, then the MDA card will
be LPT1:, the priter adapter will be LPT2: (irrespective of whether the
printer adapter is set to the primary or secondary address).
Much the same applies to async cards, except that the BIOS only looks for
those at 2 addresses (IIRC 30x3f8 (primary) and 0x2f8 (seconmdary))
If youy want 3 or 4 async cards, or 4 printer adapters supported by the
BIOS, yoy have to store the base addresses in the parameter tables yourself.
I am not sure how well documented this is. It's obvious from the BIOS
source listings, but who reads those?
Of coures this doesn't apply to OSes that ignore the BIOS or the
parameter table.
-tony