Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!watmath!clyde!burl!ulysses!allegra!mit-eddie!genrad!decvax!decwrl!sun!amdahl!dwl10 From: dwl10@amdahl.UUCP Newsgroups: net.micro.cbm Subject: Re: C-Power and printers Message-ID: <3396@amdahl.UUCP> Date: Mon, 23-Jun-86 08:14:32 EDT Article-I.D.: amdahl.3396 Posted: Mon Jun 23 08:14:32 1986 Date-Received: Wed, 25-Jun-86 03:49:28 EDT References: <1304@garfield.UUCP> Organization: Amdahl Corporation, Columbia MD Lines: 37 Summary: open doesn't look quite right. In article <1304@garfield.UUCP>, jay@garfield.UUCP writes: > This program: > #include > main() > { > open(4,4,0); > fprintf(4,"hello world\n); > close(4); > } > > gave me as output: > one line of graphic characters > then a formfeed > then some more graphic characters and HELLO WORLD at the end. > > Any ideas. I don't know if it makes any difference, but when I do the open to my printer, I use: open(4,4,""); The open routine expects to find a pointer to a filename as the third parameter . Perhaps it's taking whatever location zero is pointing to, and sending it to the serial bus as a filename. Since the printer doesn't know what a file name is, it just prints it. Also, what kind of printer interface are you using, or is it a CBM printer? Perhaps secondary chan 4 isn't the correct one to use. -- ------------------------------------------------------------------- Dave Lowrey "So it goes, so it goes, so it goes, so it goes. But where it's going, nobody knows" [Nick Lowe] ...!{ihnp4,cbosgd,hplabs}!amdahl!dwl10 [ The opinions expressed be those of the author and not necessarily those of his most eminent employer. ]