80 lines
2.3 KiB
C++
80 lines
2.3 KiB
C++
#include <common/windows.hpp>
|
|
#include <common/guiwnd.hpp>
|
|
#include <common/string.hpp>
|
|
#include <m68hc11/commctrl.hpp>
|
|
|
|
extern "C"
|
|
{
|
|
__declspec(dllexport) void FAR PASCAL procDebug(CommControl &commControl);
|
|
}
|
|
|
|
BOOL WINAPI DLLMain(HINSTANCE hDLLInst,DWORD dwReason,LPVOID lpReserved)
|
|
{
|
|
switch(dwReason)
|
|
{
|
|
case DLL_PROCESS_ATTACH :
|
|
break;
|
|
case DLL_PROCESS_DETACH :
|
|
break;
|
|
case DLL_THREAD_ATTACH :
|
|
break;
|
|
case DLL_THREAD_DETACH :
|
|
break;
|
|
default :
|
|
break;
|
|
}
|
|
return TRUE;
|
|
}
|
|
|
|
void FAR PASCAL procDebug(CommControl &commControl)
|
|
{
|
|
BYTE charByte(0xFF);
|
|
BYTE rcvBuffer[256];
|
|
WORD address;
|
|
BYTE charByte(0xFF);
|
|
String strString;
|
|
|
|
commControl.read(&address,sizeof(address));
|
|
::sprintf(strString,"%08lx\n",int(address));
|
|
::MessageBox(::GetFocus(),(LPSTR)strString,"VALUE",MB_OK);
|
|
commControl.write(&charByte,sizeof(charByte));
|
|
|
|
}
|
|
|
|
#if 0
|
|
commControl.read(&,sizeof(address));
|
|
::sprintf(strString,"SWIHANDER %08lx\n",int(address));
|
|
::MessageBox(::GetFocus(),(LPSTR)strString,"VALUE",MB_OK);
|
|
commControl.write(&charByte,sizeof(charByte));
|
|
|
|
commControl.read(&address,sizeof(address));
|
|
::sprintf(strString,"contents of SWI vector %08lx\n",int(address));
|
|
::MessageBox(::GetFocus(),(LPSTR)strString,"VALUE",MB_OK);
|
|
commControl.write(&charByte,sizeof(charByte));
|
|
|
|
commControl.read(&address,sizeof(address));
|
|
::sprintf(strString,"SWIHANDER %08lx\n",int(address));
|
|
::MessageBox(::GetFocus(),(LPSTR)strString,"VALUE",MB_OK);
|
|
commControl.write(&charByte,sizeof(charByte));
|
|
|
|
commControl.read(&address,sizeof(address));
|
|
::sprintf(strString,"contents of SWI vector %08lx\n",int(address));
|
|
::MessageBox(::GetFocus(),(LPSTR)strString,"VALUE",MB_OK);
|
|
commControl.write(&charByte,sizeof(charByte));
|
|
#endif
|
|
// ldd SWIHANDLER ; get address of SWIHANDLER to register D
|
|
// bsr WRITEWORD ; send it out to SCI
|
|
// bsr WAITCHAR ; wait for a character
|
|
// ldd [SWI] ; load contents of SWI vector ?
|
|
// bsr WRITEWORD ; send it out to SCI
|
|
// bsr WAITCHAR ; wait for a character
|
|
// ldd SWIHANDLER ; load address of SWIHANDLER to register D
|
|
// std [SWI] ; store SWIHANDLER at swi vector ?
|
|
// ldd [SWI] ; load contents of SWIHANDLER
|
|
// bsr WRITEWORD ; send it out to SCI
|
|
// bsr WAITCHAR ; wait for a character
|
|
|
|
|
|
|
|
|