Sync to Wine-0_9:
[reactos.git] / reactos / lib / rtl / i386 / debug.S
1 /*
2 * COPYRIGHT: See COPYING in the top level directory
3 * PROJECT: ReactOS Run-Time Library
4 * PURPOSE: Debug Routines
5 * FILE: lib/rtl/i386/debug.S
6 * PROGRAMER: Alex Ionescu (alex@relsoft.net)
7 */
8
9 .intel_syntax noprefix
10
11 /* GLOBALS ****************************************************************/
12
13 .globl _DbgBreakPoint@0
14 .globl _DbgBreakPointWithStatus@4
15 .globl _DbgUserBreakPoint@0
16 .globl _DebugService@20
17
18 /* FUNCTIONS ***************************************************************/
19
20 _DbgBreakPoint@0:
21 _DbgUserBreakPoint@0:
22 int 3
23 ret
24
25 _DbgBreakPointWithStatus@4:
26 mov eax, [esp+4]
27 int 3
28 ret 4
29
30 _DebugService@20:
31
32 /* Setup the stack */
33 push ebp
34 mov ebp, esp
35
36 /* Save the registers */
37 push ecx
38 push ebx
39 push edi
40 push edi
41 push ebx
42
43 /* Call the Interrupt */
44 mov eax, [ebp+8]
45 mov ecx, [ebp+12]
46 mov edx, [ebp+16]
47 mov ebx, [ebp+20]
48 mov edi, [ebp+24]
49 int 0x2D
50 //int 3
51
52 /* Restore registers */
53 pop ebx
54 pop edi
55 pop edi
56 pop ebx
57
58 /* Return */
59 leave
60 ret 20
61