home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
DP Tool Club 26
/
CD_ASCQ_26_1295.iso
/
vrac
/
volume_3.zip
/
TEST_PRT.CPP
< prev
next >
Wrap
C/C++ Source or Header
|
1995-10-17
|
2KB
|
124 lines
#include "c:\bios21\bios10.cpp"
void main(void)
{
Set_Mode(0x0E); //Must be 0x format
int start1;
int end1;
int start2;
int end2;
int start3;
int end3;
int start4;
int end4;
int start5;
int end5;
int start6;
int end6;
int start7;
int end7;
int start8;
int end8;
int start9;
int end9;
int start10;
int end10;
int temp;
start1 = Get_Tick();
for(temp = 0; temp < 5000;temp++)
{
printf("A");
}
end1 = Get_Tick();
getch();
getch();
start2 = Get_Tick();
for(temp = 0; temp < 5000;temp++)
{
putc('B',stdout);
}
end2 = Get_Tick();
getch();
getch();
start3 = Get_Tick();
for(temp = 0; temp < 5000;temp++)
{
fputc('C',stdout);
}
end3 = Get_Tick();
getch();
getch();
start4 = Get_Tick();
for(temp = 0; temp < 5000;temp++)
{
putch('D');
}
end4 = Get_Tick();
getch();
getch();
start5 = Get_Tick();
for(temp = 0; temp < 5000;temp++)
{
cputs("E");
}
end5 = Get_Tick();
getch();
getch();
start6 = Get_Tick();
for(temp = 0; temp < 5000;temp++)
{
cprintf("F");
}
end6 = Get_Tick();
getch();
getch();
start7 = Get_Tick();
for(temp = 0; temp < 5000;temp++)
{
Display_Char('G');
}
end7 = Get_Tick();
getch();
getch();
start8 = Get_Tick();
for(temp = 0; temp < 5000;temp++)
{
Write_Teletype(72,RED,0); /////Write Teletype is fastest
}
end8 = Get_Tick();
getch();
getch();
start9 = Get_Tick();
for(temp = 0; temp < 5000;temp++)
{
Write_Teletype('I',RED,0);
}
end9 = Get_Tick();
getch();
getch();
start10 = Get_Tick();
for(temp = 0; temp < 5000;temp++)
{
Write_Teletype('J',WHITE);//Current page
}
end10 = Get_Tick();
getch();
getch();
printf("\n1----%d\n",(end1 - start1));
printf("2----%d\n",(end2 - start2));
printf("3----%d\n",(end3 - start3));
printf("4----%d\n",(end4 - start4));
printf("5----%d\n",(end5 - start5));
printf("6----%d\n",(end6 - start6));
printf("7----%d\n",(end7 - start7));
printf("8----%d\n",(end8 - start8));
printf("9----%d\n",(end9 - start9));
printf("10---%d\n",(end10 - start10));
getch();
getch();
Set_Mode(TEXT_MODE); //Must be 0x format
return;
}