Subversion Repositories Kolibri OS

Rev

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

Rev 593 Rev 656
Line 9... Line 9...
9
;;  Distributed under GPL. See file COPYING for details.        ;;
9
;;  Distributed under GPL. See file COPYING for details.        ;;
10
;;  Copyright 2003 Ville Turjanmaa                              ;;
10
;;  Copyright 2003 Ville Turjanmaa                              ;;
11
;;                                                              ;;
11
;;                                                              ;;
12
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
12
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Line 13... Line 13...
13
 
13
 
Line 14... Line 14...
14
$Revision: 593 $
14
$Revision: 656 $
15
 
15
 
16
 
16
 
Line 38... Line 38...
38
        mov     dword [edi+4], (11101111b shl 8) or (i40 and 0xFFFF0000)
38
        mov     dword [edi+4], (11101111b shl 8) or (i40 and 0xFFFF0000)
39
                                                ; type: trap gate
39
                                                ; type: trap gate
40
        ret
40
        ret
Line 41... Line 41...
41
 
41
 
-
 
42
iglobal
-
 
43
 
-
 
44
  msg_sel_ker   db "kernel", 0
-
 
45
  msg_sel_app   db "application", 0
42
iglobal
46
 
43
  sys_int:
47
  sys_int:
44
    dd e0,debug_exc,e2,e3
48
    dd e0,debug_exc,e2,e3
45
    dd e4,e5,e6,e7
49
    dd e4,e5,e6,e7
46
    dd e8,e9,e10,e11
50
    dd e8,e9,e10,e11
Line 176... Line 180...
176
 
180
 
177
uglobal
181
uglobal
178
  write_error_to  dd  0x0
182
  write_error_to  dd  0x0
Line -... Line 183...
-
 
183
endg
-
 
184
 
-
 
185
;show_error_parameters:
-
 
186
;
-
 
187
;        mov    [write_error_to],process_pid+43
-
 
188
;        mov    eax,[CURRENT_TASK]
-
 
189
;        shl    eax, 5
-
 
190
;        mov    eax,[CURRENT_TASK+TASKDATA.pid+eax]
-
 
191
;        call   writehex
-
 
192
;
-
 
193
;        mov    [write_error_to],process_error+43
-
 
194
;        mov    eax,[error_interrupt]
-
 
195
;        call   writehex
-
 
196
;
-
 
197
;        cmp    dword [esp+4+4], os_code ; CS
-
 
198
;        jnz    @f
-
 
199
;        ;mov    esi,system_error
-
 
200
;        ;call   sys_msg_board_str
-
 
201
;        DEBUGF 1,"%s",system_error
-
 
202
;      @@:
-
 
203
;        mov    eax, [esp+4] ; EIP
-
 
204
;
-
 
205
;        mov    [write_error_to],process_eip+43
-
 
206
;        call   writehex
-
 
207
;
-
 
208
;        ;mov    esi,process_error
-
 
209
;        ;call   sys_msg_board_str
-
 
210
;        DEBUGF 1,"%s",process_error
-
 
211
;
-
 
212
;        ;mov    esi,process_pid
-
 
213
;        ;call   sys_msg_board_str
-
 
214
;        DEBUGF 1,"%s",process_pid
-
 
215
;
-
 
216
;        ;mov    esi,process_eip
-
 
217
;        ;call   sys_msg_board_str
-
 
218
;        DEBUGF 1,"%s",process_eip
179
endg
219
;
180
 
-
 
181
show_error_parameters:
220
;        ret
182
 
221
show_error_parameters:
183
        mov    [write_error_to],process_pid+43
222
diff16 '[esp]',0,$
184
        mov    eax,[CURRENT_TASK]
223
    mov eax,[CURRENT_TASK]
185
        shl    eax, 5
224
    shl eax, 5
-
 
225
    DEBUGF  1, "K : Process - forced terminate PID: %x\n", [CURRENT_TASK + TASKDATA.pid + eax]
-
 
226
    DEBUGF  1, "K : Exception : %x Error : xxxxxxxx\n", [error_interrupt]
-
 
227
    DEBUGF  1, "K : EAX : %x EBX : %x ECX : %x\n", [esp + 0x20], [esp - 12 + 0x20], [esp - 4 + 0x20]
186
        mov    eax,[CURRENT_TASK+TASKDATA.pid+eax]
228
    DEBUGF  1, "K : EDX : %x ESI : %x EDI : %x\n", [esp - 8 + 0x20], [esp - 24 + 0x20], [esp - 28 + 0x20]
187
        call   writehex
229
    DEBUGF  1, "K : EBP : %x EIP : %x ", [esp - 20 + 0x20], [esp + 4 + 0x20]
188
 
230
 
189
        mov    [write_error_to],process_error+43
231
    mov eax, [esp + 8 + 0x20]
190
        mov    eax,[error_interrupt]
-
 
191
        call   writehex
232
    mov edi, msg_sel_app
192
 
233
    mov ebx, [esp + 16 + 0x20]
193
        cmp    dword [esp+4+4], os_code ; CS
234
    cmp eax, app_code
194
        jnz    @f
235
    je  @f
195
        ;mov    esi,system_error
-
 
196
        ;call   sys_msg_board_str
236
    mov edi, msg_sel_ker
197
        DEBUGF 1,"%s",system_error
237
    mov ebx, [esp - 16 + 0x20]
198
      @@:
-
 
199
        mov    eax, [esp+4] ; EIP
238
@@:
200
 
-
 
201
        mov    [write_error_to],process_eip+43
-
 
202
        call   writehex
-
 
203
 
-
 
204
        ;mov    esi,process_error
-
 
205
        ;call   sys_msg_board_str
-
 
206
        DEBUGF 1,"%s",process_error
-
 
207
 
-
 
208
        ;mov    esi,process_pid
-
 
209
        ;call   sys_msg_board_str
-
 
210
        DEBUGF 1,"%s",process_pid
-
 
211
 
-
 
212
        ;mov    esi,process_eip
-
 
213
        ;call   sys_msg_board_str
-
 
214
        DEBUGF 1,"%s",process_eip
239
;    DEBUGF  1, "ESP : %x\nK : Flags : %x CS : %x (%s)\n", ebx, [esp + 12 + 0x20], eax, edi
Line 215... Line 240...
215
 
240
    DEBUGF  1, "ESP : %x\nK : Flags : %x CS : %x\n", ebx, [esp + 12 + 0x20], eax
Line 851... Line 876...
851
 
876
 
852
  ;      mov    esi,boot_sched_2
877
  ;      mov    esi,boot_sched_2
Line 853... Line 878...
853
  ;      call   boot_log
878
  ;      call   boot_log
854
 
-