Rev 660 | Rev 663 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 660 | Rev 662 | ||
---|---|---|---|
Line 3... | Line 3... | ||
3 | ;; Copyright (C) KolibriOS team 2004-2007. All rights reserved. ;; |
3 | ;; Copyright (C) KolibriOS team 2004-2007. All rights reserved. ;; |
4 | ;; Distributed under terms of the GNU General Public License ;; |
4 | ;; Distributed under terms of the GNU General Public License ;; |
5 | ;; ;; |
5 | ;; ;; |
6 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
6 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
Line 7... | Line 7... | ||
7 | 7 | ||
Line 8... | Line 8... | ||
8 | $Revision: 660 $ |
8 | $Revision: 662 $ |
9 | 9 | ||
Line 1132... | Line 1132... | ||
1132 | add eax, eax |
1132 | add eax, eax |
1133 | stdcall alloc_kernel_space, eax |
1133 | stdcall alloc_kernel_space, eax |
1134 | test eax, eax |
1134 | test eax, eax |
1135 | jz .fail |
1135 | jz .fail |
Line -... | Line 1136... | ||
- | 1136 | ||
- | 1137 | push ebx |
|
1136 | 1138 | ||
Line 1137... | Line 1139... | ||
1137 | mov [buf_ptr], eax |
1139 | mov [buf_ptr], eax |
1138 | 1140 | ||
1139 | mov ebx, [size] |
1141 | mov ebx, [size] |
Line 1144... | Line 1146... | ||
1144 | pop ecx |
1146 | pop ecx |
Line 1145... | Line 1147... | ||
1145 | 1147 | ||
1146 | test eax, eax |
1148 | test eax, eax |
Line -... | Line 1149... | ||
- | 1149 | jz .mm_fail |
|
- | 1150 | ||
1147 | jz .mm_fail |
1151 | push edi |
1148 | 1152 | ||
1149 | or eax, [flags] |
1153 | or eax, [flags] |
1150 | mov edi, [buf_ptr] |
1154 | mov edi, [buf_ptr] |
1151 | mov ebx, [buf_ptr] |
1155 | mov ebx, [buf_ptr] |
Line 1162... | Line 1166... | ||
1162 | add edi, 4 |
1166 | add edi, 4 |
1163 | dec ecx |
1167 | dec ecx |
1164 | jnz @B |
1168 | jnz @B |
Line 1165... | Line 1169... | ||
1165 | 1169 | ||
- | 1170 | mov eax, [buf_ptr] |
|
- | 1171 | pop edi |
|
1166 | mov eax, [buf_ptr] |
1172 | pop ebx |
1167 | ret |
1173 | ret |
1168 | .mm_fail: |
1174 | .mm_fail: |
1169 | stdcall free_kernel_space, [buf_ptr] |
1175 | stdcall free_kernel_space, [buf_ptr] |
- | 1176 | xor eax, eax |
|
1170 | xor eax, eax |
1177 | pop ebx |
1171 | .fail: |
1178 | .fail: |
1172 | ret |
1179 | ret |
Line 1173... | Line 1180... | ||
1173 | endp |
1180 | endp |