Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!snorkelwacker.mit.edu!bloom-beacon!eru!hagbard!sunic!mcsun!hp4nl!dri500!slootman From: slootman@dri.nl (Paul Slootman) Newsgroups: comp.lang.c Subject: Re: reading from a parallel port Message-ID: <986@dri500.dri.nl> Date: 9 Apr 91 09:15:21 GMT References: <1991Apr8.182526.17852@ux1.cso.uiuc.edu> Followup-To: comp.os.msdos.programmer Organization: DataCount Register Informatici, Wierden, The Netherlands Lines: 22 djk@ux1.cso.uiuc.edu (Doug Kelly) writes: >Hello, Im trying to write a program to interface to my Epson ES-300C color >scanner. It uses a bi-directional parallel interface, and i cant figure out >how to 'read' from a parallel port. Im using borland turbo c, any help would >be appreciated. Thanks Assuming you're on some IBM PC-compatible, simply do a inportb() (reads a byte from hardware port) from the data latch corresponding to the parallel interface. For example, to get the byte on a printer port at 0x378, do x=inb(0x378); This is not, in fact, a C question; I've redirected followups to comp.os.msdos.programmer. Paul. -- =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= : slootman@dri.nl : Don't hit the keys so hard, : : ...!hp4nl!dri500!slootman : it hurts : =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=