public inbox for linux-msdos@vger.kernel.org
 help / color / mirror / Atom feed
From: "Rafał Cygnarowski" <rafilists@gmail.com>
To: linux-msdos@vger.kernel.org
Subject: Re: Parallel PCI Port in Dosemu
Date: Tue, 13 Jan 2009 21:25:57 +0100	[thread overview]
Message-ID: <200901132125.57240.rafilists@gmail.com> (raw)
In-Reply-To: <200901132017.04675.wawaks@uek.krakow.pl>

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))
                return;

        _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
                stosw
        };
}   

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

Regards,
-- 
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@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

      reply	other threads:[~2009-01-13 20:25 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-13 19:17 Parallel PCI Port in Dosemu Slawomir Wawak
2009-01-13 20:25 ` Rafał Cygnarowski [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200901132125.57240.rafilists@gmail.com \
    --to=rafilists@gmail.com \
    --cc=linux-msdos@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox