Changing Minix Printer Port

modified: Tue Dec 2 11:14:16 EST 1997

Q: I know Minix only supports one printer port, but can I change it
from the one known by MS-DOS as lpt1 to lpt2?

Kees Bot ( replied on Dec 2, 1997 to a very similar

In the function kernel/printer.c::print_init() you can find the
constant 0x408L, which addresses the memory word 0040:0008, where the
BIOS puts the "base I/O address of the first parallel I/O port".
Change the constant to 0x40AL to use LPT2.

This should work, but Minix would be happier if the IRQ is also
correct, so change PRINTER_IRQ in kernel/const.h if you know what it
should be.  (The printer driver is the only driver that can do without
an IRQ by polling on each clock tick.)

(Quite refreshing to see a question whose answer isn't in the manuals.)