#include #include #include #include void getrealtime() { char hod,min,sec; asm{ mov ah,02h; int 01ah; mov hod,ch; mov min,cl; mov sec,dh; } gotoxy(10,9); printf("%2x:%2x:%2x",hod,min,sec); } void getdostime() { struct time t; gettime(&t); gotoxy(10,10); printf("%2d:%2d:%2d",t.ti_hour,t.ti_min,t.ti_sec); } void main(int argc, char *args[]) { int del; if (argc!=1) { del = atoi(args[1]); asm{ mov al,00110110b out 43h, al mov bx,del mov al, bl out 40h, al mov al, bh out 40h, al } } clrscr(); do { getrealtime(); getdostime(); } while (!kbhit()); }