Rev 2405 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 2405 | Rev 3014 | ||
---|---|---|---|
Line 9... | Line 9... | ||
9 | FALSE = 0 |
9 | FALSE = 0 |
10 | TRUE = 1 |
10 | TRUE = 1 |
Line 11... | Line 11... | ||
11 | 11 | ||
12 | include '../../../../../proc32.inc' |
12 | include '../../../../../proc32.inc' |
13 | include '../../../../../macros.inc' |
13 | include '../../../../../macros.inc' |
Line 14... | Line 14... | ||
14 | include '../dll.inc' |
14 | include '../../../../../dll.inc' |
15 | 15 | ||
Line 16... | Line 16... | ||
16 | include '../../libio/libio.inc' |
16 | include '../../libio/libio.inc' |
Line 136... | Line 136... | ||
136 | 136 | ||
137 | invoke gfx.close, [ctx] |
137 | invoke gfx.close, [ctx] |
Line 138... | Line 138... | ||
138 | ret |
138 | ret |
139 | - | ||
140 | ;----------------------------------------------------------------------------- |
- | |
141 | proc mem.Alloc, size ;//////////////////////////////////////////////////////// |
- | |
142 | ;----------------------------------------------------------------------------- |
- | |
143 | push ebx ecx |
- | |
144 | mov ecx, [size] |
- | |
145 | add ecx, 4 |
- | |
146 | mcall 68, 12 |
- | |
147 | add ecx, -4 |
- | |
148 | mov [eax], ecx |
- | |
149 | add eax, 4 |
- | |
150 | pop ecx ebx |
- | |
151 | ret |
- | |
152 | endp |
- | |
153 | - | ||
154 | ;----------------------------------------------------------------------------- |
- | |
155 | proc mem.ReAlloc, mptr, size ;//////////////////////////////////////////////// |
- | |
156 | ;----------------------------------------------------------------------------- |
- | |
157 | push ebx ecx edx |
- | |
158 | mov ecx, [size] |
- | |
159 | or ecx, ecx |
- | |
160 | jz @f |
- | |
161 | add ecx, 4 |
- | |
162 | @@: mov edx, [mptr] |
- | |
163 | or edx, edx |
- | |
164 | jz @f |
- | |
165 | add edx, -4 |
- | |
166 | @@: mcall 68, 20 |
- | |
167 | or eax, eax |
- | |
168 | jz @f |
- | |
169 | add ecx, -4 |
- | |
170 | mov [eax], ecx |
- | |
171 | add eax, 4 |
- | |
172 | @@: pop edx ecx ebx |
- | |
173 | ret |
- | |
174 | endp |
- | |
175 | - | ||
176 | ;----------------------------------------------------------------------------- |
- | |
177 | proc mem.Free, mptr ;///////////////////////////////////////////////////////// |
- | |
178 | ;----------------------------------------------------------------------------- |
- | |
179 | push ebx ecx |
- | |
180 | mov ecx, [mptr] |
- | |
181 | or ecx, ecx |
- | |
182 | jz @f |
- | |
183 | add ecx, -4 |
- | |
184 | @@: mcall 68, 13 |
- | |
185 | pop ecx ebx |
- | |
186 | ret |
- | |
187 | endp |
- | |
Line 188... | Line 139... | ||
188 | 139 | ||
Line 189... | Line 140... | ||
189 | ;----------------------------------------------------------------------------- |
140 | ;----------------------------------------------------------------------------- |