Version 2.0

New features. Bug fixes.
This commit is contained in:
Marek Karcz 2016-03-14 00:28:53 -04:00
parent 67f1a62596
commit 32f2b2d12c
29 changed files with 19035 additions and 19022 deletions

View File

@ -325,7 +325,7 @@ Regs *VMachine::Step()
char c = -1;
mCharIO = false;
while ((c = mpRAM->GetCharOut()) != -1) {
mOpInterrupt = (c == OPINTERRUPT);
mOpInterrupt = mOpInterrupt || (c == OPINTERRUPT);
if (!mOpInterrupt) {
mpDisp->PutChar(c);
mCharIO = true;
@ -903,13 +903,26 @@ unsigned short VMachine::GetRunAddr()
*--------------------------------------------------------------------
* Method: SetOpInterrupt()
* Purpose: Set the flag indicating operator interrupt.
* Arguments: n/a
* Arguments: bool - new value of the flag
* Returns: n/a
*--------------------------------------------------------------------
*/
void VMachine::SetOpInterrupt()
void VMachine::SetOpInterrupt(bool opint)
{
mOpInterrupt = true;
mOpInterrupt = opint;
}
/*
*--------------------------------------------------------------------
* Method: IsOpInterrupt()
* Purpose: Return the flag indicating operator interrupt status.
* Arguments: n/a
* Returns: bool - true if operator interrupt flag was set
*--------------------------------------------------------------------
*/
bool VMachine::IsOpInterrupt()
{
return mOpInterrupt;
}
/*

View File

@ -56,7 +56,8 @@ class VMachine
unsigned short GetROMEnd();
bool IsROMEnabled();
unsigned short GetRunAddr();
void SetOpInterrupt();
void SetOpInterrupt(bool opint);
bool IsOpInterrupt();
queue<string> GetExecHistory();
unsigned short Disassemble(unsigned short addr, char *buf);

View File

@ -43,7 +43,7 @@ void trap_signal(int signum)
{
cout << "Signal caught: " << dec << signum << endl;
if (NULL != pvm && NULL != preg) {
pvm->SetOpInterrupt();
pvm->SetOpInterrupt(true);
opbrk = true;
}
//exit(signum);
@ -73,7 +73,7 @@ BOOL CtrlHandler(DWORD fdwCtrlType)
case CTRL_C_EVENT:
//Beep( 750, 300 );
if (NULL != pvm && NULL != preg) {
pvm->SetOpInterrupt();
pvm->SetOpInterrupt(true);
opbrk = true;
}
return TRUE;
@ -87,7 +87,7 @@ BOOL CtrlHandler(DWORD fdwCtrlType)
case CTRL_BREAK_EVENT:
//Beep( 900, 200 );
if (NULL != pvm && NULL != preg) {
pvm->SetOpInterrupt();
pvm->SetOpInterrupt(true);
opbrk = true;
}
return TRUE;
@ -271,7 +271,7 @@ void ShowMenu()
bool cls = false; \
brk = preg->SoftIrq; \
lrts = preg->LastRTS; \
while(step && nsteps > 1 && !brk && !lrts) { \
while(step && nsteps > 1 && !brk && !lrts && !opbrk) { \
cout << "addr: $" << hex << preg->PtrAddr << ", step: " << dec << stct; \
cout << " \r"; \
preg = pvm->Step(); \
@ -283,6 +283,7 @@ void ShowMenu()
this_thread::sleep_for(chrono::milliseconds(delay)); \
} \
brk = preg->SoftIrq; \
lrts = preg->LastRTS; \
nsteps--; \
stct++; \
} \
@ -348,17 +349,15 @@ int main(int argc, char** argv) {
cout << endl;
if (opbrk) {
cout << "Interrupted at " << hex << preg->PtrAddr << endl;
opbrk = brk = stop = lrts = false;
} else if (brk) {
cout << "BRK at " << hex << preg->PtrAddr << endl;
opbrk = brk = stop = lrts = false;
} else if (lrts) {
cout << "FINISHED at " << hex << ((newaddr > 0xFFFF) ? preg->PtrAddr : newaddr) << endl;
opbrk = brk = stop = lrts = false;
} else if (stop) {
cout << "STOPPED at " << hex << ((newaddr > 0xFFFF) ? preg->PtrAddr : newaddr) << endl;
opbrk = brk = stop = lrts = false;
}
opbrk = brk = stop = lrts = false;
pvm->SetOpInterrupt(false);
ShowRegs(preg,pvm,ioecho,true);
}
ShowMenu();

View File

@ -63,7 +63,7 @@
; 1/14/2012
; Modified Daryl Rictor's port to run on MKHBC-8-R1 homebrew
; computer under MKHBCOS (derivative of M.O.S. by Scott
Chidester).
; Chidester).
;
; 3/11/2016
; Adapted to run in MKBASIC (V65) emulator.

Binary file not shown.