home *** CD-ROM | disk | FTP | other *** search
- (* ------------------------------------------------------ *)
- (* DRUCKER.PAS *)
- (* Utility zur Druckerinitialisierung per Funktionstasten *)
- (* (c) 1989 Siegfried Hund & TOOLBOX *)
- (* ------------------------------------------------------ *)
- PROGRAM Drucker; USES Dos, Crt, Printer;
-
- VAR
- TEXT : ARRAY[1..19] OF STRING[57];
- i, x : INTEGER;
- taste : CHAR;
- mono : BOOLEAN;
-
- PROCEDURE Init;
- BEGIN
- TEXT[ 1] := '╔══════════════════════════' +
- '═══════════════════════════╗';
- TEXT[ 2] := '║ Drucker-Installation ' +
- 'für XXX-Drucker ║';
- TEXT[ 3] := '║ (c) 1989 Siegfried Hund' +
- ' & TOOLBOX ║';
- TEXT[ 4] := '╟─────────────────────────'+
- '─╥──────────────────────────╢';
- TEXT[ 5] := '║ F1 Zeilenvorschub '+
- '║ F11 Seitenvorschub ║';
- TEXT[ 6] := '║ F2 Zeichensatz 1 · '+
- '║ F12 Zeichensatz 2 √ ║';
- TEXT[ 7] := '║ F3 Schönschrift ein · '+
- '║ F13 Schönschrift aus · ║';
- TEXT[ 8] := '║ F4 Breitschrift ein · '+
- '║ F14 Breitschrift aus · ║';
- TEXT[ 9] := '║ F5 Schmalschrift ein · '+
- '║ F15 Schmalschrift aus · ║';
- TEXT[10] := '║ F6 Doppeldruck ein · '+
- '║ F16 Doppeldruck aus · ║';
- TEXT[11] := '║ F7 Fettdruck ein · '+
- '║ F17 Fettdruck aus · ║';
- TEXT[12] := '║ F8 Unidirekt. Druck · '+
- '║ F18 Unidirekt. aus · ║';
- TEXT[13] := '║ F9 · '+
- '║ F19 · ║';
- TEXT[14] := '║ F10 Testdruck '+
- '║ F20 Reset ║';
- TEXT[15] := '║ ESC Menü verlassen '+
- '║ ESC Menü verlassen ║';
- TEXT[16] := '╟──────────────────────────'+
- '╫──────────────────────────╢';
- TEXT[17] := '║ F1 - F10 '+
- '║ Shift F1 - F10 ║';
- TEXT[18] := '║ '+
- '║ ║';
- TEXT[19] := '╚══════════════════════════'+
- '╩══════════════════════════╝';
- x:=2;
- TextBackground(white); TextColor(red);
- FOR i := 1 TO 19 DO BEGIN
- GotoXY(x,i); Write(TEXT[i]);
- END;
- END;
-
- PROCEDURE cursoroff;
- VAR regs : Registers;
- BEGIN
- regs.ax := $0100; regs.cx := $2607; Intr($10, regs);
- END;
-
- PROCEDURE cursoron;
- VAR regs : Registers;
- BEGIN
- IF mono = FALSE THEN BEGIN
- regs.cx := $0007; regs.ax := $0100;
- END ELSE BEGIN
- regs.cx := 11 SHL 8; regs.cx := regs.cx OR 13;
- regs.ax := 1 SHL 8;
- END;
- Intr($10, regs);
- END;
-
- BEGIN
- Init; cursoroff;
- REPEAT
- taste := ReadKey; IF taste = #0 THEN taste := ReadKey;
- CASE taste OF
- ';' : Write(LST, Chr(10)); { F1 }
- '<' : BEGIN
- GotoXY(x + 25, 6); Write('√');
- GotoXY(x + 52, 6); Write('·');
- Write(LST, Chr(27) + Chr(55)); { F2 }
- END;
- '=' : BEGIN
- GotoXY(x + 25, 7); Write('√');
- GotoXY(x + 52, 7); Write('·');
- Write(LST,Chr(27)+Chr(120)+Chr(49)); { F3 }
- END;
- '>' : BEGIN
- GotoXY(x + 25, 8); Write('√');
- GotoXY(x + 52, 8); Write('·');
- Write(LST,Chr(27)+Chr(87)+Chr(49)); { F4 }
- END;
- '?' : BEGIN
- GotoXY(x + 25, 9); Write('√');
- GotoXY(x + 52, 9); Write('·');
- Write(LST,Chr(15)); { F5 }
- END;
- '@' : BEGIN
- GotoXY(x + 25,10); Write('√');
- GotoXY(x + 52,10); Write('·');
- Write(LST,Chr(27)+Chr(71)); { F6 }
- END;
- 'A' : BEGIN
- GotoXY(x + 25,11); Write('√');
- GotoXY(x + 52,11); Write('·');
- Write(LST,Chr(27)+Chr(69)); { F7 }
- END;
- 'B' : BEGIN
- GotoXY(x + 25,12); Write('√');
- GotoXY(x + 52,12); Write('·');
- Write(LST,Chr(27)+Chr(85)+Chr(49)); { F8 }
- END;
- 'C' : BEGIN
- GotoXY(x + 25,13); Write('√');
- GotoXY(x + 52,13); Write('·');
- Write(LST,Chr(7)); { F9 }
- END;
- 'D' : BEGIN
- Write(LST,' Dies ist der Testdruck '); { F10 }
- Write(LST,Chr(10));
- END;
- 'T' : Write(LST,Chr(12)); { F11 }
- 'U' : BEGIN
- GotoXY(x + 25, 6); Write('·');
- GotoXY(x + 52, 6); Write('√');
- Write(LST,Chr(27)+Chr(54)); { F12 }
- END;
- 'V' : BEGIN
- GotoXY(x + 25, 7); Write('·');
- GotoXY(x + 52, 7); Write('√');
- Write(LST,Chr(27)+Chr(120)+Chr(48)); { F13 }
- END;
- 'W' : BEGIN
- GotoXY(x + 25, 8); Write('·');
- GotoXY(x + 52, 8); Write('√');
- Write(LST,Chr(27)+Chr(85)+Chr(48)); { F14 }
- END;
- 'X' : BEGIN
- GotoXY(x + 25, 9); Write('·');
- GotoXY(x + 52, 9); Write('√');
- Write(LST,Chr(18)); { F15 }
- END;
- 'Y' : BEGIN
- GotoXY(x + 25,10); Write('·');
- GotoXY(x + 52,10); Write('√');
- Write(LST,Chr(27)+Chr(72)); { F16 }
- END;
- 'Z' : BEGIN
- GotoXY(x + 25,11); Write('·');
- GotoXY(x + 52,11); Write('√');
- Write(LST,Chr(27)+Chr(70)); { F17 }
- END;
- '[' : BEGIN
- GotoXY(x + 25,12); Write('·');
- GotoXY(x + 52,12); Write('√');
- Write(LST,Chr(27)+Chr(85)+Chr(48)); { F18 }
- END;
- '\' : BEGIN
- GotoXY(x + 25,13); Write('·');
- GotoXY(x + 52,13); Write('√');
- Write(LST,Chr(7)); { F19 }
- END;
- ']' : BEGIN
- FOR i:=6 TO 13 DO BEGIN { F20 }
- GotoXY(x + 25, i); Write('·');
- GotoXY(x + 52, i); Write('·');
- END;
- GotoXY(x + 52, 6); Write('√');
- Write(LST, Chr(27)+Chr(64));
- END;
- END;
- UNTIL taste = Chr(27);
- cursoron; TextBackground(black); TextColor(white);
- END.
- (* ------------------------------------------------------ *)
- (* Ende von DRUCKER.PAS *)