From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,d0077c2a3f44fc09 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII From: Brian May Newsgroups: comp.lang.ada Subject: Re: Port LPT + ADA (whta do I wrong?) References: Date: Sun, 05 Dec 2004 17:45:59 +1100 Message-ID: User-Agent: Gnus/5.1007 (Gnus v5.10.7) Emacs/21.3 (gnu/linux) Cancel-Lock: sha1:inftTH1f7Mx5E15yHxMJNWNhgzQ= MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit NNTP-Posting-Host: snoopy.microcomaustralia.com.au X-Trace: news.melbourne.pipenetworks.com 1102229136 202.173.153.89 (5 Dec 2004 16:45:36 +1000) X-Complaints-To: abuse@pipenetworks.com X-Abuse-Info: Please forward all headers to enable your complaint to be properly processed. Path: g2news1.google.com!news3.google.com!newsfeed2.dallas1.level3.net!news.level3.com!newsfeed-00.mathworks.com!news.mathworks.com!newsfeed.mathworks.com!news-out.cwix.com!newsfeed.cwix.com!news1.optus.net.au!optus!news.mel.connect.com.au!news-north.connect.com.au!duster.adelaide.on.net!news.melbourne.pipenetworks.com!not-for-mail Xref: g2news1.google.com comp.lang.ada:6768 Date: 2004-12-05T17:45:59+11:00 List-Id: >>>>> ""S�awo" == "S�awo <- MIR" > 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 ?". 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