source: trunk/src/NTDLL/regfunc.asm@ 2013

Last change on this file since 2013 was 1654, checked in by phaller, 26 years ago

Add. RtlCopyLuid added

File size: 2.7 KB
Line 
1; $Id: regfunc.asm,v 1.2 1999-11-09 09:54:47 phaller Exp $
2
3;/*
4; * register functions in NTDLL
5; *
6; * Copyright 1999 Patrick Haller
7; *
8; *
9; * Project Odin Software License can be found in LICENSE.TXT
10; *
11; */
12.586P
13 NAME regfunc
14
15CODE32 SEGMENT DWORD PUBLIC USE32 'CODE'
16 align 4
17
18; ----------------------------------------------------------------------------
19
20 public _chkstk ; _alloca_probe seems to be the same
21 public DbgBreakPoint
22
23
24; ----------------------------------------------------------------------------
25
26
27; ----------------------------------------------------------------------------
28
29
30; ----------------------------------------------------------------------------
31; Name : _alloca_probe, _chkstk
32; Purpose :
33; Parameters:
34; Variables :
35; Result :
36; Remark : NTDLL.938, NTDLL.946
37; Status : VERIFIED
38;
39; Author : Patrick Haller [Mon, 1999/11/08 23:44]
40; ----------------------------------------------------------------------------
41_chkstk proc near
42
43arg_0 = byte ptr 8
44
45 push ecx ; _alloca_probe
46 cmp eax, 1000h
47 lea ecx, [esp+arg_0]
48 jb short _chkstk_1
49
50_chkstk_2:
51 sub ecx, 1000h
52 sub eax, 1000h
53 test [ecx], eax
54 cmp eax, 1000h
55 jnb short _chkstk_2
56
57_chkstk_1:
58 sub ecx, eax
59 mov eax, esp
60 test [ecx], eax
61 mov esp, ecx
62 mov ecx, [eax]
63 mov eax, [eax+4]
64 push eax
65 retn
66_chkstk endp
67
68
69; ----------------------------------------------------------------------------
70; Name : DbgBreakPoint
71; Purpose :
72; Parameters:
73; Variables :
74; Result :
75; Remark : NTDLL.20
76; Status : VERIFIED
77;
78; Author : Patrick Haller [Mon, 1999/11/08 23:44]
79; ----------------------------------------------------------------------------
80DbgBreakPoint proc near
81 int 3 ; Trap to Debugger
82 retn
83DbgBreakPoint endp
84
85
86; ----------------------------------------------------------------------------
87; Name : DbgUserBreakPoint
88; Purpose :
89; Parameters:
90; Variables :
91; Result :
92; Remark : NTDLL.28
93; Status : VERIFIED
94;
95; Author : Patrick Haller [Mon, 1999/11/08 23:44]
96; ----------------------------------------------------------------------------
97DbgUserBreakPoint proc near
98 int 3 ; Trap to Debugger
99 retn
100DbgUserBreakPoint endp
101
102
103; ----------------------------------------------------------------------------
104CODE32 ENDS
105
106 END
Note: See TracBrowser for help on using the repository browser.