home *** CD-ROM | disk | FTP | other *** search
/ Programmer 7500 / MAX_PROGRAMMERS.iso / PASCAL / PRTSTAT.ZIP / PRTSTAT.PAS
Encoding:
Pascal/Delphi Source File  |  1987-01-30  |  640 b   |  23 lines

  1. var status : integer;
  2.     Ch   : Char;
  3.  begin
  4.    Clrscr;
  5.    status := port[$3bd];
  6.    status := status and $f8;
  7.    status := status xor $48;
  8.    gotoxy(1,2);
  9.    writeln('Printer status = ',status);
  10.    write('Initialize Printer? (Y/N)');
  11.    readln(con,Ch);
  12.    If UpCase(CH) = 'Y' then
  13.      Begin
  14.       portw[$3be] := 8;
  15.       delay(1000);
  16.       portw[$3be] := $0c;
  17.       status := port[$3bd];
  18.       status := status and $f8;
  19.       status := status xor $48;
  20.       Writeln('Printer initialized  -  New status = ',status);
  21.     end;
  22. end.
  23.