home *** CD-ROM | disk | FTP | other *** search
/ Programmer 7500 / MAX_PROGRAMMERS.iso / INFO / TURBOPAS / NOHARD.ZIP / NOHARD.PAS < prev   
Encoding:
Pascal/Delphi Source File  |  1980-01-01  |  1.6 KB  |  64 lines

  1. {$U+}
  2.  
  3. program NoHardDiskAccess(input,output);
  4.  
  5. const
  6.  INT13 = $4C;
  7.  INT40 = $100;
  8.  Equip_Seg = $40;
  9.  
  10. type
  11.  anystring = string[255];
  12.  
  13. var
  14.  Byte0,
  15.  Byte1,
  16.  Byte2,
  17.  Byte3 : integer;
  18.  
  19. begin
  20.  clrscr;
  21.  writeln('(c) Copyright 1986 Eric Lambart');
  22.  writeln;
  23.  writeln;
  24.  writeln;
  25.  writeln;
  26.  writeln('This program is released in the public domain to be distributed freely');
  27.  writeln('for non-commercial purposes. If you like this program and would like');
  28.  writeln('to donate, send donations to :');
  29.  textcolor(white);
  30.  writeln('Eric Lambart-Ryan');
  31.  writeln('P.O. Box 2');;
  32.  writeln('Santa Monica, CA 90406');
  33.  writeln;
  34.  writeln;
  35.  if mem[Equip_Seg:$75] < 1 then
  36.   begin
  37.    writeln('You don''t have any hard disks. You have no use for this program.');
  38.    writeln('Sorry...');
  39.    halt;
  40.   end;
  41.  writeln;
  42.  writeln('Your hard disk probably has read-only buffering, so you should probably');
  43.  writeln('still be able to do a "dir" of your hard disk, but when the computer does');
  44.  writeln('a physical read or write to/from the disk, you will get an "error reading');
  45.  writeln('drive x:"');
  46.  writeln('Thus, you do not have to worry about Trojan Programs eating your Fixed Disk');
  47.  writeln('because of buffering.');
  48.  writeln;
  49.  write('Press any key to disable hard disk until you do a warm boot...');
  50.  repeat
  51.  until keypressed;
  52.  writeln('Disabling Hard Disk Access...');
  53.  writeln;
  54.  writeln;
  55.  Byte0 := mem[$0:Int40];
  56.  Byte1 := mem[$0:Int40 + 1];
  57.  Byte2 := mem[$0:Int40 + 2];
  58.  Byte3 := mem[$0:Int40 + 3];
  59.  mem[$0:Int13] := Byte0;
  60.  mem[$0:Int13 + 1] := Byte1;
  61.  mem[$0:Int13 + 2] := Byte2;
  62.  mem[$0:Int13 + 3] := Byte3;
  63. end.
  64.