Interrupts / Decouple DOS3Call

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This small patch decouples DOS3Call from real int21 implementation.
Now it is possible to make incremental patches that move
code from msdos/int21.c to winedos without breaking DOS3Call.



Changelog:
    Rename old DOS3Call as INT_Int21Handler and
    make new DOS3Call call directly winedos int21 handler.



Index: dlls/winedos/int21.c
===================================================================
RCS file: /home/wine/wine/dlls/winedos/int21.c,v
retrieving revision 1.15
diff -u -r1.15 int21.c
--- dlls/winedos/int21.c	6 Nov 2002 19:57:49 -0000	1.15
+++ dlls/winedos/int21.c	30 Nov 2002 20:21:12 -0000
@@ -35,6 +35,11 @@
 #include "wine/unicode.h"
 #include "wine/debug.h"
 
+/*
+ * FIXME: Delete this reference when all int21 code has been moved to winedos.
+ */
+extern void WINAPI INT_Int21Handler( CONTEXT86 *context );
+
 WINE_DEFAULT_DEBUG_CHANNEL(int21);
 
 void WINAPI DOSVM_Int21Handler_Ioctl( CONTEXT86 *context )
@@ -65,7 +70,7 @@
       RESET_CFLAG(context);
       break;
   default:
-      DOS3Call( context );
+      INT_Int21Handler( context );
   }
 }
 
@@ -79,7 +84,7 @@
     BYTE ascii;
 
     if (DOSVM_IsWin16()) {
-        DOS3Call( context );
+        INT_Int21Handler( context );
         return;
     }
 
@@ -200,7 +205,7 @@
           for(i=0; i<CX_reg(context); i++)
             DOSVM_PutChar(ptr[i]);
         } else
-          DOS3Call( context );
+          INT_Int21Handler( context );
         break;
 
     case 0x44: /* IOCTL */
@@ -256,6 +261,6 @@
         break;
 
     default:
-        DOS3Call( context );
+        INT_Int21Handler( context );
     }
 }




Index: msdos/int21.c
===================================================================
RCS file: /home/wine/wine/msdos/int21.c,v
retrieving revision 1.77
diff -u -r1.77 int21.c
--- msdos/int21.c	21 Nov 2002 00:02:10 -0000	1.77
+++ msdos/int21.c	30 Nov 2002 20:22:27 -0000
@@ -1120,10 +1120,9 @@
 }
 
 /***********************************************************************
- *           DOS3Call         (KERNEL.102)
- *           INT_Int21Handler (WPROCS.133)
+ *           INT_Int21Handler
  */
-void WINAPI DOS3Call( CONTEXT86 *context )
+void WINAPI INT_Int21Handler( CONTEXT86 *context )
 {
     BOOL	bSetDOSExtendedError = FALSE;
 
@@ -2410,11 +2409,3 @@
                  context->EFlags);
 }
 
-/***********************************************************************
- *		GetSetKernelDOSProc (KERNEL.311)
- */
-FARPROC16 WINAPI GetSetKernelDOSProc16(FARPROC16 DosProc)
-{
-	FIXME("(DosProc=0x%08x): stub\n", (UINT)DosProc);
-	return NULL;
-}




Index: msdos/dpmi.c
===================================================================
RCS file: /home/wine/wine/msdos/dpmi.c,v
retrieving revision 1.72
diff -u -r1.72 dpmi.c
--- msdos/dpmi.c	24 Nov 2002 22:34:04 -0000	1.72
+++ msdos/dpmi.c	30 Nov 2002 20:23:10 -0000
@@ -24,6 +24,7 @@
 #include "winbase.h"
 #include "callback.h"
 #include "wine/debug.h"
+#include "wine/windef16.h"
 
 WINE_DEFAULT_DEBUG_CHANNEL(int31);
 
@@ -65,4 +66,24 @@
 {
     if (Dosvm.CallBuiltinHandler || DPMI_LoadDosSystem())
         Dosvm.CallBuiltinHandler( context, 0x5c );
+}
+
+
+/***********************************************************************
+ *           DOS3Call         (KERNEL.102)
+ */
+void WINAPI DOS3Call( CONTEXT86 *context )
+{
+    if (Dosvm.CallBuiltinHandler || DPMI_LoadDosSystem())
+        Dosvm.CallBuiltinHandler( context, 0x21 );
+}
+
+
+/***********************************************************************
+ *		GetSetKernelDOSProc (KERNEL.311)
+ */
+FARPROC16 WINAPI GetSetKernelDOSProc16( FARPROC16 DosProc )
+{
+    FIXME("(DosProc=0x%08x): stub\n", (UINT)DosProc);
+    return NULL;
 }




Index: dlls/kernel/kernel32.spec
===================================================================
RCS file: /home/wine/wine/dlls/kernel/kernel32.spec,v
retrieving revision 1.80
diff -u -r1.80 kernel32.spec
--- dlls/kernel/kernel32.spec	27 Nov 2002 21:38:06 -0000	1.80
+++ dlls/kernel/kernel32.spec	30 Nov 2002 20:23:19 -0000
@@ -986,7 +986,6 @@
 @ stdcall AllocCStoDSAlias16(long) AllocCStoDSAlias16
 @ stdcall AllocSelectorArray16(long) AllocSelectorArray16
 @ stdcall ConvertDialog32To16(ptr long ptr) ConvertDialog32To16
-@ stdcall DOS3Call(ptr) DOS3Call
 @ stdcall ExitKernel16() ExitKernel16
 @ stdcall FarGetOwner16(long) FarGetOwner16
 @ stdcall FarSetOwner16(long long) FarSetOwner16
@@ -1057,6 +1056,7 @@
 @ cdecl DOSMEM_GetDPMISegments() DOSMEM_GetDPMISegments
 @ cdecl DOSMEM_Init(long) DOSMEM_Init
 @ cdecl DRIVE_OpenDevice(long long) DRIVE_OpenDevice
+@ stdcall INT_Int21Handler(ptr) INT_Int21Handler
 @ cdecl LOCAL_Alloc(long long long) LOCAL_Alloc
 @ cdecl LOCAL_Compact(long long long) LOCAL_Compact
 @ cdecl LOCAL_CountFree(long) LOCAL_CountFree



-- 
Jukka Heinonen <http://www.iki.fi/jhei/>


[Index of Archives]     [Gimp for Windows]     [Red Hat]     [Samba]     [Yosemite Camping]     [Graphics Cards]     [Wine Home]

  Powered by Linux