home *** CD-ROM | disk | FTP | other *** search
- (* ------------------------------------------------- *)
- (* HARDCOPY.PAS *)
- (* Verbesserung der Hardcopy-Bibliothek *)
- (* in TOOLBOX 10'89 *)
- (* ------------------------------------------------- *)
- (* ersetzt alte Prozedur IBMHardCopy *)
- (* *)
- (* (C) 1991 Paul Konietzko & TOOLBOX *)
- (* ------------------------------------------------- *)
-
- PROCEDURE IBMHardCopy;
- LABEL 9;
- CONST
- xmax = 800;
- p : ARRAY[0..7] OF BYTE = (128,64,32,16,8,4,2,1);
- var
- g : array[0..xmax] of byte;
- modus, page, d : BYTE;
- x, y, i, j, n1, n2, xres, yres : WORD;
- BEGIN
- Regs.ah := $0F;
- Intr($10, Regs);
- modus := Regs.al;
- page := Regs.bh;
- CASE modus OF
- $04, $05, $0d, $13 : BEGIN
- xres := 320; yres := 200;
- END;
- $06, $0E : BEGIN
- xres := 640; yres := 200;
- END;
- $40, $48 : BEGIN
- xres := 640; yres := 400;
- END;
- $0F, $10, $2d : BEGIN
- xres := 640; yres := 350;
- END;
- $11, $12, $25, $2E : BEGIN
- xres := 640; yres := 480;
- END;
- $29, $30 : BEGIN
- xres := 800; yres := 600;
- END;
- END;
- n2 := xres DIV 256;
- n1 := xres MOD 256;
- PrintString(#27#64);
- IF error THEN GOTO 9; { ESC @ = reset }
- PrintString(#27#85#49);
- IF error THEN GOTO 9; { ESC U 1 = unidirectional }
-
- FOR i := 0 TO (yres DIV 8) DO BEGIN
- FOR x := 0 TO Pred(xres) DO BEGIN
- d := 0;
- FOR j := 0 TO 7 DO BEGIN
- y := i * 8 + j;
- Regs.ah := $0d;
- Regs.bh := page;
- Regs.cx := x;
- Regs.dx := y;
- Intr($10, Regs);
- IF Regs.al > 0 THEN d := d + p[j];
- END;
-
- g[x] :=d;
- END;
-
- PrintString(#27#51#23);
- IF error THEN GOTO 9; { ESC 3 23 = 23/216 Zoll }
- PrintString(#13#10);
- IF error THEN GOTO 9; { CR LF }
- PrintString(#9#27#76 + Chr(n1) + Chr(n2));
- IF error THEN GOTO 9; { TAB ESC L }
- FOR x := 0 TO Pred(xres) DO BEGIN
- PrintString(chr(g[x]));
- END;
-
- PrintString(#27#51#0);
- IF error THEN GOTO 9; {ESC 3 1 = 1/216 Zoll }
- PrintString(#13#10);
- IF error THEN GOTO 9; { CR LF }
- PrintString(#9#27#76 + Chr(n1) + Chr(n2));
- IF error THEN GOTO 9; { TAB ESC L }
- FOR x := 0 TO Pred(xres) DO BEGIN
- PrintString(chr(g[x]));
- END;
-
- PrintString(#27#51#1);
- IF error THEN GOTO 9; {ESC 3 1 = 1/216 Zoll }
- PrintString(#13#10);
- IF error THEN GOTO 9; { CR LF }
- PrintString(#9#27#76 + Chr(n1) + Chr(n2));
- IF error THEN GOTO 9; { TAB ESC L }
- FOR x := 0 TO Pred(xres) DO BEGIN
- PrintString(chr(g[x]));
- END;
-
- PrintString(#27#51#0);
- IF error THEN GOTO 9; {ESC 3 1 = 1/216 Zoll }
- PrintString(#13#10);
- IF error THEN GOTO 9; { CR LF }
- PrintString(#9#27#76 + Chr(n1) + Chr(n2));
- IF error THEN GOTO 9; { TAB ESC L }
- FOR x := 0 TO Pred(xres) DO BEGIN
- PrintString(chr(g[x]));
- END;
-
- END;
- PrintString(#27#65#12#27#50);
- IF error THEN GOTO 9; { ESC 12/72" Zoll }
- PrintString(#27#85#48);
- IF error THEN GOTO 9; { ESC U 0 = unidirect. off }
- PrintString(#27#64);
- IF error THEN GOTO 9; { Reset }
- 9:
- END;
- (* ------------------------------------------------- *)
- (* Ende von HARDCOPY.PAS *)
-
-