1
0
Fork 0

Check for interrupt flag and waiting irq's on moments where flags are changed.

Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@1095
This commit is contained in:
Sjoerd van der Berg 2003-07-08 16:46:28 +00:00
parent 090a3a0aa8
commit 0b12c58d77
2 changed files with 15 additions and 4 deletions

View file

@ -268,6 +268,10 @@ l_M_Ed:
flags.type=t_UNKNOWN;
CPU_IRET(false);
LoadIP();
if (GETFLAG(IF) && PIC_IRQCheck) {
SaveIP();
return CBRET_NONE;
}
goto nextopcode;
case D_IRETd:
flags.type=t_UNKNOWN;
@ -346,10 +350,9 @@ l_M_Ed:
goto nextopcode;
case D_STI:
SETFLAGBIT(IF,true);
if (PIC_IRQCheck) {
SaveIP();
PIC_runIRQs();
LoadIP();
if (GETFLAG(IF) && PIC_IRQCheck) {
LEAVECORE;
return CBRET_NONE;
}
goto nextopcode;
case D_STC:

View file

@ -103,9 +103,17 @@ switch (inst.code.save) {
break;
case S_FLGw:
SETFLAGSw(inst.op1.w);
if (GETFLAG(IF) && PIC_IRQCheck) {
SaveIP();
return CBRET_NONE;
}
break;
case S_FLGd:
SETFLAGSd(inst.op1.d);
if (GETFLAG(IF) && PIC_IRQCheck) {
SaveIP();
return CBRET_NONE;
}
break;
case 0:
break;