;       SCCSID = @(#)mmphdc1.asm	6.3 91/10/28
;      SCCSID = @(#)mmphdc1.asm	6.3 91/10/28
; ****************************************************************************
; *                                                                          *
; *                       IBM/Microsoft Confidential                         *
; *                                                                          *
; *                 Copyright (c) IBM Corporation  1987, 1990                *
; *                 Copyright (c) Microsoft Corp.  1987, 1990                *
; *                           All Rights Reserved                            *
; *                                                                          *
; ****************************************************************************

;*********************** START OF SPECIFICATIONS *********************
;
;   SOURCE FILE NAME: mmphdc1.asm
;
;   DESCRIPTIVE NAME: dekko hooks called by 32-bit "C" routines
;
;   STATUS: RELEASE 1 LEVEL 0
;
;   FUNCTION:
;
;   NOTES:
;       These routines have been written as a temporary measure to
;       get these hooks working. The "C" routine must make a high
;       level call, which is not acceptable for the final product.
;
;************************ END OF SPECIFICATIONS *************************

.xlist
include mi.inc
include basemaca.inc
include dc1segs.inc
include infoseg.inc
include perfhook.inc
include rasmacro.inc
.list

.386p
        EXTRN   globalIS:WORD

;*****  MMPHPROC Macro
;
;       This macro defines the called hooks for 32-bit C hooks in doscall1.
;       The global infoseg ptr is tested via the SetupTestDll macro. Tracing
;       for the major code and global tracing is then tested. If traceing
;       the Maj/Min code is sent to the dekko card. Then any parameters are
;       loaded from the stack into EAX and then sent to the dekko card.
;

MMPHDC1PROC     MACRO Pname,Maj,Min,offlist

    Procedure  _&Pname,near,,,esp
        ASSUME  DS:FLAT, ES:FLAT, SS:FLAT, FS:NOTHING, GS:NOTHING

                EnterProc
                SetupTestDLL    &Maj!h,ras&Maj&Min,&Maj&Min!h,globalIS,32bit

                push    eax
                irp     off,<offlist>
                mov     eax,ss:[esp+off]
                mov     es:[PERF_DATA_4],eax
                endm
                pop     eax
    ras&Maj&Min:

                ExitMMPH
                LeaveProc
                RETP

    EndProc    _&Pname

                ENDM

CODE32  segment
        assume  cs:FLAT

;*****  VIRTUAL MEMORY MGNT: External Interface  -  Major Code 24h
;

MMPHDC1PROC PreDOS32SubAlloc,24,1C,<0Ch,10h>
MMPHDC1PROC PostDOS32SubAlloc,24,9C,<0Ch,10h>

MMPHDC1PROC PreDOS32SubFree,24,1E,<0Ch,10h,14h>
MMPHDC1PROC PostDOS32SubFree,24,9E,<0Ch>

MMPHDC1PROC PreDOS32SubSet,24,20,<0Ch,10h,14h>
MMPHDC1PROC PostDOS32SubSet,24,A0,<0Ch>

MMPHDC1PROC PreDOS32SubUnSet,24,27
MMPHDC1PROC PostDOS32SubUnSet,24,A7

CODE32 ends

END
