1
0
Fork 0

support for cpu trap flag

Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@479
This commit is contained in:
Ulf Wohlers 2002-11-04 21:27:03 +00:00
parent 1f69ee249e
commit 8dc5a523de
3 changed files with 29 additions and 6 deletions

View file

@ -856,10 +856,15 @@ restart:
}
break;
case 0xcc: /* INT3 */
#if C_DEBUG
SAVEIP;
if (DEBUG_Breakpoint()) {
LOADIP;
return 1;
}
LOADIP;
#endif
INTERRUPT(3);
#if C_DEBUG
return 1;
#endif
break;
case 0xcd: /* INT Ib */
{

View file

@ -376,7 +376,10 @@ countzero:
PIC_runIRQs(); \
LOADIP; \
} \
if (flags.tf) LOG_DEBUG("CPU:Trap Flag not supported"); \
if (flags.tf) { \
cpudecoder=&CPU_Real_16_Slow_Decode_Trap; \
count=0; \
} \
}
#else
@ -394,7 +397,10 @@ countzero:
PIC_runIRQs(); \
LOADIP; \
} \
if (flags.tf) LOG_DEBUG("CPU:Trap Flag not supported"); \
if (flags.tf) { \
cpudecoder=&CPU_Real_16_Slow_Decode_Trap; \
count=0; \
} \
}
#endif

View file

@ -60,7 +60,8 @@ extern Bitu cycle_count;
#endif
#include "core_16/support.h"
static Bitu CPU_Real_16_Slow_Decode_Special(Bitu count);
static Bitu CPU_Real_16_Slow_Decode_Special(Bits count);
static Bitu CPU_Real_16_Slow_Decode_Trap(Bits count);
static Bitu CPU_Real_16_Slow_Decode(Bits count) {
#include "core_16/start.h"
@ -78,6 +79,17 @@ static Bitu CPU_Real_16_Slow_Decode(Bits count) {
return CBRET_NONE;
}
static Bitu CPU_Real_16_Slow_Decode_Trap(Bits count)
{
CPU_Real_16_Slow_Decode(1);
LOG_DEBUG("TRAP: Trap Flag executed");
INTERRUPT(1);
cpudecoder=&CPU_Real_16_Slow_Decode;
return CBRET_NONE;
};
static Bitu CPU_Real_16_Slow_Decode_Special(Bits count) {
while (count>0) {
if (flags.tf) {