diff --git a/include/callback.h b/include/callback.h index 53bc39c0..d1240ee2 100644 --- a/include/callback.h +++ b/include/callback.h @@ -16,7 +16,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -/* $Id: callback.h,v 1.25 2009-06-11 16:05:17 c2woody Exp $ */ +/* $Id: callback.h,v 1.26 2009-08-23 17:24:54 c2woody Exp $ */ #ifndef DOSBOX_CALLBACK_H #define DOSBOX_CALLBACK_H @@ -71,6 +71,7 @@ bool CALLBACK_Free(Bitu callback); void CALLBACK_SCF(bool val); void CALLBACK_SZF(bool val); +void CALLBACK_SIF(bool val); extern Bitu call_priv_io; diff --git a/src/cpu/callback.cpp b/src/cpu/callback.cpp index b5d88089..1d21062e 100644 --- a/src/cpu/callback.cpp +++ b/src/cpu/callback.cpp @@ -16,7 +16,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -/* $Id: callback.cpp,v 1.41 2009-06-11 16:05:17 c2woody Exp $ */ +/* $Id: callback.cpp,v 1.42 2009-08-23 17:24:54 c2woody Exp $ */ #include #include @@ -109,15 +109,24 @@ void CALLBACK_RunRealInt(Bit8u intnum) { } void CALLBACK_SZF(bool val) { - Bit16u tempf=mem_readw(SegPhys(ss)+reg_sp+4) & 0xFFBF; - Bit16u newZF=(val==true) << 6; - mem_writew(SegPhys(ss)+reg_sp+4,(tempf | newZF)); + Bit16u tempf = mem_readw(SegPhys(ss)+reg_sp+4); + if (val) tempf |= FLAG_ZF; + else tempf &= ~FLAG_ZF; + mem_writew(SegPhys(ss)+reg_sp+4,tempf); } void CALLBACK_SCF(bool val) { - Bit16u tempf=mem_readw(SegPhys(ss)+reg_sp+4) & 0xFFFE; - Bit16u newCF=(val==true); - mem_writew(SegPhys(ss)+reg_sp+4,(tempf | newCF)); + Bit16u tempf = mem_readw(SegPhys(ss)+reg_sp+4); + if (val) tempf |= FLAG_CF; + else tempf &= ~FLAG_CF; + mem_writew(SegPhys(ss)+reg_sp+4,tempf); +} + +void CALLBACK_SIF(bool val) { + Bit16u tempf = mem_readw(SegPhys(ss)+reg_sp+4); + if (val) tempf |= FLAG_IF; + else tempf &= ~FLAG_IF; + mem_writew(SegPhys(ss)+reg_sp+4,tempf); } void CALLBACK_SetDescription(Bitu nr, const char* descr) { diff --git a/src/ints/bios_disk.cpp b/src/ints/bios_disk.cpp index 6fdafa6d..9b0289e4 100644 --- a/src/ints/bios_disk.cpp +++ b/src/ints/bios_disk.cpp @@ -16,7 +16,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -/* $Id: bios_disk.cpp,v 1.39 2009-08-12 21:16:09 c2woody Exp $ */ +/* $Id: bios_disk.cpp,v 1.40 2009-08-23 17:24:54 c2woody Exp $ */ #include "dosbox.h" #include "callback.h" @@ -309,6 +309,9 @@ static Bitu INT13_DiskHandler(void) { if(imageDiskList[i]) any_images=true; } + // unconditionally enable the interrupt flag + CALLBACK_SIF(true); + //drivenum = 0; //LOG_MSG("INT13: Function %x called on drive %x (dos drive %d)", reg_ah, reg_dl, drivenum); switch(reg_ah) {