From 35cfe5d5c759e104803f4756a39e02f46a6829ad Mon Sep 17 00:00:00 2001 From: Sjoerd van der Berg Date: Sat, 19 Oct 2002 17:27:28 +0000 Subject: [PATCH] Added a multiplex handler for 0x1680 for dos programs to give up their time slice Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@362 --- src/dos/dos_misc.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/dos/dos_misc.cpp b/src/dos/dos_misc.cpp index 9072d337..5280a529 100644 --- a/src/dos/dos_misc.cpp +++ b/src/dos/dos_misc.cpp @@ -54,6 +54,16 @@ static Bitu INT2A_Handler(void) { return CBRET_NONE; }; +static bool DOS_MultiplexFunctions(void) { + switch (reg_ax) { + case 0x1680: /* RELEASE CURRENT VIRTUAL MACHINE TIME-SLICE */ + //TODO Maybe do some idling but could screw up other systems :) + reg_al=0; + return true; + } + return false; +} + void DOS_SetupMisc(void) { /* Setup the dos multiplex interrupt */ @@ -61,6 +71,7 @@ void DOS_SetupMisc(void) { call_int2f=CALLBACK_Allocate(); CALLBACK_Setup(call_int2f,&INT2F_Handler,CB_IRET); RealSetVec(0x2f,CALLBACK_RealPointer(call_int2f)); + DOS_AddMultiplexHandler(DOS_MultiplexFunctions); /* Setup the dos network interrupt */ call_int2a=CALLBACK_Allocate(); CALLBACK_Setup(call_int2a,&INT2A_Handler,CB_IRET);