Subversion Repositories Kolibri OS

Rev

Rev 6333 | Rev 6792 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 6333 Rev 6599
Line 3... Line 3...
3
;; Copyright (C) KolibriOS team 2004-2015. All rights reserved. ;;
3
;; Copyright (C) KolibriOS team 2004-2015. 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: 6333 $
8
$Revision: 6599 $
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
Line 1104... Line 1104...
1104
 
1104
 
1105
        cmp     ebx, 11
1105
        cmp     ebx, 11
Line 1106... Line 1106...
1106
        jb      .fail
1106
        jb      undefined_syscall
1107
 
1107
 
Line 1108... Line 1108...
1108
        cmp     ebx, 27
1108
        cmp     ebx, 27
1109
        ja      .fail
1109
        ja      undefined_syscall
1110
 
1110
 
1111
        jmp     dword [f68call+ebx*4-11*4]
1111
        jmp     dword [f68call+ebx*4-11*4]
1112
.11:
1112
.11:
1113
        call    init_heap
1113
        call    init_heap
1114
        mov     [esp+32], eax
1114
        mov     [esp+SYSCALL_STACK._eax], eax
1115
        ret
1115
        ret
1116
.12:
1116
.12:
1117
        stdcall user_alloc, ecx
1117
        stdcall user_alloc, ecx
1118
        mov     [esp+32], eax
1118
        mov     [esp+SYSCALL_STACK._eax], eax
1119
        ret
1119
        ret
1120
.13:
1120
.13:
1121
        stdcall user_free, ecx
1121
        stdcall user_free, ecx
1122
        mov     [esp+32], eax
1122
        mov     [esp+SYSCALL_STACK._eax], eax
1123
        ret
1123
        ret
1124
.14:
1124
.14:
1125
        cmp     ecx, OS_BASE
1125
        cmp     ecx, OS_BASE
1126
        jae     .fail
1126
        jae     .fail
1127
        mov     edi, ecx
1127
        mov     edi, ecx
1128
        call    get_event_ex
1128
        call    get_event_ex
1129
        mov     [esp+32], eax
1129
        mov     [esp+SYSCALL_STACK._eax], eax
1130
        ret
1130
        ret
1131
.16:
1131
.16:
1132
        test    ecx, ecx
1132
        test    ecx, ecx
1133
        jz      .fail
1133
        jz      .fail
1134
        cmp     ecx, OS_BASE
1134
        cmp     ecx, OS_BASE
1135
        jae     .fail
1135
        jae     .fail
1136
        stdcall get_service, ecx
1136
        stdcall get_service, ecx
1137
        mov     [esp+32], eax
1137
        mov     [esp+SYSCALL_STACK._eax], eax
1138
        ret
1138
        ret
1139
.17:
1139
.17:
1140
        call    srv_handlerEx   ;ecx
1140
        call    srv_handlerEx   ;ecx
1141
        mov     [esp+32], eax
1141
        mov     [esp+SYSCALL_STACK._eax], eax
1142
        ret
1142
        ret
1143
.19:
1143
.19:
1144
        cmp     ecx, OS_BASE
1144
        cmp     ecx, OS_BASE
1145
        jae     .fail
1145
        jae     .fail
1146
        stdcall load_library, ecx
1146
        stdcall load_library, ecx
1147
        mov     [esp+32], 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+32], eax
1153
        mov     [esp+SYSCALL_STACK._eax], eax
1154
        ret
1154
        ret
Line 1155... Line 1155...
1155
.21:
1155
.21:
1156
        cmp     ecx, OS_BASE
1156
        cmp     ecx, OS_BASE
Line 1157... Line 1157...
1157
        jae     .fail
1157
        jae     .fail
1158
 
1158
 
1159
        cmp     edx, OS_BASE
1159
        cmp     edx, OS_BASE
1160
        jae     .fail
1160
        jae     .fail
1161
 
1161
 
1162
        stdcall load_pe_driver, ecx, edx
1162
        stdcall load_pe_driver, ecx, edx
Line 1163... Line 1163...
1163
        mov     [esp+32], eax
1163
        mov     [esp+SYSCALL_STACK._eax], eax
1164
        ret
1164
        ret
1165
.22:
1165
.22:
1166
        cmp     ecx, OS_BASE
1166
        cmp     ecx, OS_BASE
Line 1167... Line 1167...
1167
        jae     .fail
1167
        jae     .fail
1168
 
1168
 
1169
        stdcall shmem_open, ecx, edx, esi
1169
        stdcall shmem_open, ecx, edx, esi
Line 1170... Line 1170...
1170
        mov     [esp+24], edx
1170
        mov     [esp+SYSCALL_STACK._edx], edx
1171
        mov     [esp+32], eax
1171
        mov     [esp+SYSCALL_STACK._eax], eax
1172
        ret
1172
        ret
1173
 
1173
 
1174
.23:
1174
.23:
1175
        cmp     ecx, OS_BASE
1175
        cmp     ecx, OS_BASE
1176
        jae     .fail
1176
        jae     .fail
1177
 
1177
 
1178
        stdcall shmem_close, ecx
1178
        stdcall shmem_close, ecx
1179
        mov     [esp+32], eax
1179
        mov     [esp+SYSCALL_STACK._eax], eax
1180
        ret
1180
        ret
1181
.24:
1181
.24:
1182
        mov     eax, [current_slot]
1182
        mov     eax, [current_slot]
1183
        xchg    ecx, [eax+APPDATA.exc_handler]
1183
        xchg    ecx, [eax+APPDATA.exc_handler]
1184
        xchg    edx, [eax+APPDATA.except_mask]
1184
        xchg    edx, [eax+APPDATA.except_mask]
1185
        mov     [esp+32], ecx ; reg_eax+8
1185
        mov     [esp+SYSCALL_STACK._ebx], edx
1186
        mov     [esp+20], edx ; reg_ebx+8
1186
        mov     [esp+SYSCALL_STACK._eax], ecx
1187
        ret
1187
        ret
1188
.25:
1188
.25:
1189
        cmp     ecx, 32
1189
        cmp     ecx, 32
Line 1190... Line 1190...
1190
        jae     .fail
1190
        jae     .fail
1191
        mov     eax, [current_slot]
1191
        mov     eax, [current_slot]
1192
        btr     [eax+APPDATA.except_mask], ecx
1192
        btr     [eax+APPDATA.except_mask], ecx
1193
        setc    byte[esp+32]
1193
        setc    byte[esp+SYSCALL_STACK._eax]
Line 1194... Line 1194...
1194
        jecxz   @f
1194
        jecxz   @f
1195
        bts     [eax+APPDATA.except_mask], ecx
1195
        bts     [eax+APPDATA.except_mask], ecx
1196
@@:
1196
@@:
Line 1197... Line 1197...
1197
        ret
1197
        ret
1198
 
1198
 
1199
.26:
1199
.26:
1200
        stdcall user_unmap, ecx, edx, esi
1200
        stdcall user_unmap, ecx, edx, esi
Line 1201... Line 1201...
1201
        mov     [esp+32], eax
1201
        mov     [esp+SYSCALL_STACK._eax], eax
1202
        ret
1202
        ret
1203
 
1203
 
1204
.27:
1204
.27:
Line 1205... Line 1205...
1205
        cmp     ecx, OS_BASE
1205
        cmp     ecx, OS_BASE
1206
        jae     .fail
1206
        jae     .fail