Subversion Repositories Kolibri OS

Rev

Rev 1951 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1951 Rev 2000
Line -... Line 1...
-
 
1
;---------------------------------------------------------------------
1
error_window:
2
error_window:
2
	test dword [status],32
3
	test	dword [status],32
3
	jnz	 still
4
	jnz	still
-
 
5
	
4
	or	 dword [status],32
6
	or	dword [status],32
5
    mcall 9, procinfo, -1
7
	mcall	9,procinfo,-1
6
    mov   eax,[ebx+46]
8
	mov	eax,[ebx+46]
7
	test  eax,eax
9
	test	eax,eax
8
	jnz   @f
10
	jnz	@f
-
 
11
	
9
	mov   eax,100
12
	mov	eax,100
10
    mov   [error_window_y+2],ax
13
	mov	[error_window_y+2],ax
11
    mov   [error_window_x+2],ax
14
	mov	[error_window_x+2],ax
12
	jmp  .end
15
	jmp	.end
-
 
16
;---------------------------------------------------------------------
13
@@:
17
@@:
14
    shr   eax,1
18
	shr	eax,1
15
    add   eax,[ebx+38]
19
	add	eax,[ebx+38]
16
    sub   eax,50
20
	sub	eax,50
17
    mov   [error_window_y+2],ax
21
	mov	[error_window_y+2],ax
Line 19... Line 23...
19
    shr   eax,1
23
	shr	eax,1
20
    add   eax,[ebx+34]
24
	add	eax,[ebx+34]
21
    sub   eax,150
25
	sub	eax,150
22
    mov   [error_window_x+2],ax
26
	mov	[error_window_x+2],ax
23
.end:
27
.end:
24
	call	get_memory_for_tread_stack
28
	call	get_memory_for_thread_stack
25
	mov	[thread_stack_6],eax
29
	mov	[thread_stack_6],eax
26
	mcall	51,1,thread6	;,thread_stack_6
30
	mcall	51,1,thread6	; thread_stack_6
27
	ret
31
	ret
28
;---------------------------------------------------------------------
32
;---------------------------------------------------------------------
29
thread6:
33
thread6:
30
	mcall 9, procinfo_threads, -1
34
	mcall	9,procinfo_threads,-1
31
	mov   eax,[ebx+30]
35
	mov	eax,[ebx+30]
32
	mov   [PID6],eax
36
	mov	[PID6],eax
33
	mcall 40, 0x7
37
	mcall	40,0x7
34
	mov   [error_pointer],string
38
	mov	[error_pointer],string
-
 
39
;--------------------------------------
35
.red:
40
.red:
36
    call  .draw_error_window
41
	call	.draw_error_window
-
 
42
;--------------------------------------
37
.still:
43
.still:
38
    mcall 10
44
	mcall	10
39
    cmp   eax,1
45
	cmp	eax,1
40
    je	  .red
46
	je	.red
-
 
47
 
41
    cmp   eax,2			; key in buffer ?
48
	cmp	eax,2			; key in buffer ?
42
    je	  .key
49
	je	.key
-
 
50
 
43
    cmp   eax,3
51
	cmp	eax,3
44
    je	  .button
52
	je	.button
-
 
53
 
45
    jmp   .still
54
	jmp	.still
-
 
55
;---------------------------------------------------------------------
46
.key: 			; key
56
.key: 		; key
47
.button:
57
.button:
48
	xor  dword [status],32
58
	xor	dword [status],32
49
	xor   eax,eax
59
	xor	eax,eax
50
    mov   [PID6],eax
60
	mov	[PID6],eax
51
 
-
 
52
	mcall	68,13,[thread_stack_6]
61
	mcall	68,13,[thread_stack_6]
53
    mcall -1
62
	mcall	-1
54
    jmp   .still
63
	jmp	.still
55
;---------------------------------------------------------------------
64
;---------------------------------------------------------------------
-
 
65
;	*********************************************
-
 
66
;	*******	WINDOW DEFINITIONS AND DRAW ********
-
 
67
;	*********************************************
56
.draw_error_window:
68
.draw_error_window:
57
    mcall 12, 1
69
	mcall	12, 1
58
    mcall 0,[error_window_x] ,[error_window_y], 0x03ff0000
70
	mcall	0,[error_window_x],[error_window_y],0x03ff0000
59
	mcall 71,1, errortext
71
	mcall	71,1, errortext
60
    mcall 4,<10,30>,0x80ffffff,[error_pointer]
72
	mcall	4,<10,30>,0x80ffffff,[error_pointer]
61
	cmp   [return_code],0
73
	cmp	[return_code],0
62
	je    .continue
74
	je	.continue
-
 
75
 
63
	cmp   [return_code],1
76
	cmp	[return_code],1
64
	jne    @f
77
	jne	@f
-
 
78
 
65
    mcall 4,<10,50>,0x90ffffff,error_not_supported_file
79
	mcall	4,<10,50>,0x90ffffff,error_not_supported_file
66
	jmp  .end
80
	jmp	.end
-
 
81
;---------------------------------------------------------------------
67
@@:
82
@@:
68
	cmp   [return_code],2
83
	cmp	[return_code],2
69
	jne    @f
84
	jne	@f
-
 
85
	
70
    mcall 4,<10,50>,0x90ffffff,error_not_enough_memory
86
	mcall	4,<10,50>,0x90ffffff,error_not_enough_memory
71
	jmp  .end
87
	jmp	.end
-
 
88
;---------------------------------------------------------------------
72
@@:
89
@@:
73
    mcall 4,<10,50>,0x90ffffff,error_unknown
90
	mcall	4,<10,50>,0x90ffffff,error_unknown
74
	jmp  .end
91
	jmp	.end
-
 
92
;---------------------------------------------------------------------
75
.continue:
93
.continue:
76
    mcall 4,<10,50>,0x90ffffff,error_type
94
	mcall	4,<10,50>,0x90ffffff,error_type
77
    mcall 47,0x800a0000,[error_fs],<140,50>,0x10ffffff
95
	mcall	47,0x800a0000,[error_fs],<140,50>,0x10ffffff
78
	mov   edx,[error_fs]
96
	mov	edx,[error_fs]
79
	cmp   edx,0
97
	cmp	edx,0
80
	jb    .end
98
	jb	.end
-
 
99
	
81
	cmp   edx,11
100
	cmp	edx,11
82
	ja    .end
101
	ja	.end
-
 
102
	
83
	shl   edx,2
103
	shl	edx,2
84
	add   edx,error_fs_text_pointers
104
	add	edx,error_fs_text_pointers
85
	mov   edx,[edx]
105
	mov	edx,[edx]
86
	mcall 4,<10,70>,0x90ffffff,
106
	mcall	4,<10,70>,0x90ffffff,
87
;	mcall 47,0x800a0000,[error_locate],<140,5>,0x10ffffff
107
;	mcall	47,0x800a0000,[error_locate],<140,5>,0x10ffffff