短小精悍的VGA屏幕打印程序 河南 张 炯 1994-03-25 本程序用TURBO PASCAL 5.5编写在AST 386SX/20,超想汉字系统下运行通过,打印机为EPSON LQ1600K。 unit lq1600; interface uses graph,printer; const esc=#$1B; procedure printgraph; implementation const mode=39; {可修改打印模式为32,33,38,39,40} procedure printgraph; var i,j,kh,m,msb,1sb,maxx,maxy:integer; Begin maxx:=getmaxx; maxy:=getmaxy; setviewport(0,0,maxx,maxy,false); write(lst,ESC,'A',#$07); LSB:=(maxx div 256); msb:=(maxx mod 256)+1; for j:=0 to maxy div 24 do Begin write(lst,ESC,'*',char(mode),char(msb),char(lst)); for i:=0 to maxx do Begin for h:=0to 2 do Begin m:=0; for k:=0 to 7 do Begin m:=m shl 1; if getpixel(i,j*24+h*8+k) <> 0 then inc(m); end; write(1st,char(m)); end; end; write(lst,#$0D,#$0A); end; end;{procedure lq1600} end.