comp.lang.ada
 help / color / mirror / Atom feed
From: Brian May <bam@snoopy.apana.org.au>
Subject: Re: Port LPT + ADA (whta do I wrong?)
Date: Sun, 05 Dec 2004 17:45:59 +1100
Date: 2004-12-05T17:45:59+11:00	[thread overview]
Message-ID: <sa47jnxfdjs.fsf@snoopy.apana.org.au> (raw)
In-Reply-To: cosu9o$mnk$1@kujawiak.man.lodz.pl

>>>>> ""S�awo" == "S�awo  <- MIR" <mszajac@poczta.onet.pl>> writes:

    "S�awo> Hello!  Maybe someone tell me what do I wrong (??), or
    "S�awo> maybe everything is wrong ;-) :/ These are the fragments
    "S�awo> of my code:

Hello.

You seem to be getting high level access confused with low level
access. Possibly a source of this confusion is that the one word
"port" can mean different things (e.g. 1. connection from CPU to IO
card for low level access and 2. physical socket printer plugs
into). Both high level and low level access methods are very
incompatible with each other, and you definitely cannot mix the two as
you have. I am not going to describe the difference here; I suspect
that may not be beneficial at this stage. I recommend reading a good
book on operating systems and operating system drivers.

What operating system are you using? I assume this is not an embedded
system? I assume that it is a Windows based OS (since you are using
Windows definitions)?

I can only assume you require access to the LPT1 printer port.  What
you need to use the high level Windows API. Windows will talk to the
hardware for you.

I have never done this myself for LPT1 (my COM serial routines might
be similar, not sure), but I suspect it involves opening "LPT1" as a
file, and reading/writing to this handle you get. There will be other
functions to call to get status information. You do not need to map
directly to any address.

I highly recommend asking the question again, but rephrase it as "How
do I access the LPT port under <insert windows OS here>?". With this
question, I think others will be able to help you better. It is often
better to ask for what you need as opposed to proposing a solution
that may not meet you requirements.

Hope this helps.
-- 
Brian May <bam@snoopy.apana.org.au>



      parent reply	other threads:[~2004-12-05  6:45 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-12-03 13:56 Port LPT + ADA S�awo - MIR
2004-12-03 14:40 ` Martin Krischik
2004-12-03 15:29   ` Slawo - MIR
2004-12-03 18:46     ` Martin Krischik
2004-12-03 18:43 ` tmoran
     [not found] ` <u111r0db4fsoj9u3hlkachspjt0r2vvup7@4ax.com>
2004-12-03 23:03   ` Adrien Plisson
2004-12-03 23:51     ` Slawo - MIR
2004-12-04  0:51     ` Jeffrey Carter
2004-12-04 18:05 ` Port LPT + ADA (whta do I wrong?) S�awo - MIR
2004-12-04 20:20   ` Dmitry A. Kazakov
2004-12-07 18:13     ` Slawo - MIR
2004-12-07 20:55       ` Dmitry A. Kazakov
2004-12-08  4:28         ` Steve
2004-12-08  8:27           ` Dmitry A. Kazakov
2004-12-12 22:25           ` Brian May
2004-12-14  2:41             ` Steve
2004-12-12 22:46           ` Brian May
2004-12-12 23:03             ` Adrien Plisson
     [not found]       ` <rt8dr09tuvgbqaeq9vmujd1pqtb72hbamv@4ax.com>
2004-12-09  8:17         ` Jerry van Dijk
2004-12-05  6:45   ` Brian May [this message]
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox