Article View: comp.os.msdos.programmer
Article #996Re: Parallel port I/O (mostly O : -)
From: Yossi Gil
Date: Wed, 19 Aug 1992 15:25
Date: Wed, 19 Aug 1992 15:25
39 lines
2273 bytes
2273 bytes
n.margetic@ucl.ac.uk (Nino Margetic) writes:
>Hi,
>I am trying to write a driver for a device which accepts commands thru
>the parallel port. I have used INT17 for that, and the thing works.
>The way I've done it is simple - I am checking bit 7 after getting a
>status info of the LPT port via INT17. When bit 7 is NOT_BUSY I send a
>new character down the line.
>I know that there is also a way to access the LPT port directly thru the
>in/out commands and its 3 I/O registers. Are there any advantages (in
>terms of speed) in using interrupt driven parralel I/O, as compared to
>INT17 BIOS service as I have used it - if there is, how much, and is
>it doable in C?? I can just about read assembler, but that's about it.
>The speed of the application is crucial - I need to send as many bytes
>thru the LPT port as possible (order of 1e6). N.B. does anyone know the
>approximate number of bytes per second that can be sent thru the LPT port
>via INT17 and/or interrupt driven parallel I/O??
>Any suggestions, pointers, code snippets, anything, will be of immense value.
>Thanx in advance.
>--Nino
>--
>Janet: n.margetic@uk.ac.ucl \ Nino Margetic
>Earn/Bitnet/Internet: n.margetic@ucl.ac.uk \ University College London, UK
>Bang: ...!mcvax!uknet!ucl!n.margetic \ +44 71 387 9300 /x 53 13
I recall a byte article on this exact topic few years back. I think it
was about 5 or so. I also recal that the max baud rate you can get
is 4500. That is 4.5 KB/sec.
--
Joseph (Yossi) Gil {alberta,uw-beaver,uunet}!ubc-cs!yogi
Dept. of Computer Science yogi@cs.ubc.ca (cs.ubc.ca=137.82.8.5)
6356 Agricultural Road., Univ. of B.C., Tel: +1-604-822-8175
Vancouver, British Columbia, V6T 1Z2, Canada. Fax: +1-604-822-5485
Technical Details
Message-ID:
<1992Aug19.152509.18901@cs.ubc.ca>Path:
arc1-ca.pugleaf.net!sparky!uunet!caen!destroyer!ubc-cs!yogiReferences:
<1992Aug19.135359.24909@bas-a.bcc.ac.uk>Show Full Headers
Complete Article Headers
Newsgroups: comp.os.msdos.programmer Path: arc1-ca.pugleaf.net!sparky!uunet!caen!destroyer!ubc-cs!yogi From: yogi@cs.ubc.ca (Yossi Gil) Subject: Re: Parallel port I/O (mostly O : -) Message-ID: <1992Aug19.152509.18901@cs.ubc.ca> Sender: usenet@cs.ubc.ca (Usenet News) Organization: Computer Science, University of B.C., Vancouver, B.C., Canada References: <1992Aug19.135359.24909@bas-a.bcc.ac.uk> Date: Wed, 19 Aug 92 15:25:09 GMT Lines: 39