xref: /reactos/ntoskrnl/kdbg/i386/kdb_help.S (revision fe777bb5)
1
2#include <asm.inc>
3#include <ks386.inc>
4
5.code
6
7PUBLIC _KdbpStackSwitchAndCall@8
8_KdbpStackSwitchAndCall@8:
9    push ebp
10    mov ebp, esp
11
12    mov eax, [esp + 8]         /* New stack */
13    mov ecx, [esp + 12]         /* Function to call */
14    mov edx, esp              /* Old stack */
15
16    /* Switch stack */
17    mov esp, eax
18    push edx
19
20    /* Call function */
21    call ecx
22
23    /* Switch back to old stack */
24    pop esp
25
26    /* Return */
27    pop ebp
28    ret 8
29
30END
31