调用中断获取系统运行时间
//自定义函数
function GetSysTime:dword;
asm //汇编开始标志
int $2a //调用2a号中断获取系统从启动运行时间(毫秒)
end;
procedure TForm1.Button1Click(Sender: TObject);
var
hours:dword;//小时
sec:dword; //分钟
begin
hours:=GetSysTime() div 3600000;
sec:=GetSysTime() mod 3600000 div 60000;
edit1.Text:='系统从启动运行了:'+inttostr(hours)+'小时'+inttostr(sec)+'分钟';
end;