home *** CD-ROM | disk | FTP | other *** search
- PROGRAM dumpscrn; {dumps a hires screen to the printer.
- Assumes the printer card is software-compatible with
- the GRAPPLER.
- Copyright 1984 by N.T.Carnevale.
- Permission granted for nonprofit use.}
-
- CONST GRAFSCREEN=2; {use only hires screen 2 with PCPI v.2 CP/M}
-
- {$I PCP.INC}
- {$I APLGR/G.INC}
- {$I APLGR/H.INC}
-
- TYPE string70=string[70];
-
- VAR
- size:(single,double); {specifies 1:1 or 2:1 screen dump}
- ans:char;
- controlstring:string[4]; {used for printer card commands}
- i,numlf,copynum:integer;
- scrn:integer;
-
- PROCEDURE delay;
- VAR i,j:integer;
- BEGIN
- FOR i:=0 TO 500 DO
- FOR j:=1 TO 500 DO;
- END;
-
- FUNCTION promptans(prompt:string70):char;
- {display the prompt on the console,
- get a single uppercase response from the keyboard}
- VAR ans:char;
- BEGIN
- write(prompt);
- readln(ans);
- promptans:=upcase(ans);
- END;
-
- PROCEDURE dumpit; {tell Grappler to do the screen dump}
- VAR i:integer;
- BEGIN
- ans:=promptans('Adjust top edge of paper, then press RETURN');
- FOR i:=1 TO numlf DO writeln(lst); {blank lines for centering}
- writeln(lst,chr(0),chr(25),controlstring); {null is for safety's sake}
- FOR i:=1 TO numlf DO writeln(lst); {more blank lines after dump}
- END;
-
- BEGIN
- textscreen(1); {insure text display at start of program}
- hirespatch; {install register-loading routines}
- REPEAT
- write('Dumping screen ',GRAFSCREEN,'--');
- scrn:=GRAFSCREEN;
- hiresgr(scrn,FULLSCREEN); {shows the screen without clearing it}
- delay;
- textscreen(1); {return to text display}
- ans:=promptans('P)roceed or Q)uit? ');
- UNTIL ans IN ['P','Q'];
- IF ans='P' THEN BEGIN
- ans:=promptans('D)ouble or S)tandard size? ');
- IF ans='D' THEN BEGIN
- numlf:=9;
- controlstring:='GDR2'; {command for magnified screen dump}
- END ELSE BEGIN
- numlf:=19;
- controlstring:='GR2'; {standard screen dump}
- END;
- writeln;
- write('Number of copies to make: ');
- readln(copynum);
- FOR i:=1 TO copynum DO dumpit; {do the screen dump}
- writeln('Check top edge of paper and reset printer');
- END;
- END. {of PROGRAM dumpscrn}