Rev 9823 | Rev 9900 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 9823 | Rev 9831 | ||
---|---|---|---|
Line 3... | Line 3... | ||
3 | ;; Copyright (C) KolibriOS team 2004-2022. All rights reserved. ;; |
3 | ;; Copyright (C) KolibriOS team 2004-2022. 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: 9823 $ |
8 | $Revision: 9831 $ |
9 | 9 | ||
Line 1107... | Line 1107... | ||
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 |
1112 | mov [esp + SYSCALL_STACK._eax], eax |
1112 | mov [esp + SYSCALL_STACK.eax], eax |
1113 | ret |
1113 | ret |
1114 | .12: |
1114 | .12: |
1115 | stdcall user_alloc, ecx |
1115 | stdcall user_alloc, ecx |
1116 | mov [esp + SYSCALL_STACK._eax], eax |
1116 | mov [esp + SYSCALL_STACK.eax], eax |
1117 | ret |
1117 | ret |
1118 | .13: |
1118 | .13: |
1119 | stdcall user_free, ecx |
1119 | stdcall user_free, ecx |
1120 | mov [esp + SYSCALL_STACK._eax], eax |
1120 | mov [esp + SYSCALL_STACK.eax], eax |
1121 | ret |
1121 | ret |
1122 | .14: |
1122 | .14: |
1123 | cmp ecx, OS_BASE |
1123 | cmp ecx, OS_BASE |
1124 | jae .fail |
1124 | jae .fail |
1125 | mov edi, ecx |
1125 | mov edi, ecx |
1126 | call get_event_ex |
1126 | call get_event_ex |
1127 | mov [esp + SYSCALL_STACK._eax], eax |
1127 | mov [esp + SYSCALL_STACK.eax], eax |
1128 | ret |
1128 | ret |
1129 | .16: |
1129 | .16: |
1130 | test ecx, ecx |
1130 | test ecx, ecx |
1131 | jz .fail |
1131 | jz .fail |
1132 | cmp ecx, OS_BASE |
1132 | cmp ecx, OS_BASE |
1133 | jae .fail |
1133 | jae .fail |
1134 | stdcall get_service, ecx |
1134 | stdcall get_service, ecx |
1135 | mov [esp + SYSCALL_STACK._eax], eax |
1135 | mov [esp + SYSCALL_STACK.eax], eax |
1136 | ret |
1136 | ret |
1137 | .17: |
1137 | .17: |
1138 | call srv_handlerEx ;ecx |
1138 | call srv_handlerEx ;ecx |
1139 | mov [esp + SYSCALL_STACK._eax], eax |
1139 | mov [esp + SYSCALL_STACK.eax], eax |
1140 | ret |
1140 | ret |
1141 | .18: |
1141 | .18: |
1142 | mov eax, edx |
1142 | mov eax, edx |
1143 | .19: |
1143 | .19: |
1144 | stdcall is_string_userspace, ecx |
1144 | stdcall is_string_userspace, ecx |
1145 | jnz .fail |
1145 | jnz .fail |
1146 | stdcall load_library, ecx, eax |
1146 | stdcall load_library, ecx, eax |
1147 | mov [esp + SYSCALL_STACK._eax], eax |
1147 | mov [esp + SYSCALL_STACK.eax], eax |
1148 | ret |
1148 | ret |
1149 | .20: |
1149 | .20: |
1150 | mov eax, edx |
1150 | mov eax, edx |
1151 | mov ebx, ecx |
1151 | mov ebx, ecx |
1152 | call user_realloc ;in: eax = pointer, ebx = new size |
1152 | call user_realloc ;in: eax = pointer, ebx = new size |
1153 | mov [esp + SYSCALL_STACK._eax], eax |
1153 | mov [esp + SYSCALL_STACK.eax], eax |
1154 | ret |
1154 | ret |
1155 | .21: |
1155 | .21: |
1156 | cmp ecx, OS_BASE |
1156 | cmp ecx, OS_BASE |
1157 | jae .fail |
1157 | jae .fail |
1158 | cmp edx, OS_BASE |
1158 | cmp edx, OS_BASE |
1159 | jae .fail |
1159 | jae .fail |
1160 | stdcall load_pe_driver, ecx, edx |
1160 | stdcall load_pe_driver, ecx, edx |
1161 | mov [esp + SYSCALL_STACK._eax], eax |
1161 | mov [esp + SYSCALL_STACK.eax], eax |
1162 | ret |
1162 | ret |
1163 | .22: |
1163 | .22: |
1164 | cmp ecx, OS_BASE |
1164 | cmp ecx, OS_BASE |
1165 | jae .fail |
1165 | jae .fail |
1166 | stdcall shmem_open, ecx, edx, esi |
1166 | stdcall shmem_open, ecx, edx, esi |
1167 | mov [esp + SYSCALL_STACK._edx], edx |
1167 | mov [esp + SYSCALL_STACK.edx], edx |
1168 | mov [esp + SYSCALL_STACK._eax], eax |
1168 | mov [esp + SYSCALL_STACK.eax], eax |
1169 | ret |
1169 | ret |
1170 | .23: |
1170 | .23: |
1171 | cmp ecx, OS_BASE |
1171 | cmp ecx, OS_BASE |
1172 | jae .fail |
1172 | jae .fail |
1173 | stdcall shmem_close, ecx |
1173 | stdcall shmem_close, ecx |
1174 | mov [esp + SYSCALL_STACK._eax], eax |
1174 | mov [esp + SYSCALL_STACK.eax], eax |
1175 | ret |
1175 | ret |
1176 | .24: |
1176 | .24: |
1177 | mov eax, [current_slot] |
1177 | mov eax, [current_slot] |
1178 | xchg ecx, [eax + APPDATA.exc_handler] |
1178 | xchg ecx, [eax + APPDATA.exc_handler] |
1179 | xchg edx, [eax + APPDATA.except_mask] |
1179 | xchg edx, [eax + APPDATA.except_mask] |
1180 | mov [esp + SYSCALL_STACK._ebx], edx |
1180 | mov [esp + SYSCALL_STACK.ebx], edx |
1181 | mov [esp + SYSCALL_STACK._eax], ecx |
1181 | mov [esp + SYSCALL_STACK.eax], ecx |
1182 | ret |
1182 | ret |
1183 | .25: |
1183 | .25: |
1184 | cmp ecx, 32 |
1184 | cmp ecx, 32 |
1185 | jae .fail |
1185 | jae .fail |
1186 | mov eax, [current_slot] |
1186 | mov eax, [current_slot] |
1187 | btr [eax + APPDATA.except_mask], ecx |
1187 | btr [eax + APPDATA.except_mask], ecx |
1188 | setc byte[esp + SYSCALL_STACK._eax] |
1188 | setc byte[esp + SYSCALL_STACK.eax] |
1189 | jecxz @f |
1189 | jecxz @f |
1190 | bts [eax + APPDATA.except_mask], ecx |
1190 | bts [eax + APPDATA.except_mask], ecx |
1191 | @@: |
1191 | @@: |
1192 | ret |
1192 | ret |
1193 | .26: |
1193 | .26: |
1194 | stdcall user_unmap, ecx, edx, esi |
1194 | stdcall user_unmap, ecx, edx, esi |
1195 | mov [esp + SYSCALL_STACK._eax], eax |
1195 | mov [esp + SYSCALL_STACK.eax], eax |
1196 | ret |
1196 | ret |
1197 | .27: |
1197 | .27: |
1198 | cmp ecx, OS_BASE |
1198 | cmp ecx, OS_BASE |
1199 | jae .fail |
1199 | jae .fail |
1200 | stdcall load_file_umode, ecx |
1200 | stdcall load_file_umode, ecx |
1201 | mov [esp + SYSCALL_STACK._edx], edx |
1201 | mov [esp + SYSCALL_STACK.edx], edx |
1202 | mov [esp + SYSCALL_STACK._eax], eax |
1202 | mov [esp + SYSCALL_STACK.eax], eax |
1203 | ret |
1203 | ret |
1204 | .28: |
1204 | .28: |
1205 | cmp ecx, OS_BASE |
1205 | cmp ecx, OS_BASE |
1206 | jae .fail |
1206 | jae .fail |
1207 | push ecx edx |
1207 | push ecx edx |
Line 1212... | Line 1212... | ||
1212 | call getFullPath |
1212 | call getFullPath |
1213 | pop ebp |
1213 | pop ebp |
1214 | test eax, eax |
1214 | test eax, eax |
1215 | jz @f |
1215 | jz @f |
1216 | stdcall load_file_umode, ebp |
1216 | stdcall load_file_umode, ebp |
1217 | mov [esp + SYSCALL_STACK._edx], edx |
1217 | mov [esp + SYSCALL_STACK.edx], edx |
1218 | @@: |
1218 | @@: |
1219 | mov [esp + SYSCALL_STACK._eax], eax |
1219 | mov [esp + SYSCALL_STACK.eax], eax |
1220 | stdcall kernel_free, ebp |
1220 | stdcall kernel_free, ebp |
1221 | ret |
1221 | ret |
Line 1222... | Line 1222... | ||
1222 | 1222 | ||
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 |
Line 1226... | Line 1226... | ||
1226 | ret |
1226 | ret |
1227 | 1227 | ||
1228 | ; unload driver |
1228 | ; unload driver |
Line 1259... | Line 1259... | ||
1259 | mov [edx + SRV.fd], eax |
1259 | mov [edx + SRV.fd], eax |
1260 | mov [eax + SRV.bk], edx |
1260 | mov [eax + SRV.bk], edx |
1261 | stdcall free, ecx |
1261 | stdcall free, ecx |
1262 | ;dec [count_services] |
1262 | ;dec [count_services] |
Line 1263... | Line 1263... | ||
1263 | 1263 | ||
1264 | mov [esp + SYSCALL_STACK._eax], eax |
1264 | mov [esp + SYSCALL_STACK.eax], eax |
1265 | ret |
1265 | ret |
1266 | .31: ; get list service |
1266 | .31: ; get list service |
1267 | test ecx, ecx |
1267 | test ecx, ecx |
1268 | jz .fail ; get count |
1268 | jz .fail ; get count |
1269 | dec ecx |
1269 | dec ecx |
Line 1270... | Line 1270... | ||
1270 | jnz @f ;1 - get pointer first and last structure |
1270 | jnz @f ;1 - get pointer first and last structure |
1271 | 1271 | ||
1272 | mov ebx, [srv.fd] |
1272 | mov ebx, [srv.fd] |
1273 | mov ecx, [srv.bk] |
1273 | mov ecx, [srv.bk] |
1274 | mov [esp + SYSCALL_STACK._ebx], ebx ;fd |
1274 | mov [esp + SYSCALL_STACK.ebx], ebx ;fd |
1275 | mov [esp + SYSCALL_STACK._ecx], ecx ;bk |
1275 | mov [esp + SYSCALL_STACK.ecx], ecx ;bk |
1276 | mov [esp + SYSCALL_STACK._eax], 0 |
1276 | mov [esp + SYSCALL_STACK.eax], 0 |
1277 | ret |
1277 | ret |
1278 | @@: |
1278 | @@: |
Line 1302... | Line 1302... | ||
1302 | movsd ; SRV.srv_proc |
1302 | movsd ; SRV.srv_proc |
1303 | ;movsd ; SRV.srv_proc_ex |
1303 | ;movsd ; SRV.srv_proc_ex |
Line 1304... | Line 1304... | ||
1304 | 1304 | ||
1305 | xor eax, eax |
1305 | xor eax, eax |
1306 | .fail: |
1306 | .fail: |
1307 | mov [esp + SYSCALL_STACK._eax], eax |
1307 | mov [esp + SYSCALL_STACK.eax], eax |
Line 1308... | Line 1308... | ||
1308 | ret |
1308 | ret |
1309 | 1309 |