#include int PASCAL WinMain(HINSTANCE /*hInstance*/,HINSTANCE /*hPrevInstance*/,LPSTR /*lpszCmdLine*/,int /*nCmdShow*/) { MainFrame frameWindow; // frameWindow.splash(); frameWindow.createWindow("M68HC11","M68HC11 v1.00","mainMenu","MOT"); return frameWindow.messageLoop(); } #if 0 #include int PASCAL WinMain(HINSTANCE /*hInstance*/,HINSTANCE /*hPrevInstance*/,LPSTR /*lpszCmdLine*/,int /*nCmdShow*/) { CommControl commControl; CommStatus commStatus; DeviceControlBlock deviceControlBlock; BYTE charByte(0xFF); commControl.open(CommControl::PortCOM1); if(!commControl.isOkay())return FALSE; if(!commControl.setDeviceControlBlock("baud=1200 data=8 stop=1 parity=N"))::OutputDebugString("Set operation failed\n"); String strString; charByte='a'; while(TRUE) { commControl.write(&charByte,sizeof(charByte)); // commControl.waitForData(); commControl.read(&charByte,sizeof(charByte)); ::sprintf(strString,"%02x\n",(int)charByte); ::OutputDebugString(strString); charByte++; // commControl.clearError(commStatus); // if(commStatus.bytesInReceiveQueue()) // { // commControl.read(&charByte,sizeof(charByte)); // ::sprintf(strString,"%02x\n",(int)charByte); // ::OutputDebugString(strString); // break; // } ::Sleep(250); } /* ::OutputDebugString("waiting for break signal...\n"); commControl.setEventMask(CommControl::EventBreak); // EventBreak if(!commControl.waitEvent())::OutputDebugString("timeout waiting for break.\n"); else ::OutputDebugString("break received, loading code...\n"); BYTE ioBuffer[256]; for(int index=0;index<256;index++)ioBuffer[index]=index; charByte=0xFF; commControl.write(&charByte,sizeof(charByte)); // commControl.clearError(commStatus); // if(commStatus.bytesInReceiveQueue())commControl.read(ioBuffer,commStatus.bytesInReceiveQueue()); commControl.write(ioBuffer,sizeof(ioBuffer)); ::memset(ioBuffer,0,sizeof(ioBuffer)); String strString; ::OutputDebugString("receiving echo\n"); while(TRUE) { commControl.clearError(commStatus); if(commStatus.bytesInReceiveQueue()) { commControl.read(ioBuffer,sizeof(ioBuffer)); for(index=0;index+8