;       SCCSID = @(#)apideb.asm 6.2 91/11/13
;      SCCSID = @(#)apideb.asm  6.2 91/11/13
;
;
;       IBM/Microsoft Confidential
;
;       Copyright (c) IBM Corporation 1987, 1989
;       Copyright (c) Microsoft Corporation 1987, 1989
;
;       Debugging API calls.  These calls are only included in Debugging
;       kernels.
;

.xlist
include dosseg.inc
include defdbug.inc
include basemaca.inc
include osmaca.inc
include error.inc
include mi.inc
include protmode.inc
include seldesc.inc
include kmode.inc
include sysentry.inc
include ordinals.inc
include mmpha.inc
.list
        CpuMode 386

if RAS

        EXTRNFAR        PhysToVirt
        EXTRNFAR        SuBuff
        ReferGlobal     ras_mec_table,BYTE

        FARCODE HIGH3
HIGH3CODE  segment


;       The following call is for debugging the RAS System Tracing

;***    DOSQTRACEINFO() -- Get information on RAS system tracing
;
;       INVOKE  push@   Other           (2 words)
;               call DOSQTRACEINFO
;
;       RETURN  (ax) = return code
;                       0 - success
;                       No error is possible on this call
;
SysEntry DOSQTRACEINFO, ORD_DOSQTRACEINFO, 2

        ld_di                   ; get the struc addr
        rplstampsel             ; adjust RPL of selector
        ld_bx                   ; (BX:DI) -> user space target

        farcall w_QTraceInfo, ORD_DOSQTRACEINFO                           ;@SEC

EndEntry DOSQTRACEINFO


Procedure w_QTraceInfo,FARONLY
        DosContext      DS      ; DS:SI -> ras_mec_table
        lea     si, ras_mec_table
        mov     cx, 25h         ; size of transfer
        CALLFAR SuBuff          ; copy to user space
        ret
EndProc   w_QTraceInfo


HIGH3CODE ends

endif ; RAS
        end
