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 >
C/C++ Source or Header  |  1995-10-17  |  2KB  |  124 lines

  1. #include "c:\bios21\bios10.cpp"
  2.  
  3.  
  4. void main(void)
  5. {
  6. Set_Mode(0x0E); //Must be 0x format
  7. int start1;
  8. int end1;
  9. int start2;
  10. int end2;
  11. int start3;
  12. int end3;
  13. int start4;
  14. int end4;
  15. int start5;
  16. int end5;
  17. int start6;
  18. int end6;
  19. int start7;
  20. int end7;
  21. int start8;
  22. int end8;
  23. int start9;
  24. int end9;
  25. int start10;
  26. int end10;
  27. int temp;
  28.  
  29. start1 = Get_Tick();
  30. for(temp = 0; temp < 5000;temp++)
  31.     {
  32.     printf("A");
  33.     }
  34.  
  35. end1 = Get_Tick();
  36. getch();
  37. getch();
  38. start2 = Get_Tick();
  39. for(temp = 0; temp < 5000;temp++)
  40.     {
  41.     putc('B',stdout);
  42.     }
  43. end2 = Get_Tick();
  44. getch();
  45. getch();
  46. start3 = Get_Tick();
  47. for(temp = 0; temp < 5000;temp++)
  48.     {
  49.     fputc('C',stdout);
  50.     }
  51. end3 = Get_Tick();
  52. getch();
  53. getch();
  54. start4 = Get_Tick();
  55. for(temp = 0; temp < 5000;temp++)
  56.     {
  57.     putch('D');
  58.     }
  59. end4 = Get_Tick();
  60. getch();
  61. getch();
  62. start5  = Get_Tick();
  63. for(temp = 0; temp < 5000;temp++)
  64.     {
  65.     cputs("E");
  66.     }
  67. end5 = Get_Tick();
  68. getch();
  69. getch();
  70. start6 = Get_Tick();
  71. for(temp = 0; temp < 5000;temp++)
  72.     {
  73.     cprintf("F");
  74.     }
  75. end6 = Get_Tick();
  76. getch();
  77. getch();
  78. start7 = Get_Tick();
  79. for(temp = 0; temp < 5000;temp++)
  80.     {
  81.      Display_Char('G');
  82.     }
  83. end7 = Get_Tick();
  84. getch();
  85. getch();
  86. start8 = Get_Tick();
  87. for(temp = 0; temp < 5000;temp++)
  88.     {
  89.      Write_Teletype(72,RED,0);  /////Write Teletype is fastest
  90.     }
  91. end8 = Get_Tick();
  92. getch();
  93. getch();
  94. start9 = Get_Tick();
  95. for(temp = 0; temp < 5000;temp++)
  96.     {
  97.     Write_Teletype('I',RED,0);
  98.     }
  99. end9 = Get_Tick();
  100. getch();
  101. getch();
  102. start10 = Get_Tick();
  103. for(temp = 0; temp < 5000;temp++)
  104.     {
  105.     Write_Teletype('J',WHITE);//Current page
  106.     }
  107. end10 = Get_Tick();
  108. getch();
  109. getch();
  110. printf("\n1----%d\n",(end1 - start1));
  111. printf("2----%d\n",(end2 - start2));
  112. printf("3----%d\n",(end3 - start3));
  113. printf("4----%d\n",(end4 - start4));
  114. printf("5----%d\n",(end5 - start5));
  115. printf("6----%d\n",(end6 - start6));
  116. printf("7----%d\n",(end7 - start7));
  117. printf("8----%d\n",(end8 - start8));
  118. printf("9----%d\n",(end9 - start9));
  119. printf("10---%d\n",(end10 - start10));
  120. getch();
  121. getch();
  122. Set_Mode(TEXT_MODE); //Must be 0x format
  123. return;
  124. }