让硬盘休眠-ParkDisk程序
【打印文章】
PROCEDURE ParkDisk;
VAR Regs: Registers;
BEGIN
Regs.AL := $00;
Intr($13,Regs);
Assert((Regs.Flags AND FCarry) = 0,
'Error getting disk parameters - AL returns '+IntToStr (Regs.AL,0));
Regs.AH := $0C;
Regs.DL := $80;
Intr($13,Regs);
Assert((Regs.Flags AND FCarry) = 0,
'Error parking disk - AL returns '+IntToStr(Regs.AL,0));
END;
VAR Regs: Registers;
BEGIN
Regs.AL := $00;
Intr($13,Regs);
Assert((Regs.Flags AND FCarry) = 0,
'Error getting disk parameters - AL returns '+IntToStr (Regs.AL,0));
Regs.AH := $0C;
Regs.DL := $80;
Intr($13,Regs);
Assert((Regs.Flags AND FCarry) = 0,
'Error parking disk - AL returns '+IntToStr(Regs.AL,0));
END;
本栏文章均来自于互联网,版权归原作者和各发布网站所有,本站收集这些文章仅供学习参考之用。任何人都不能将这些文章用于商业或者其他目的。( Pfan.cn )
【编程爱好者论坛】