diff --git a/bin/loader.cpp b/bin/loader.cpp index 2345242..ef272cd 100644 --- a/bin/loader.cpp +++ b/bin/loader.cpp @@ -588,6 +588,13 @@ void MemoryLogger(uint32_t address, int size, int readWrite, uint32_t value) } } +void MidInstructionExceptionFunc() +{ + // todo - cpu exception? + fprintf(stderr, "Mid Instruction Exception!\n"); + //throw std::runtime_error::runtime_error("mid instruction exception"); +} + #define MPW_VERSION "0.7.1 [kf]" void help() @@ -920,6 +927,8 @@ int main(int argc, char **argv) cpuSetALineExceptionFunc(ToolBox::dispatch); cpuSetFLineExceptionFunc(MPW::dispatch); + cpuSetMidInstructionExceptionFunc(MidInstructionExceptionFunc); + if (Flags.traceGlobals) //memorySetGlobalLog(kGlobalSize); memorySetLoggingFunc(MemoryLogger);