8-May-84 14:53:34-PDT,3953;000000000001 Date: Tue, 8 May 84 16:27:20 EDT From: "Richard Jeff Lehman"@UMich-MTS.Mailnet To: info-ibmpc@isib.arpa Message-ID: <399631@UMich-MTS.Mailnet> To: John McCluskey@JPL-VLSI.ARPA c/o INFO-IBMPC@USC-ISIB From: R. J. Lehman Subject: Hercules Graphic Card Screendump (Note: I'm following crude instructions on how to get a message into INFO-IBMPC. Please pass this along as appropriate. Thanks.) 1. Hercules sells a package, GRAPH-X (about $50.), which includes the PCDOS utility, HARDCOPY.COM, to do screendumps. 2. Since the HARDCOPY screendump is quite small, I wrote the BASIC program, SCRNDUMP.BAS (appended to this text), which produces a 7 X 10 inch picture on an Epson FX-type printer. The annotation in the program should help your friend figure out how to get a graphics dump. Running under BASICA, the program is S-L-O-W, but it moves along at the printer's speed when compiled. I hope this helps. R. J. Lehman University of Michigan Transportation Research Institute 2901 Baxter Road Ann Arbor, MI 48109 (Program follows...) 1 ' Program: SCRNDUMP 2 ' Purpose: Produce full page hard copies of Hercules screen-image files. 3 ' Author: Richard Jeff Lehman 407 UMTRI/2901 Baxter Rd. Ann Arbor, MI 48109 4 ' Last revised: 1/5/84 5 ' Notice: Copyright (C) 1984, R. J. Lehman. All Rights Reserved. 6 ' Notice: Permission is hereby given for non-commercial duplication, modification and distribution. 7 ' 8 ' 10 CLS:KEY OFF:DEFINT A-O:DEFSTR P-U:DIM BS(86,3) 11 ' 12 ' Array BS is used to hold the starting address of each of the 348 rows 13 ' which comprise a Hercules screen. 14 ' 15 ' The following line computes the initial values. 16 ' 17 FOR I=86 TO 0 STEP -1:FOR J=3 TO 0 STEP -1:BS(I,J)=J*8192+I*90:NEXT J,I 20 DEF SEG=&HB000:' Address of Hercules screen 0 25 WIDTH "lpt1:",255:' Prepare printer 30 INPUT"Enter name of screen image file to print: ";FILENAME$ 35 ON ERROR GOTO 1000:' Don't crash if file not found, etc. 40 BLOAD FILENAME$,0:' Load image into Hercules' memory. 42 ON ERROR GOTO 0: 45 FOR I=1 TO 3:LPRINT" ":NEXT:' position paper so image will be centered 60 SETUP=CHR$(27)+"3"+CHR$(24)+CHR$(27)+"*"+CHR$(6)+CHR$(184)+CHR$(2):' Epson command line. Says "space 9 lines/in, and use CRT graphics II print type {90 dots/in}, with (184+2*256 = 696 = 2*348) dots/line." 70 FOR K=0 TO 89:' Only 90 steps across the screen because the stuff will be printed in byte-sized chunks. (90*8=720 columns on the Hercules screen) 75 LPRINT SETUP;:' Tell the printer again, every line. 80 FOR I=86 TO 0 STEP -1:FOR J=3 TO 0 STEP -1:' Print four rows at a time, from bottom to top 90 A=BS(I,J)+K:T=CHR$(PEEK(A)):IF T<>CHR$(13) THEN LPRINT T;T; ELSE LPRINT CHR$(15);CHR$(15);:' Get the contents of screen memory byte, treat it like a character. 92 ' If the character is (CHR$(13)), fudge it and print something that will look OK, because the IBMPC burps an extra (CHR$(10)) when printing a , and that can louse up a perfectly decent looking picture, 93 ' because the Epson can't tell a meant as line feed from one meant as data when it's printing a picture. (It took me quite a while to figure this out.) 95 NEXT J,I:LPRINT:NEXT K:' End of loops, print WITH to end the line. 100 LPRINT CHR$(27);"2";:' Put Epson back in standard text mode. 110 FOR I=1 TO 3:LPRINT" ":NEXT:' Go to top of next page. 120 CLS:PRINT:INPUT"Print another file? ";SN:SN=LEFT$(SN,1):IF SN="y" OR SN="Y" THEN 30:' Do it all again, if desired. 130 END:' Or not. As you wish. 1000 CLS:PRINT"I/O Error #:";ERR;". Try again":RESUME 30:' Disk error message (Program ends.)