int41.c 1.91 KB
Newer Older
1 2
/*
 * DOS interrupt 41h handler  -- Windows Kernel Debugger
3
 *
4
 * Check debugsys.inc from the DDK for docu.
5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
 *
 * Copyright 1998 Ulrich Weigand
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
21 22
 */

23
#include <stdio.h>
24
#include "miscemu.h"
25
#include "wine/debug.h"
26

27
WINE_DEFAULT_DEBUG_CHANNEL(int);
28 29

/***********************************************************************
30
 *           INT_Int41Handler (WPROCS.165)
31 32
 *
 */
33
void WINAPI INT_Int41Handler( CONTEXT86 *context )
34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49
{
    if ( ISV86(context) )
    {
        /* Real-mode debugger services */
        switch ( AX_reg(context) )
        {
        default:
            INT_BARF( context, 0x41 );
            break;
        }
    }
    else
    {
        /* Protected-mode debugger services */
        switch ( AX_reg(context) )
        {
50
        case 0x4f:
51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71
        case 0x50:
        case 0x150:
        case 0x51:
        case 0x52:
        case 0x152:
        case 0x59:
        case 0x5a:
        case 0x5b:
        case 0x5c:
        case 0x5d:
            /* Notifies the debugger of a lot of stuff. We simply ignore it
               for now, but some of the info might actually be useful ... */
            break;

        default:
            INT_BARF( context, 0x41 );
            break;
        }
    }
}