home *** CD-ROM | disk | FTP | other *** search
- 'Program Name : ScanP2.bas scans screen - builds pixel image for printer
- 'Author : Lloyd Smith for Spectra Tech Support
- 'Date : 10-31-90
- 'Compuserve # : GO PCVENB, Vendor #12/Spectra, Tech Support ID 71530,2640
- 'Tech Support BBS: 813-625-1721, PC-Board, 8,N,1 USR HST 300 - 14.4, 24hrs
- 'Tech Support Fax: 813-625-1698 G2 & G3 compatible
- 'Tech Support Voc: 813-625-1172 Voice
- 'Description : Program scans a 640 x 350 ega screen and prints to Citizen
- ' : or Epson compatible printer
-
- DIM static Parray(1125,1)
- width "lpt1:",255
- gosub ParrayInit
- gosub PrintInit
- screen 9,,0,0
-
- color 12,0
- for i=1 to 25
- locate i,1:print "This is a test of the system ABCDEFGHIJKLOMNOPRSTUVWXYZ, line #";i;
- next i
-
-
- ycnt=0
- for y1=0 to 350 step 8
- for x1=0 to 639
- if point(x1,y1)>0 then a=128 else a=0
- if point(x1,y1+1)>0 then b=64 else b=0
- if point(x1,y1+2)>0 then c=32 else c=0
- if point(x1,y1+3)>0 then d=16 else d=0
- if point(x1,y1+4)>0 then e=8 else e=0
- if point(x1,y1+5)>0 then f=4 else f=0
- if point(x1,y1+6)>0 then g=2 else g=0
- if point(x1,y1+7)>0 then h=1 else h=0
- Parray(x1,1)=a+b+c+d+e+f+g+h
- k$=inkey$:if k$=chr$(27) then system 'exit scan routine
- next x1
- gosub PrintScnArray
- gosub ParrayInit
- next y1
- end
-
- ParrayInit:
- for xx=0 to 1045
- Parray(xx,1)=0
- next xx
- return
-
- PrintScnArray:
- ' Print the screen buffer to the printer
- dts= (80*13+2) '960 'num or dots
- n1 = dts mod 256
- n2 = int(dts/256)
-
- k$=inkey$:if k$=chr$(27) then system
- LPRINT CHR$(27)"L"CHR$(n1)CHR$(n2); '120 dots/in or 960 dots/line
- FOR x = 0 TO dts-1
- LPRINT CHR$(int(Parray(x,1)));
- NEXT x
- LPRINT
- return
-
- PrintInit:
- LPRINT CHR$(27)"~0"CHR$(16): REM CITIZEN MEMORY LINE FEED INCREMENT
- ' LPRINT CHR$(27)CHR$(51)CHR$(20): REM EPSON MEMORY LINE FEED INCREMENT
- return
-