Rev 9440 | Rev 9442 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 9440 | Rev 9441 | ||
---|---|---|---|
Line 3... | Line 3... | ||
3 | ;; Copyright (C) KolibriOS team 2004-2020. All rights reserved. ;; |
3 | ;; Copyright (C) KolibriOS team 2004-2020. 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: 9440 $ |
8 | $Revision: 9441 $ |
9 | 9 | ||
Line 1101... | Line 1101... | ||
1101 | f68: |
1101 | f68: |
1102 | cmp ebx, 4 |
1102 | cmp ebx, 4 |
1103 | jbe sys_sheduler |
1103 | jbe sys_sheduler |
1104 | cmp ebx, 11 |
1104 | cmp ebx, 11 |
1105 | jb undefined_syscall |
1105 | jb undefined_syscall |
1106 | cmp ebx, 30 |
1106 | cmp ebx, 31 |
1107 | ja undefined_syscall |
1107 | ja undefined_syscall |
1108 | xor eax, eax |
1108 | xor eax, eax |
1109 | jmp dword [f68call+ebx*4-11*4] |
1109 | jmp dword [f68call+ebx*4-11*4] |
1110 | .11: |
1110 | .11: |
1111 | call init_heap |
1111 | call init_heap |
Line 1230... | Line 1230... | ||
1230 | mov eax, -1 |
1230 | mov eax, -1 |
1231 | cmp edx, OS_BASE |
1231 | cmp edx, OS_BASE |
1232 | jae .fail |
1232 | jae .fail |
1233 | cmp ecx, OS_BASE |
1233 | cmp ecx, OS_BASE |
1234 | jbe .fail |
1234 | jbe .fail |
- | 1235 | cmp [ecx+SRV.magic], ' SRV' |
|
- | 1236 | jne .fail |
|
- | 1237 | cmp [ecx+SRV.size], sizeof.SRV |
|
- | 1238 | jne .fail |
|
Line 1235... | Line 1239... | ||
1235 | 1239 | ||
1236 | mov eax, [ecx+SRV.entry] |
1240 | mov eax, [ecx+SRV.entry] |
1237 | test eax, eax |
1241 | test eax, eax |
1238 | jz .fail |
1242 | jz .fail |
Line 1257... | Line 1261... | ||
1257 | stdcall free, ecx |
1261 | stdcall free, ecx |
1258 | ;dec [count_services] |
1262 | ;dec [count_services] |
Line 1259... | Line 1263... | ||
1259 | 1263 | ||
1260 | mov [esp+SYSCALL_STACK._eax], eax |
1264 | mov [esp+SYSCALL_STACK._eax], eax |
1261 | ret |
1265 | ret |
- | 1266 | .31: ; get list service |
|
- | 1267 | test ecx, ecx |
|
- | 1268 | jz .fail ; get count |
|
- | 1269 | dec ecx |
|
- | 1270 | jnz @f ;1 - get pointer first and last structure |
|
- | 1271 | ||
- | 1272 | mov ebx, [srv.fd] |
|
- | 1273 | mov ecx, [srv.bk] |
|
- | 1274 | mov [esp+SYSCALL_STACK._ebx], ebx ;fd |
|
- | 1275 | mov [esp+SYSCALL_STACK._ecx], ecx ;bk |
|
- | 1276 | mov [esp+SYSCALL_STACK._eax], 0 |
|
- | 1277 | ret |
|
- | 1278 | @@: |
|
- | 1279 | dec ecx |
|
- | 1280 | jnz .fail ; 2 - get info for SRV structure |
|
- | 1281 | ||
- | 1282 | mov eax, -1 |
|
- | 1283 | cmp ecx, OS_BASE ; ecx = pointer on structure |
|
- | 1284 | jbe .fail |
|
- | 1285 | stdcall is_region_userspace, edx, 40 ;16+4*6=40 <-max size buffer |
|
- | 1286 | jnz .fail ; edx = pointer on buffer |
|
- | 1287 | cmp [ecx+SRV.magic], ' SRV' |
|
- | 1288 | jne .fail |
|
- | 1289 | cmp [ecx+SRV.size], sizeof.SRV |
|
- | 1290 | jne .fail |
|
- | 1291 | ||
- | 1292 | mov edi, edx |
|
- | 1293 | mov esi, ecx |
|
- | 1294 | movsd ; name service 16 byte |
|
- | 1295 | movsd |
|
- | 1296 | movsd |
|
- | 1297 | movsd |
|
- | 1298 | lea esi, [ecx+SRV.fd] |
|
- | 1299 | movsd ; SRV.fd |
|
- | 1300 | movsd ; SRV.bk |
|
- | 1301 | movsd ; SRV.base |
|
- | 1302 | movsd ; SRV.entry |
|
- | 1303 | movsd ; SRV.srv_proc |
|
1262 | ;.31: ;prototype function for get list service |
1304 | ;movsd ; SRV.srv_proc_ex |
- | 1305 | ||
- | 1306 | xor eax, eax |
|
1263 | ; |
1307 | mov [esp+SYSCALL_STACK._eax], eax |
1264 | ; ret |
1308 | ret |
1265 | .fail: |
1309 | .fail: |
1266 | mov [esp+SYSCALL_STACK._eax], eax |
1310 | mov [esp+SYSCALL_STACK._eax], eax |
Line 1267... | Line 1311... | ||
1267 | ret |
1311 | ret |
Line 1287... | Line 1331... | ||
1287 | dd f68.26 ; user_unmap |
1331 | dd f68.26 ; user_unmap |
1288 | dd f68.27 ; load_file_umode |
1332 | dd f68.27 ; load_file_umode |
1289 | dd f68.28 ; loadFileUnicode |
1333 | dd f68.28 ; loadFileUnicode |
1290 | dd f68.29 ; user_ring |
1334 | dd f68.29 ; user_ring |
1291 | dd f68.30 ; unload_driver |
1335 | dd f68.30 ; unload_driver |
- | 1336 | dd f68.31 ; get_driver_info |
|
Line 1292... | Line 1337... | ||
1292 | 1337 | ||
1293 | align 4 |
1338 | align 4 |
1294 | proc load_pe_driver stdcall, file:dword, cmdline:dword |
1339 | proc load_pe_driver stdcall, file:dword, cmdline:dword |