WKF2298@RITVAX.ISC.RIT.EDU (Wonko the Sane) (12/05/90)
To all of the wonderful people who responded to my graphic printing problem . . . thank you all very, very much. . . but none of them worked! Several of you suggested issuing the COUT command from a machine language routine. . . great. . . I tried that too, but the way I did it, it always printed to the screen, and using the methods that were recommended to me, they printed to the printer (somehow), but it was just garbage! To the person who told me about 49306, 49307, and 49304. . . that looked really cool, but nothing happened! (Yes, I am sending through a GS and to an ImageWriter II.) So, I'm just going to send you the program! What it does is receives weather maps over the radiowaves (I won't even pretend that I understand that, but I'm just helping a friend). Unfortunately, the codes are for Epsons, so this program converts the headers to print on an ImageWriter. For all practical purposes. . . it's very simple. HERE IS THE IMFAMOUS PAIN IN THE . . . 10 PRINT CHR$ (4);"close" 20 INPUT "Enter fax file name";A$ 22 PRINT CHR$ (4);"pr#1 23 PRINT CHR$ (27) + "c" + CHR$ (27) + "T06" 25 PRINT CHR$ (4);"open";A$ 30 PRINT CHR$ (4);"read";A$ 35 ME = FRE (0): GOSUB 1000 40 IF CAR = 13 THEN 50 42 IF CAR = 10 THEN 50 45 GOTO 35 50 REM Graphics mode! 55 FOR J = 1 TO 6 60 GOSUB 1000 65 NEXT J 70 PRINT CHR$ (13) + CHR$ (10) + CHR$ (27) + "G"; 75 GOSUB 1000 80 LET N = 4 85 GOSUB 1000 90 LET N = N + (256 * 3) 95 IF N < 1000 THEN PRINT "0";N; 100 IF N > = 1000 THEN PRINT N; 110 FOR K = 1 TO N 120 GOSUB 1000 125 THIS IS THE LINE TO PRINT THE CHR$( 130 NEXT K 135 GOTO 35 1000 GET BYTE$ 1005 LET CAR = ASC (BYTE$) - 48 1010 IF CAR < 0 THEN GOTO 1000 1015 RETURN OPPPPS. . . my telecommunication software just choked on line 125 with the rem. . . but that is the line that is to print the variable CAR. That's all you really need to know. Any advice is still very welcome. Thank you all. (See what trouble I go through for you Ethan! :-) ) William K. Fry
dlyons@Apple.COM (David A. Lyons) (12/23/90)
In article <F4F4FFF7319FE1046F@ritvax.isc.rit.edu> WKF2298@RITVAX.ISC.RIT.EDU (Wonko the Sane) writes: > > To all of the wonderful people who responded to my graphic printing >problem . . . thank you all very, very much. . . but none of them worked! Have you tried PRINT CHR$(9);"Z" after the PR#1? This "Ctrl-I Z" "zaps" the Ctrl-I interpretation logic in the slot-1 firmware. If you *don't* do that, then every time you happen to get a Ctrl-I (byte value 9 or 128+9), the firmware will try to interpret the following character or characters as a command! This would leave you "short" a few characters as far as the printer is concerned, so your program would end while the printer was still expecting the last part of the graphics data. > William K. Fry -- David A. Lyons, Apple Computer, Inc. | DAL Systems Apple II System Software Engineer | P.O. Box 875 America Online: Dave Lyons | Cupertino, CA 95015-0875 GEnie: D.LYONS2 or DAVE.LYONS CompuServe: 72177,3233 Internet/BITNET: dlyons@apple.com UUCP: ...!ames!apple!dlyons My opinions are my own, not Apple's.