BIOS reset

Long time ago there was a time I was fascinated by getting access to password protected BIOS configurations (CMOS confguration as it was called back then). I read lot of books about resetting the BIOS/CMOS and found this method to restore the BIOS configuration to it's factory default.

I was using a Dell Pentium PC back then, and code worked on that and few other 486 machines as I remember.

bios-reset.pas
  1. {BIOS/CMOS Reset,  Version 1.00}
  2. {[03/18/1998]}
  3. uses
  4.   crt;
  5.  
  6. var
  7.   ch:char;
  8.  
  9. begin
  10.   writeln('This program will RESET ALL BIOS/CMOS SETTINGS.');
  11.   write('Are you sure you want to continue? (Y/N):');
  12.   repeat
  13.     begin
  14.       ch:=upcase(readkey);
  15.     end;
  16.   until(ch='Y')or(ch='N');
  17.  
  18.   writeln;
  19.   writeln;
  20.   if(ch='Y')then
  21.     begin
  22.       asm
  23.         push ax
  24.         mov al,11h
  25.         out 70h,al
  26.         xor al,al
  27.         out 71h,al
  28.         pop ax
  29.       end;
  30.  
  31.       writeln('BIOS/CMOS settings changed.');
  32.       writeln('Systems will restart now.');
  33.       write('Press a key to continue...');
  34.       ch:=upcase(readkey);
  35.  
  36.       asm
  37.         push ax
  38.         mov al,0feh
  39.         out 64h,al
  40.         pop ax
  41.       end;
  42.  
  43.     end;
  44.  
  45. end.