#include // kbhit() #include #include // etc. int main(int argc, char* argv[]) { // type definitions // open serial port as COMXX // establish whether 5 or 7 bits through argv[1], and pick mask while (!kbhit()) { ReadFile(hSerial, sInBuff, 1, &dwBytesRead, NULL); if (dwBytesRead > 0) { // apply masks // parity check // LRC calculation // string formatting } } // print results CloseHandle(hSerial); return 0; }