Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: utzoo!mnetor!seismo!brl-adm!rutgers!husc6!mit-eddie!interlan!backman
From: backman@interlan.UUCP (Larry Backman)
Newsgroups: comp.lang.c,comp.sys.ibm.pc
Subject: Re: Unbuffered I/O using MicroSoft C 3.0
Message-ID: <116@interlan.UUCP>
Date: Mon, 12-Jan-87 08:02:58 EST
Article-I.D.: interlan.116
Posted: Mon Jan 12 08:02:58 1987
Date-Received: Mon, 12-Jan-87 21:55:45 EST
References: <1867@sunybcs.UUCP>
Reply-To: backman@interlan.UUCP (1014-Larry Backman)
Organization: MICOM-Interlan, Boxborough, MA
Lines: 29
Keywords: Unbuffered I/O
Xref: mnetor comp.lang.c:661 comp.sys.ibm.pc:919

In article <1867@sunybcs.UUCP> ugwayne@sunybcs.UUCP (Wayne Nelligan) writes:
>
>
>Subject: Unbuffered I/O using MicroSoft C Version 3.0
>-----------------------------------------------------
>
>
>    A friend of mine recently asked me "If I knew of a program that would let
>your printer act like a typewriter?".  
>    I am using MicroSoft C 3.0 and I have tried various methods but each time
>the printer only prints out when I enter a Carriage Return.  At first, I was
>using getc() and putc() and then it dawned on me that these functions
>use buffered I/O.  
>    So what I would like to know then, Is how would I get a program like
>this to work?  How do you get unbuffered I/O using MicroSoft C 3.0?


	I've never tried this particular problem, but having gone through
	similar experiences with DOS and various C compilers, I would
	suggest the brute forc approach.  Replace the BIOS keyboard and
	printr handlers with your own interrupt handlers, then play
	read a char... write a char... out of the interrupt service
	routines.  Its not as clean as using a C call, but you won't have
	unknowns in your way.

					Larry Backman
					Micom - Interlan, Inc.

					ulowell !interlan!backman