🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: sci.electronics
Article #17081

Re: Accessing parallel port from C programs

#17081
From: Richard Steven Walz
Date: Thu, 21 Sep 1995 16:25
23 lines
1365 bytes
In article <DF67sz.Hqy@ecf.toronto.edu>,
PU  QIAN KEN <puqian@ecf.toronto.edu> wrote:
>Hi, everybody
>
>I wish to read / write from and to the parallel port using C.
>Is it as simply as outport(ADDRESS,BYTE)?  If so, can someone
>tell me the address for the parallel port? (or even LPTx).
>
>A simply example of how to read and write via parallel port would
>be life saving for me.
>
>Thanks in advance.
>Ken Pu
--------------------------------------------
It depends on your C, since C has no intrinsic I/O ! If that is your
hardware port output command and syntax, then yes, it will work. The
port addresses, do they need to be decimal, hex, or either? I would
suppose either, so what you need to do is ftp the file: ibmlpt.faq
from my ftp site: ftp.armory.com/pub/user/rstevew  and read it! You
may also need to write to the control port and read the status port as
well, so you might as well learn that if you wish to ever input
(inport() ? ) data in C.
-Steve Walz   rstevew@armory.com
Technical Details
Message-ID: <43s3m1$t5i@news.scruz.net>
Path: arc1-ca.pugleaf.net!news.scruz.net!rstevew
References: <DF67sz.Hqy@ecf.toronto.edu>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!news.scruz.net!rstevew
From: rstevew@armory.com (Richard Steven Walz)
Newsgroups: sci.electronics,comp.lang.c
Subject: Re: Accessing parallel port from C programs
Date: 21 Sep 1995 16:25:37 GMT
Organization: The Armory
Message-ID: <43s3m1$t5i@news.scruz.net>
References: <DF67sz.Hqy@ecf.toronto.edu>
NNTP-Posting-Host: 192.122.209.42