打印本文 打印本文 关闭窗口 关闭窗口
读写CMOS内存
作者:武汉SEO闵涛  文章来源:敏韬网  点击数1851  更新时间:2009/4/23 18:40:06  文章录入:mintao  责任编辑:mintao
Rec.WP2,''''): '''');readln(CMOSRec.WP2);
hd1 := 0; hd2 :=0;
if (CMOSRec.FixedDriveType1>46) then hd1 := $f;
if (CMOSRec.FixedDriveType2>46) then hd2 := $f;
CMOSRec.FixedDrive := hd1 shl 4 + hd2;
fd2 := CMOSRec.FloppyDrive and $f;
fd1 := CMOSRec.FloppyDrive shr 4;
write(''''Floppy Drive 1 ('''');
case fd1 of
1 : write(''''360KB 5.25''''''''): '''');
2 : write(''''1.2MB 5.25''''''''): '''');
4 : write(''''1.44MB 3.5''''''''): '''');
6 : write(''''720KB 3.5''''''''): '''');
end;
readln(fd1);
write(''''Floppy Drive 2 ('''');
case fd2 of
1 : write(''''360KB 5.25''''''''): '''');
2 : write(''''1.2MB 5.25''''''''): '''');
4 : write(''''1.44MB 3.5''''''''): '''');
6 : write(''''720KB 3.5''''''''): '''');
end;
readln(fd2);
CMOSRec.FloppyDrive := fd1 shl 4 + fd2;
CMOSRec.CheckSum := 0;
for i := 17 to 46 do inc(CMOSRec.CheckSum,data[i]);
i := CMOSRec.CheckSum;
data[47] := hi(i);
data[48] := lo(i);
end;
procedure help;
begin
WriteLn(''''Syntex:''''+^J^M+
'''' CMOS /R --- read information from CMOS RAM ''''+^J^M+
'''' and write it to CMOS.DAT file ''''+^J^M+
'''' CMOS /W --- read configuration information from CMOS.DAT ''''+^J^M+
'''' and write it to CMOS RAM'''');
Writeln('''' CMOS /M --- modify CMOS information and save it''''^J^M+
'''' Floppy Drive Type:''''+^J^M+
'''' 1 : 360KB 5.25''''''''''''+^J^M+
'''' 2 : 1.2MB 5.25''''''''''''+^J^M+
'''' 4 : 1.44MB 3.5''''''''''''+^J^M+
'''' 6 : 720KB 3.5'''''''''''');
end;
var ch : char;
temp : string;
ICMOS : TCMOS;
begin
WriteLn(''''CMOS Proctector 1.00, Copyright (c) 1995 Dong Zhanshan'''');
if paramcount = 1 then
begin
temp := paramstr(1);
ch := upcase(temp[2]);
case ch of
''''M'''' : begin
ICMOS.ReadCMOS;
ICMOS.ModifyCMOS;
ICMOS.DisplayCMOS;
ICMOS.WriteFile;
ICMOS.WriteCMOS;
end;
''''R'''' : begin
ICMOS.ReadCMOS;
ICMOS.DisplayCMOS;
ICMOS.WriteFile;

end;
''''W'''' : begin
ICMOS.ReadFile;
ICMOS.DisplayCMOS;
ICMOS.WriteCMOS;
end;
else help;
end;
end
else
help;
end. 

上一页  [1] [2] 

打印本文 打印本文 关闭窗口 关闭窗口