#include <stdio.h> #include <conio.h> #include <dos.h> int main(void) { unsigned char low, high; unsigned int const_1, const_2, rez; int i; clrscr(); outportb(0x43,0x80); outportb(0x42,0xFF); outportb(0x42,0xFF); const_1 = ((unsigned int)high<<8)|low; for (i = 0; i <= 10*4; i++) printf("%5d",i); outportb(0x43,0x80); low = inportb(0x42); high = inportb(0x42); const_2 = ((unsigned int)high<<8)|low; rez = const_1 - const_2; printf("\n CLK= %u",rez); printf("\n время %f mksek",rez*0.84/1000); getch(); return 0; } |