home *** CD-ROM | disk | FTP | other *** search
- {-------------------------------------------------------------------------}
- { PGM-AIDE.DVR }
- {-------------------------------------------------------------------------}
- { Copyright 1985 by Lynn A. Canning }
- { 9107 Grandview Dr. }
- { Overland Park, Ks. 66212 }
- { }
- { This routine was placed in the public domain by the author }
- { It may be used and copied as desired but it may not be sold }
- {-------------------------------------------------------------------------}
-
- Var
-
- ch :char;
- cx,cy :byte;
-
- {-------------------------------------------------------------------------}
- { Check for Printer Ready }
- {-------------------------------------------------------------------------}
-
- procedure check_printer;
- begin
- with regs do begin
- ax := $02 shl 8; {Set for service 2}
- dx := $0000; {Set printer number}
- end;
- Intr($17,regs); {invoke interrupt 23}
- if halfregs.ah <> 144 then begin {if not = 144 then printer not ready}
- ch := ' ';
- MkWin(26,12,54,18,2,4,0);
- gotoxy(1,2);
- Writeln(' Printer not ready');
- Writeln(' Set up printer and retry');
- TimeDelay(3);
- RmWin;
- end;
- end;
-
- {-------------------------------------------------------------------------}
- { Display Program Aide Menu }
- {-------------------------------------------------------------------------}
-
- procedure init_window;
- begin
- MkWin(17,5,63,20,2,6,0);
- ClrScr;
- gotoxy(1,2);
- Writeln(' Program Aide Menu');
- Writeln;
- Writeln(' (C) Copyright 1985 by Lynn A. Canning');
- Writeln(' Version 1.00');
- Writeln;
- Writeln;
- Writeln(' 1 = Screen Counter');
- Writeln(' 2 = Epson Window');
- Writeln(' X = Exit');
- Writeln;
- Writeln(' Option Wanted ');
- gotoxy(29,12);
- Read(Kbd,ch);
- if ch = quit_key then Stay_Xit;
- if ch = '2' then
- check_printer;
- RmWin;
- gotoxy(cx,cy);
- end;
-
- {-------------------------------------------------------------------------}
- { Main Program }
- {-------------------------------------------------------------------------}
-
- begin
- cx := wherex;
- cy := wherey;
- repeat init_window;
- until (ch = '1') or (ch = '2') or (upcase(ch) = 'X');
- gotoxy(cx,cy);
- if ch = '1' then
- SC
- else
- if ch = '2' then
- EP;
- end;