Rev 9438 | Rev 9441 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 9438 | Rev 9440 | ||
---|---|---|---|
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: 9438 $ |
8 | $Revision: 9440 $ |
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, 29 |
1106 | cmp ebx, 30 |
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 1223... | Line 1223... | ||
1223 | .29: |
1223 | .29: |
1224 | stdcall user_ring, ecx |
1224 | stdcall user_ring, ecx |
1225 | mov [esp+SYSCALL_STACK._eax], eax |
1225 | mov [esp+SYSCALL_STACK._eax], eax |
1226 | ret |
1226 | ret |
Line -... | Line 1227... | ||
- | 1227 | ||
- | 1228 | ; unload driver |
|
- | 1229 | .30: ; ecx = handl driver edx = cmdline |
|
- | 1230 | mov eax, -1 |
|
- | 1231 | cmp edx, OS_BASE |
|
- | 1232 | jae .fail |
|
- | 1233 | cmp ecx, OS_BASE |
|
- | 1234 | jbe .fail |
|
- | 1235 | ||
- | 1236 | mov eax, [ecx+SRV.entry] |
|
- | 1237 | test eax, eax |
|
- | 1238 | jz .fail |
|
- | 1239 | push ecx ;save handl |
|
- | 1240 | ||
- | 1241 | push edx ;cmdline |
|
- | 1242 | push DRV_EXIT |
|
- | 1243 | call eax ;the result is not checked |
|
- | 1244 | lea esp, [esp+8] |
|
- | 1245 | push ecx |
|
- | 1246 | ||
- | 1247 | mov ebx, [ecx+SRV.base] |
|
- | 1248 | mov eax, -2 ;error free RAM |
|
- | 1249 | test ebx, ebx |
|
1227 | 1250 | jz .fail |
|
- | 1251 | stdcall kernel_free, ebx ;del driver |
|
- | 1252 | ||
- | 1253 | mov eax, [ecx+SRV.fd] |
|
- | 1254 | mov edx, [ecx+SRV.bk] |
|
- | 1255 | mov [edx+SRV.fd], eax |
|
- | 1256 | mov [eax+SRV.bk], edx |
|
1228 | ; prototype function for get list services and unload driver |
1257 | stdcall free, ecx |
- | 1258 | ;dec [count_services] |
|
- | 1259 | ||
- | 1260 | mov [esp+SYSCALL_STACK._eax], eax |
|
- | 1261 | ret |
|
1229 | ;.30: ;get list services |
1262 | ;.31: ;prototype function for get list service |
1230 | ; |
1263 | ; |
1231 | ; ret |
- | |
1232 | ;.31: ;unload driver ecx = handl driver edx = cmdline |
- | |
1233 | ; cmp edx, OS_BASE |
- | |
1234 | ; jae .fail |
- | |
1235 | ; test ecx, OS_BASE ; when OS_BASE = 0x80000000 |
- | |
1236 | ; jz .fail |
- | |
1237 | ; mov eax, [ecx+SRV.entry] |
- | |
1238 | ; push ecx |
- | |
1239 | ; push edx |
- | |
1240 | ; push DRV_EXIT |
- | |
1241 | ; call eax |
- | |
1242 | ; ; push eax ; |
- | |
1243 | ; ; push eax ; |
- | |
1244 | ; lea esp, [esp+8] |
- | |
1245 | ; push ecx |
- | |
1246 | ; mov ebx, [ecx+SRV.base] |
- | |
1247 | ; stdcall kernel_free, ebx |
- | |
1248 | ; mov [esp+SYSCALL_STACK._eax], eax |
- | |
1249 | ; ret |
1264 | ; ret |
1250 | .fail: |
1265 | .fail: |
1251 | mov [esp+SYSCALL_STACK._eax], eax |
1266 | mov [esp+SYSCALL_STACK._eax], eax |
Line 1252... | Line 1267... | ||
1252 | ret |
1267 | ret |
Line 1271... | Line 1286... | ||
1271 | dd f68.25 ; unmask exception |
1286 | dd f68.25 ; unmask exception |
1272 | dd f68.26 ; user_unmap |
1287 | dd f68.26 ; user_unmap |
1273 | dd f68.27 ; load_file_umode |
1288 | dd f68.27 ; load_file_umode |
1274 | dd f68.28 ; loadFileUnicode |
1289 | dd f68.28 ; loadFileUnicode |
1275 | dd f68.29 ; user_ring |
1290 | dd f68.29 ; user_ring |
- | 1291 | dd f68.30 ; unload_driver |
|
Line 1276... | Line 1292... | ||
1276 | 1292 | ||
1277 | align 4 |
1293 | align 4 |
1278 | proc load_pe_driver stdcall, file:dword, cmdline:dword |
1294 | proc load_pe_driver stdcall, file:dword, cmdline:dword |