- In MZ_DoLoadImage if an environment segment is specified in the
[wine] / dlls / winedos / int41.c
1 /*
2  * DOS interrupt 41h handler  -- Windows Kernel Debugger
3  *
4  * Check debugsys.inc from the DDK for docu.
5  *
6  * Copyright 1998 Ulrich Weigand
7  *
8  * This library is free software; you can redistribute it and/or
9  * modify it under the terms of the GNU Lesser General Public
10  * License as published by the Free Software Foundation; either
11  * version 2.1 of the License, or (at your option) any later version.
12  *
13  * This library is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
16  * Lesser General Public License for more details.
17  *
18  * You should have received a copy of the GNU Lesser General Public
19  * License along with this library; if not, write to the Free Software
20  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
21  */
22
23 #include <stdio.h>
24 #include "dosexe.h"
25 #include "wine/debug.h"
26
27 WINE_DEFAULT_DEBUG_CHANNEL(int);
28
29 /***********************************************************************
30  *           DOSVM_Int41Handler (WINEDOS16.165)
31  *
32  */
33 void WINAPI DOSVM_Int41Handler( CONTEXT86 *context )
34 {
35     if ( ISV86(context) )
36     {
37         /* Real-mode debugger services */
38         switch ( AX_reg(context) )
39         {
40         default:
41             INT_BARF( context, 0x41 );
42             break;
43         }
44     }
45     else
46     {
47         /* Protected-mode debugger services */
48         switch ( AX_reg(context) )
49         {
50         case 0x4f:
51         case 0x50:
52         case 0x150:
53         case 0x51:
54         case 0x52:
55         case 0x152:
56         case 0x59:
57         case 0x5a:
58         case 0x5b:
59         case 0x5c:
60         case 0x5d:
61             /* Notifies the debugger of a lot of stuff. We simply ignore it
62                for now, but some of the info might actually be useful ... */
63             break;
64
65         default:
66             INT_BARF( context, 0x41 );
67             break;
68         }
69     }
70 }