Rev 2685 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 2685 | Rev 3014 | ||
---|---|---|---|
Line 6... | Line 6... | ||
6 | 6 | ||
Line 7... | Line 7... | ||
7 | ;----------------------------------------------------------------------------- |
7 | ;----------------------------------------------------------------------------- |
8 | 8 | ||
9 | include '../../../../../proc32.inc' |
9 | include '../../../../../proc32.inc' |
Line 10... | Line 10... | ||
10 | include '../../../../../macros.inc' |
10 | include '../../../../../macros.inc' |
11 | include '../dll.inc' |
11 | include '../../../../../dll.inc' |
Line 12... | Line 12... | ||
12 | 12 | ||
Line 146... | Line 146... | ||
146 | 146 | ||
147 | mcall 12, 2 |
147 | mcall 12, 2 |
Line 148... | Line 148... | ||
148 | ret |
148 | ret |
149 | - | ||
150 | ;----------------------------------------------------------------------------- |
- | |
151 | proc mem.Alloc, size ;//////////////////////////////////////////////////////// |
- | |
152 | ;----------------------------------------------------------------------------- |
- | |
153 | push ebx ecx |
- | |
154 | mov ecx, [size] |
- | |
155 | add ecx, 4 |
- | |
156 | mcall 68, 12 |
- | |
157 | add ecx, -4 |
- | |
158 | mov [eax], ecx |
- | |
159 | add eax, 4 |
- | |
160 | pop ecx ebx |
- | |
161 | ret |
- | |
162 | endp |
- | |
163 | - | ||
164 | ;----------------------------------------------------------------------------- |
- | |
165 | proc mem.ReAlloc, mptr, size ;//////////////////////////////////////////////// |
- | |
166 | ;----------------------------------------------------------------------------- |
- | |
167 | push ebx ecx edx |
- | |
168 | mov ecx, [size] |
- | |
169 | or ecx, ecx |
- | |
170 | jz @f |
- | |
171 | add ecx, 4 |
- | |
172 | @@: mov edx, [mptr] |
- | |
173 | or edx, edx |
- | |
174 | jz @f |
- | |
175 | add edx, -4 |
- | |
176 | @@: mcall 68, 20 |
- | |
177 | or eax, eax |
- | |
178 | jz @f |
- | |
179 | add ecx, -4 |
- | |
180 | mov [eax], ecx |
- | |
181 | add eax, 4 |
- | |
182 | @@: pop edx ecx ebx |
- | |
183 | ret |
- | |
184 | endp |
- | |
185 | - | ||
186 | ;----------------------------------------------------------------------------- |
- | |
187 | proc mem.Free, mptr ;///////////////////////////////////////////////////////// |
- | |
188 | ;----------------------------------------------------------------------------- |
- | |
189 | push ebx ecx |
- | |
190 | mov ecx, [mptr] |
- | |
191 | or ecx, ecx |
- | |
192 | jz @f |
- | |
193 | add ecx, -4 |
- | |
194 | @@: mcall 68, 13 |
- | |
195 | pop ecx ebx |
- | |
196 | ret |
- | |
197 | endp |
- | |
Line 198... | Line 149... | ||
198 | 149 | ||
Line 199... | Line 150... | ||
199 | ;----------------------------------------------------------------------------- |
150 | ;----------------------------------------------------------------------------- |
200 | 151 |