#include<iostream.h>
#include<dos.h>
#include<conio.h>
unsigned int ThoiGian=0;
void interrupt (*OldInt)(...);
void interrupt NewInt(...)
{
ThoiGian++;
OldInt();
}
void main()
{

int sogiay;
OldInt=getvect(0x08);
disable();
setvect(0x08,NewInt);
enable();
//..........
clrscr();
cout<<" Xin cho:\n";
while(sogiay<10)
{
disable();
sogiay=ThoiGian/18.21;
enable();
cout<<" chuong trinh da chay duoc 10 s:\n";

}
disable();

setvect(0x08,OldInt);
enable();
getch();
}