// Data Received from receiver side will be // EF, 07, A7, 17 // Explanation // // Data Sent Data Received // 0d EF // 10 07 // 04 A7 // 12 17 // data // 0x240d // // There are two bytes. Lower byte is 0d and Higher byte is 24 // As we know that data will be sent in nibble format, starting from lower Nibble // toward the Higher Nibble. // First byte // First lower nibble d will be sent as 0d // And receiver will receive it as 11101111 = EF // // Next, Higher nibble 0 will be sent as // 00000000 | 00010000 = 00010000 = 0x10 // And receiver will receive it as // 00000111 = 07 // Second byte // Now moving toward next higher byte which is 24 // The lower nibble 4 will be send as 04 // And receiver will receive it as 10100111 = A7 // Next, Higher Nibble 2 will be sent as // 00000010 | 00010000 = 00010010 = 0x12 // And receiver will receive it as // 00010111 = 17 /////////////////////////////////////////////// #include #include unsigned long int far *time = (unsigned long int far*) 0x0040006C; void main() { unsigned long int tx,count=0; tx = (*time); while( count<=40) { while((*time) <= tx); clrscr(); printf("%d Secdonds ",count); tx+=18; count++; } //getch(); }