Unbuffered I/O using MicroSoft C 3.0

Larry Backman backman at interlan.UUCP
Mon Jan 12 23:02:58 AEST 1987


In article <1867 at sunybcs.UUCP> ugwayne at 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



More information about the Comp.lang.c mailing list