Path: utzoo!news-server.csri.toronto.edu!cs.utexas.edu!usc!rpi!dali.cs.montana.edu!milton!hayes.ims.alaska.edu!casbah.acns.nwu.edu!nucsrl!tellab5!vpnet!dattier From: dattier@vpnet.chi.il.us (David W. Tamkin) Newsgroups: comp.sys.cbm Subject: Re: printing in direct mode? Keywords: help Message-ID: <1991Mar14.204201.4743@vpnet.chi.il.us> Date: 14 Mar 91 20:42:01 GMT References: <1991Mar13.161420.28673@cbnews.att.com> <1991Mar13.201004.3965@nntp-server.caltech.edu> <45557@ut-emx.uucp> Distribution: na Organization: VPnet Public Access Unix, Villa Park, Illinois 60181-2206 Lines: 43 rknop@nntp-server.caltech.edu (Robert Andrew Knop) wrote in <1991Mar13.201004.3965@nntp-server.caltech.edu>: | ewm@cbnews.att.com (edward.w.mcfarland) writes: | > For printing I am using the method that is mentioned in the C64 | >owners manual, ie. OPEN4,4,4 | > CMD4: | > CLOSE4,4,4 | You can actually slightly improve on this. First of all, you don't need | to have the full "4,4,4" in the close statement; just CLOSE4 is fine. True so far. | Also, I believe you can avoid the problem with one more return being | printed by using this construction: Not quite. It's not one more blank line that is necessary; it is a switch back from PRINT (or LIST) to PRINT# so that BASIC will send an unlisten signal down the serial bus to the output device (in this case, to the printer). Andrew Hackard's response made one of the same errors (knowing that the PRINT# was needed but thinking a blank line was required also). | OPEN4,4,4 | CMD4: | PRINT#4:CLOSE4 | | Actually, since you've given the CMD4, you could probably get away with | "PRINT:CLOSE4". No, you couldn't. BASIC won't send an unlisten signal after PRINT. If the device is still listening, the file cannot be closed properly. PRINT#4:CLOSE4 will work. If you don't want the extra blank line, you can use PRINT#4,"";:CLOSE4 (or just PRINT#4;:CLOSE4) instead. You don't need a blank line (it doesn't hurt if you want it); you do need to use PRINT# at least once between CMD and CLOSE. There's nothing magical about the blank line. What Edward McFarland needs is an unlisten signal for the printer (or the printer interface). David Tamkin PO Box 7002 Des Plaines IL 60018-7002 dattier@vpnet.chi.il.us GEnie:D.W.TAMKIN CIS:73720,1570 MCIMail:426-1818 708 518 6769 312 693 0591