Re: Parallel PCI Port in Dosemu

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]


Dnia wtorek 13 styczeń 2009, Slawomir Wawak napisał:
> Hello,
> I use under dosemu application which needs hardware key attached to
> parallel port. It was ok, while I've had computer with parallel port on the
> motherboard.
> New motherboards have no parralel port, so I plugged port on PCI card.
> Linux and Dosemu can see this port, but my application can't. Port on PCI
> has ioports EC00-EC02, not 378-37f. Application tries to communicate always
> in 378-37f range.
> My question: Is it possible to remap ioports? Can dosemu translate
> questions sent to port 378 to EC00?

You must set your lpt port addres for LPTx name. Use following program:

#include <stdio.h>

void setlpt(unsigned int num, unsigned int port)
        unsigned int _offset;

        if ((num == 0) || (num > 4))

        _offset = 6 + (num * 2);

        printf("Setting LPT%d to 0x%X\n", num, port);

        asm {
                mov ax,0x0040
                mov es,ax
                mov di,_offset
                mov ax,port

int main ()
        setlpt(1, 0xEC00); //set LPT1 to be at 0xEC00
        return 0;

Rafał Cygnarowski
rafilists [at] gmail [dot] com

To unsubscribe from this list: send the line "unsubscribe linux-msdos" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at

[Index of Archives]     [Linux Console]     [Linux Audio]     [Linux for Hams]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite Camping]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Samba]     [Linux Media]     [Fedora Users]

  Powered by Linux