source: trunk/src/win32k/api/myVR32AllocMem.asm@ 4996

Last change on this file since 4996 was 4981, checked in by bird, 25 years ago

Pre commit

File size: 1.4 KB
Line 
1; $Id: myVR32AllocMem.asm,v 1.2 2001-01-20 15:48:54 bird Exp $
2;
3; VR32AllocMem over loader which adds the OBJ_ANY flag.
4;
5; Copyright (c) 2001 knut st. osmundsen (knut.stange.osmundsen@mynd.no)
6;
7; Project Odin Software License can be found in LICENSE.TXT
8;
9 .386p
10
11
12;
13; Defined Constants And Macros
14;
15SEF_EIP EQU 3ch
16SEF_CS EQU 40h
17
18ARG_FLAGS EQU 50h
19
20
21;
22; Include files
23;
24 include devsegdf.inc
25 include bsememf.inc
26 ifndef OBJ_ANY
27 OBJ_ANY EQU 00000400H
28 endif
29
30
31;
32; Exported symbols
33;
34 public _myVR32AllocMem@50
35
36
37;
38; Externs
39;
40 extrn apiApplyChange:PROC ; system call?
41 extrn _VR32AllocMem@50:PROC
42
43
44CODE32 segment
45
46
47_myVR32AllocMem@50 proc near
48 ASSUME ds:FLAT, es:NOTHING, ss:NOTHING
49 ;
50 ; Check if OBJ_ANY flag is allready set.
51 ;
52 mov edx, [esp + ARG_FLAGS]
53 test edx, OBJ_ANY
54 jnz FLAT:call_vr
55
56
57 ;
58 ; It was not - check if we're to set it for this calling module.
59 ;
60 push eax
61 push dword ptr [esp + SEF_CS]
62 push dword ptr [esp + SEF_EIP]
63 push 1
64 call apiApplyChange
65 sub esp, 0ch
66 test eax, eax
67 pop eax
68 jz FLAT:call_vr
69
70 ; Apply the OBJ_ANY flag.
71 or word ptr [esp + ARG_FLAGS], OBJ_ANY ; only need to update first word.
72
73 ;
74 ; Call the original verify/worker routine.
75 ;
76call_vr:
77 jmp FLAT:CALLTAB:_VR32AllocMem@50
78_myVR32AllocMem@50 endp
79
80CODE32 ends
81
82end
Note: See TracBrowser for help on using the repository browser.