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

Last change on this file was 4998, checked in by bird, 25 years ago

pre-commit

File size: 1.5 KB
RevLine 
[4998]1; $Id: myVR32AllocMem.asm,v 1.3 2001-01-21 07:52:46 bird Exp $
[4973]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
[4981]11
[4973]12;
[4981]13; Defined Constants And Macros
14;
15SEF_EIP EQU 3ch
16SEF_CS EQU 40h
17
18ARG_FLAGS EQU 50h
19
20
21;
[4973]22; Include files
23;
24 include devsegdf.inc
[4998]25 include api.inc
[4981]26 include bsememf.inc
27 ifndef OBJ_ANY
28 OBJ_ANY EQU 00000400H
29 endif
[4973]30
31
32;
33; Exported symbols
34;
[4981]35 public _myVR32AllocMem@50
[4973]36
37
38;
39; Externs
40;
[4998]41 extrn APIQueryEnabled:PROC
[4981]42 extrn _VR32AllocMem@50:PROC
[4973]43
44
45CODE32 segment
46
47
[4981]48_myVR32AllocMem@50 proc near
49 ASSUME ds:FLAT, es:NOTHING, ss:NOTHING
50 ;
51 ; Check if OBJ_ANY flag is allready set.
52 ;
53 mov edx, [esp + ARG_FLAGS]
54 test edx, OBJ_ANY
55 jnz FLAT:call_vr
[4973]56
57
[4981]58 ;
59 ; It was not - check if we're to set it for this calling module.
60 ;
[4998]61 movzx ecx, word ptr [esp + SEF_CS]
62 mov edx, dword ptr [esp + SEF_EIP]
[4981]63 push eax
64 sub esp, 0ch
[4998]65 mov eax, API_DOSALLOCMEM_ANY_OBJ
66 call APIQueryEnabled
67 add esp, 0ch
[4981]68 test eax, eax
69 pop eax
70 jz FLAT:call_vr
71
72 ; Apply the OBJ_ANY flag.
73 or word ptr [esp + ARG_FLAGS], OBJ_ANY ; only need to update first word.
74
75 ;
76 ; Call the original verify/worker routine.
77 ;
78call_vr:
79 jmp FLAT:CALLTAB:_VR32AllocMem@50
80_myVR32AllocMem@50 endp
81
[4973]82CODE32 ends
83
84end
Note: See TracBrowser for help on using the repository browser.