Subversion Repositories Kolibri OS

Rev

Rev 7786 | Rev 9568 | Go to most recent revision | Only display areas with differences | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 7786 Rev 8271
1
;*****************************************************************************
1
;*****************************************************************************
2
; Open Dialog - for Kolibri OS
2
; Open Dialog - for Kolibri OS
3
; Copyright (c) 2009-2013, Marat Zakiyanov aka Mario79, aka Mario
3
; Copyright (c) 2009-2013, Marat Zakiyanov aka Mario79, aka Mario
4
; All rights reserved.
4
; All rights reserved.
5
;
5
;
6
; Redistribution and use in source and binary forms, with or without
6
; Redistribution and use in source and binary forms, with or without
7
; modification, are permitted provided that the following conditions are met:
7
; modification, are permitted provided that the following conditions are met:
8
;	 * Redistributions of source code must retain the above copyright
8
;	 * Redistributions of source code must retain the above copyright
9
;	   notice, this list of conditions and the following disclaimer.
9
;	   notice, this list of conditions and the following disclaimer.
10
;	 * Redistributions in binary form must reproduce the above copyright
10
;	 * Redistributions in binary form must reproduce the above copyright
11
;	   notice, this list of conditions and the following disclaimer in the
11
;	   notice, this list of conditions and the following disclaimer in the
12
;	   documentation and/or other materials provided with the distribution.
12
;	   documentation and/or other materials provided with the distribution.
13
;	 * Neither the name of the  nor the
13
;	 * Neither the name of the  nor the
14
;	   names of its contributors may be used to endorse or promote products
14
;	   names of its contributors may be used to endorse or promote products
15
;	   derived from this software without specific prior written permission.
15
;	   derived from this software without specific prior written permission.
16
;
16
;
17
; THIS SOFTWARE IS PROVIDED BY Marat Zakiyanov ''AS IS'' AND ANY
17
; THIS SOFTWARE IS PROVIDED BY Marat Zakiyanov ''AS IS'' AND ANY
18
; EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18
; EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
19
; WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19
; WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
20
; DISCLAIMED. IN NO EVENT SHALL  BE LIABLE FOR ANY
20
; DISCLAIMED. IN NO EVENT SHALL  BE LIABLE FOR ANY
21
; DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21
; DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
22
; (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22
; (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
23
; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23
; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
24
; ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24
; ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25
; (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25
; (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
26
; SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26
; SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27
;*****************************************************************************
27
;*****************************************************************************
28
;---------------------------------------------------------------------
28
;---------------------------------------------------------------------
29
;Some documentation for memory
29
;Some documentation for memory
30
;
30
;
31
;area name db 'FFFFFFFF_open_dialog',0 ; FFFFFFFF = PID
31
;area name db 'FFFFFFFF_open_dialog',0 ; FFFFFFFF = PID
32
;
32
;
33
; communication area data
33
; communication area data
34
; flag	; +0
34
; flag	; +0
35
; dw 0	 ; 0 - empty, 1 - file for open, 2 -folder for open,
35
; dw 0	 ; 0 - empty, 1 - file for open, 2 -folder for open,
36
;	   3 - cancel, 4 - path=name of area 6822.
36
;	   3 - cancel, 4 - path=name of area 6822.
37
;
37
;
38
; type of dialog:  0-Open, 1-Save, 2-Dir
38
; type of dialog:  0-Open, 1-Save, 2-Dir
39
; dw 0 ; +2
39
; dw 0 ; +2
40
;
40
;
41
; window X size ; +4
41
; window X size ; +4
42
; dw 0
42
; dw 0
43
;
43
;
44
; window X position ; +6 
44
; window X position ; +6 
45
; dw 0
45
; dw 0
46
;
46
;
47
; window y size ; +8
47
; window y size ; +8
48
; dw 0
48
; dw 0
49
;
49
;
50
; window Y position ; +10
50
; window Y position ; +10
51
; dw 0
51
; dw 0
52
;
52
;
53
; OpenDialog WINDOW SLOT ; +12
53
; OpenDialog WINDOW SLOT ; +12
54
; dd 0
54
; dd 0
55
;
55
;
56
; file_path ; +16
56
; file_path ; +16
57
; rb 3824 ; path to file
57
; rb 3824 ; path to file
58
;
58
;
59
; file name ; +3840
59
; file name ; +3840
60
; rb 256
60
; rb 256
61
;
61
;
62
; filtration flag ; +4096
62
; filtration flag ; +4096
63
; dd 0 ; flag 0 - no filtration,  1 - filtering
63
; dd 0 ; flag 0 - no filtration,  1 - filtering
64
;
64
;
65
; area for storage of filtering values ; +4100
65
; area for storage of filtering values ; +4100
66
; rb 4092
66
; rb 4092
67
;---------------------------------------------------------------------
67
;---------------------------------------------------------------------
68
	use32
68
	use32
69
	org	0x0
69
	org	0x0
70
 
70
 
71
	db 'MENUET01'
71
	db 'MENUET01'
72
	dd 0x01
72
	dd 0x01
73
	dd START
73
	dd START
74
	dd IM_END
74
	dd IM_END
75
	dd I_END
75
	dd I_END
76
	dd stacktop
76
	dd stacktop
77
	dd param
77
	dd param
78
	dd path
78
	dd path
79
 
79
 
80
include '../../macros.inc'
80
include '../../macros.inc'
81
;define __DEBUG__ 1
81
;define __DEBUG__ 1
82
;define __DEBUG_LEVEL__ 1
82
;define __DEBUG_LEVEL__ 1
83
;include '../../debug-fdo.inc'
83
;include '../../debug-fdo.inc'
-
 
84
include '../../KOSfuncs.inc'
84
include '../../develop/libraries/box_lib/load_lib.mac'
85
include '../../load_lib.mac'
85
include '../../develop/libraries/box_lib/trunk/box_lib.mac'
86
include '../../develop/libraries/box_lib/trunk/box_lib.mac'
86
;include 'macros.inc'
87
;include 'macros.inc'
87
;include 'load_lib.mac'
88
;include 'load_lib.mac'
88
;include 'box_lib.mac'
89
;include 'box_lib.mac'
89
@use_library
90
@use_library
90
 
91
 
91
x_minimal_size equ 350
92
x_minimal_size equ 350
92
y_minimal_size equ 250
93
y_minimal_size equ 250
93
;---------------------------------------------------------------------
94
;---------------------------------------------------------------------
94
;---------------------------------------------------------------------
95
;---------------------------------------------------------------------
95
START:
96
START:
96
	mcall	68,11
97
	mcall	68,11
97
	mcall	66,1,1
98
	mcall	66,1,1
98
	mcall	40,0x27
99
	mcall	40,0x27
99
	call	get_communication_area
100
	call	get_communication_area
100
	
101
	
101
	call	get_active_pocess
102
	call	get_active_pocess
102
 
103
 
103
load_libraries	l_libs_start,end_l_libs
104
load_libraries	l_libs_start,end_l_libs
104
	test	eax,eax
105
	test	eax,eax
105
	jnz	button.exit
106
	jnz	button.exit
106
; initialize sort
107
; initialize sort
107
	push	dword 1
108
	push	dword 1
108
	call	dword [sort_init]
109
	call	dword [sort_init]
109
; unpack deflate
110
; unpack deflate
110
	mov	eax,[unpack_DeflateUnpack2]
111
	mov	eax,[unpack_DeflateUnpack2]
111
	mov	[deflate_unpack],eax
112
	mov	[deflate_unpack],eax
112
 
113
 
113
	mov	esi,start_pach
114
	mov	esi,start_pach
114
	mov	edi,previous_dir_path
115
	mov	edi,previous_dir_path
115
	call	copy_dir_name.1
116
	call	copy_dir_name.1
116
	
117
	
117
	call	load_root_directory
118
	call	load_root_directory
118
	call	load_start_directory
119
	call	load_start_directory
119
	call	sort_directory
120
	call	sort_directory
120
	call	load_icons
121
	call	load_icons
121
	call	convert_icons
122
	call	convert_icons
122
	call	load_ini
123
	call	load_ini
123
	call	calc_ini
124
	call	calc_ini
124
	jmp	red_1
125
	jmp	red_1
125
;---------------------------------------------------------------------
126
;---------------------------------------------------------------------
126
red:
127
red:
127
	call	control_minimal_window_size
128
	call	control_minimal_window_size
128
red_1:
129
red_1:
129
	call	draw_window
130
	call	draw_window
130
;---------------------------------------------------------------------
131
;---------------------------------------------------------------------
131
still:
132
still:
132
	mcall	10
133
	mcall	10
133
	cmp	eax,1
134
	cmp	eax,1
134
	je	red
135
	je	red
135
	cmp	eax,2
136
	cmp	eax,2
136
	je	key
137
	je	key
137
	cmp	eax,3
138
	cmp	eax,3
138
	je	button
139
	je	button
139
	cmp	eax,6
140
	cmp	eax,6
140
	je	mouse
141
	je	mouse
141
	jmp	still
142
	jmp	still
142
;---------------------------------------------------------------------
143
;---------------------------------------------------------------------
143
control_minimal_window_size:
144
control_minimal_window_size:
144
	pusha
145
	pusha
145
	call	get_window_param
146
	call	get_window_param
146
	test	[window_status],10b
147
	test	[window_status],10b
147
	jnz	.end	;red_1
148
	jnz	.end	;red_1
148
	test	[window_status],100b
149
	test	[window_status],100b
149
	jnz	.end	;red_1
150
	jnz	.end	;red_1
150
	test	[window_status],1b
151
	test	[window_status],1b
151
	jnz	.end	;red_1
152
	jnz	.end	;red_1
152
	mov	esi,-1
153
	mov	esi,-1
153
	mov	eax,procinfo
154
	mov	eax,procinfo
154
	mov	eax,[eax+46]
155
	mov	eax,[eax+46]
155
	cmp	eax,dword y_minimal_size ;200
156
	cmp	eax,dword y_minimal_size ;200
156
	jae	@f
157
	jae	@f
157
	mov	esi,dword y_minimal_size ;200
158
	mov	esi,dword y_minimal_size ;200
158
	mcall	67,-1,ebx,ebx
159
	mcall	67,-1,ebx,ebx
159
@@:
160
@@:
160
	mov	edx,-1
161
	mov	edx,-1
161
	mov	eax,procinfo
162
	mov	eax,procinfo
162
	mov	eax,[eax+42]
163
	mov	eax,[eax+42]
163
	cmp	eax,dword x_minimal_size ;300
164
	cmp	eax,dword x_minimal_size ;300
164
	jae	@f
165
	jae	@f
165
	mov	edx,dword x_minimal_size ;300
166
	mov	edx,dword x_minimal_size ;300
166
	mcall	67,-1,ebx,,ebx
167
	mcall	67,-1,ebx,,ebx
167
@@:
168
@@:
168
.end:
169
.end:
169
	popa
170
	popa
170
	ret
171
	ret
171
;---------------------------------------------------------------------
172
;---------------------------------------------------------------------
172
key:
173
key:
173
	mov	al,[focus_pointer]
174
	mov	al,[focus_pointer]
174
	test	al,al
175
	test	al,al
175
	jne	key_ASCII
176
	jne	key_ASCII
176
	mcall	2
177
	mcall	2
177
	xor	ebx,ebx
178
	xor	ebx,ebx
178
	cmp	[extended_key],1
179
	cmp	[extended_key],1
179
	je	.extended_key
180
	je	.extended_key
180
	test	al,al
181
	test	al,al
181
	jnz	still
182
	jnz	still
182
	cmp	ah,0xE0
183
	cmp	ah,0xE0
183
	jne	@f
184
	jne	@f
184
	mov	[extended_key],1
185
	mov	[extended_key],1
185
	jmp	still
186
	jmp	still
186
@@:
187
@@:
187
	cmp	ah,72	; arrow up
188
	cmp	ah,72	; arrow up
188
	je	.2
189
	je	.2
189
	cmp	ah,80	; arrow down
190
	cmp	ah,80	; arrow down
190
	je	.1
191
	je	.1
191
	cmp	ah,28	; Enter
192
	cmp	ah,28	; Enter
192
	je	.7
193
	je	.7
193
	cmp	ah,1	; Esc
194
	cmp	ah,1	; Esc
194
	je	button.exit
195
	je	button.exit
195
	cmp	ah,14	; Backspace
196
	cmp	ah,14	; Backspace
196
	je	button.exit_dir
197
	je	button.exit_dir
197
	cmp	ah,187	; F1
198
	cmp	ah,187	; F1
198
	je	select_disk
199
	je	select_disk
199
	cmp	ah,188	; F2
200
	cmp	ah,188	; F2
200
	je	select_sort
201
	je	select_sort
201
	cmp	ah,189	; F3
202
	cmp	ah,189	; F3
202
	je	select_filter
203
	je	select_filter
203
	cmp	ah,19	; R
204
	cmp	ah,19	; R
204
	je	button.reload_dir
205
	je	button.reload_dir
205
	cmp	ah,42
206
	cmp	ah,42
206
	je	key_shift_up
207
	je	key_shift_up
207
	cmp	ah,54
208
	cmp	ah,54
208
	je	key_shift_up
209
	je	key_shift_up
209
	cmp	ah,170
210
	cmp	ah,170
210
	je	key_shift_down
211
	je	key_shift_down
211
	cmp	ah,182
212
	cmp	ah,182
212
	je	key_shift_down
213
	je	key_shift_down
213
	cmp	ah,29
214
	cmp	ah,29
214
	je	key_ctrl_up
215
	je	key_ctrl_up
215
	cmp	ah,157
216
	cmp	ah,157
216
	je	key_ctrl_down
217
	je	key_ctrl_down
217
	cmp	ah,56
218
	cmp	ah,56
218
	je	key_alt_up
219
	je	key_alt_up
219
	cmp	ah,184
220
	cmp	ah,184
220
	je	key_alt_down
221
	je	key_alt_down
221
	cmp	ah,206	; NumPad+ Up
222
	cmp	ah,206	; NumPad+ Up
222
	je	NumPad_plus_Up
223
	je	NumPad_plus_Up
223
	cmp	ah,202	; NumPad- Up
224
	cmp	ah,202	; NumPad- Up
224
	je	NumPad_minus_Up
225
	je	NumPad_minus_Up
225
	cmp	ah,183	; NumPad* Up
226
	cmp	ah,183	; NumPad* Up
226
	je	NumPad_invert_Up
227
	je	NumPad_invert_Up
227
	cmp	ah,158
228
	cmp	ah,158
228
	je	symbol_a_up
229
	je	symbol_a_up
229
	cmp	ah,15	; Tab down
230
	cmp	ah,15	; Tab down
230
	je	change_focus_area_press_Tab_key
231
	je	change_focus_area_press_Tab_key
231
	cmp	ah,143	; Tab up
232
	cmp	ah,143	; Tab up
232
	je	change_focus_area_check_Tab_key
233
	je	change_focus_area_check_Tab_key
233
; compare for "1,2,3,4,5,6,7,8,9,0,(-),(=)"
234
; compare for "1,2,3,4,5,6,7,8,9,0,(-),(=)"
234
	cmp	ah,2
235
	cmp	ah,2
235
	jb	still
236
	jb	still
236
	cmp	ah,13
237
	cmp	ah,13
237
	jbe	.12
238
	jbe	.12
238
; compare for "q,w,e,r,t,y,u,i,o,p,([),(])"	
239
; compare for "q,w,e,r,t,y,u,i,o,p,([),(])"	
239
	cmp	ah,16
240
	cmp	ah,16
240
	jb	still
241
	jb	still
241
	cmp	ah,27
242
	cmp	ah,27
242
	jbe	.12
243
	jbe	.12
243
; compare for "a,s,d,f,g,h,j,k,l,(;),('),(`)"	
244
; compare for "a,s,d,f,g,h,j,k,l,(;),('),(`)"	
244
	cmp	ah,30
245
	cmp	ah,30
245
	jb	still
246
	jb	still
246
	cmp	ah,41
247
	cmp	ah,41
247
	jbe	.12
248
	jbe	.12
248
; compare for "(\),z,x,c,v,b,n,m,(,),(.),(/)"	
249
; compare for "(\),z,x,c,v,b,n,m,(,),(.),(/)"	
249
	cmp	ah,43
250
	cmp	ah,43
250
	jb	still
251
	jb	still
251
	cmp	ah,53
252
	cmp	ah,53
252
	jbe	.12	
253
	jbe	.12	
253
	jmp	still
254
	jmp	still
254
.extended_key:
255
.extended_key:
255
	mov	[extended_key],0
256
	mov	[extended_key],0
256
	cmp	ah,80	; arrow down
257
	cmp	ah,80	; arrow down
257
	je	.1
258
	je	.1
258
	cmp	ah,72	; arrow up
259
	cmp	ah,72	; arrow up
259
	je	.2
260
	je	.2
260
	cmp	ah,81	; PageDown
261
	cmp	ah,81	; PageDown
261
	je	.3
262
	je	.3
262
	cmp	ah,73	; PageUp
263
	cmp	ah,73	; PageUp
263
	je	.4
264
	je	.4
264
	cmp	ah,71	; Home
265
	cmp	ah,71	; Home
265
	je	.5
266
	je	.5
266
	cmp	ah,79	; End
267
	cmp	ah,79	; End
267
	je	.6
268
	je	.6
268
	cmp	ah,28	; Enter
269
	cmp	ah,28	; Enter
269
	je	.7
270
	je	.7
270
	cmp	ah,82	; Insert
271
	cmp	ah,82	; Insert
271
	je	.8
272
	je	.8
272
	
273
	
273
	cmp	ah,29
274
	cmp	ah,29
274
	je	key_ctrl_up
275
	je	key_ctrl_up
275
	cmp	ah,157
276
	cmp	ah,157
276
	je	key_ctrl_down
277
	je	key_ctrl_down
277
	cmp	ah,56
278
	cmp	ah,56
278
	je	key_alt_up
279
	je	key_alt_up
279
	cmp	ah,184
280
	cmp	ah,184
280
	je	key_alt_down
281
	je	key_alt_down
281
	jmp	still
282
	jmp	still
282
;---------------------------------
283
;---------------------------------
283
.12:
284
.12:
284
	inc	ebx	; 12 - Search with key
285
	inc	ebx	; 12 - Search with key
285
;---------------------------------
286
;---------------------------------
286
.11:
287
.11:
287
	inc	ebx	; 11 - Invert Mark
288
	inc	ebx	; 11 - Invert Mark
288
;---------------------------------
289
;---------------------------------
289
.10:
290
.10:
290
	inc	ebx	; 10 - Unmark All
291
	inc	ebx	; 10 - Unmark All
291
;---------------------------------
292
;---------------------------------
292
.9:
293
.9:
293
	inc	ebx	; 9 - Mark All
294
	inc	ebx	; 9 - Mark All
294
;---------------------------------
295
;---------------------------------
295
.8:
296
.8:
296
	inc	ebx	; 8 - Insert (Mark)
297
	inc	ebx	; 8 - Insert (Mark)
297
;---------------------------------
298
;---------------------------------
298
.7:
299
.7:
299
	inc	ebx	; 7 - Enter
300
	inc	ebx	; 7 - Enter
300
;---------------------------------
301
;---------------------------------
301
.6:
302
.6:
302
	inc	ebx	; 6 - End
303
	inc	ebx	; 6 - End
303
;---------------------------------
304
;---------------------------------
304
.5:
305
.5:
305
	inc	ebx	; 5 - Home
306
	inc	ebx	; 5 - Home
306
;---------------------------------
307
;---------------------------------
307
.4:
308
.4:
308
	inc	ebx	; 4 - PageUp
309
	inc	ebx	; 4 - PageUp
309
;---------------------------------
310
;---------------------------------
310
.3:
311
.3:
311
	inc	ebx	; 3 - PageDown
312
	inc	ebx	; 3 - PageDown
312
;---------------------------------
313
;---------------------------------
313
.2:
314
.2:
314
	inc	ebx	; 2 - arrow up
315
	inc	ebx	; 2 - arrow up
315
;---------------------------------
316
;---------------------------------
316
.1:
317
.1:
317
	inc	ebx	; 1 - arrow down
318
	inc	ebx	; 1 - arrow down
318
;---------------------------------
319
;---------------------------------
319
	call	.key_action
320
	call	.key_action
320
	
321
	
321
;	movzx	ecx,word [file_browser_data_1.start_draw_cursor_line]
322
;	movzx	ecx,word [file_browser_data_1.start_draw_cursor_line]
322
;	mcall	47,0x80000,,<50,0>,0x40000000,0xffffff
323
;	mcall	47,0x80000,,<50,0>,0x40000000,0xffffff
323
;	movzx	ecx,word [file_browser_data_1.size_y]
324
;	movzx	ecx,word [file_browser_data_1.size_y]
324
;	mcall	47,0x80000,,<150,0>,0x40000000,0xffffff
325
;	mcall	47,0x80000,,<150,0>,0x40000000,0xffffff
325
 
326
 
326
	mov	eax,file_browser_data_1.mouse_keys_delta
327
	mov	eax,file_browser_data_1.mouse_keys_delta
327
	cmp	[eax],dword 3
328
	cmp	[eax],dword 3
328
	jne	still
329
	jne	still
329
	xor	ebx,ebx
330
	xor	ebx,ebx
330
	mov	[eax],ebx
331
	mov	[eax],ebx
331
	call	load_next_dir
332
	call	load_next_dir
332
	jmp	still
333
	jmp	still
333
;-------------------------------------------------------
334
;-------------------------------------------------------
334
.key_action:
335
.key_action:
335
	mov	[file_browser_data_1.key_action],bx
336
	mov	[file_browser_data_1.key_action],bx
336
	shr	ax,8
337
	shr	ax,8
337
	mov	[file_browser_data_1.key_action_num],ax
338
	mov	[file_browser_data_1.key_action_num],ax
338
 
339
 
339
	push	dword file_browser_data_1
340
	push	dword file_browser_data_1
340
	call	[FileBrowser_key]
341
	call	[FileBrowser_key]
341
 
342
 
342
	call	draw_open_button_label
343
	call	draw_open_button_label
343
 
344
 
344
	cmp	[file_browser_data_1.draw_scroll_bar],0
345
	cmp	[file_browser_data_1.draw_scroll_bar],0
345
	je	@f
346
	je	@f
346
	call	draw_scrollbar1
347
	call	draw_scrollbar1
347
	mov	[file_browser_data_1.draw_scroll_bar],0
348
	mov	[file_browser_data_1.draw_scroll_bar],0
348
@@:
349
@@:
349
	ret
350
	ret
350
;---------------------------------------------------------------------
351
;---------------------------------------------------------------------
351
change_focus_area_Tab_key_ASCII:
352
change_focus_area_Tab_key_ASCII:
352
	xor	eax,eax
353
	xor	eax,eax
353
	inc	eax
354
	inc	eax
354
	mov	[Tab_key_block],al
355
	mov	[Tab_key_block],al
355
	jmp	change_focus_area
356
	jmp	change_focus_area
356
;---------------------------------------------------------------------
357
;---------------------------------------------------------------------
357
change_focus_area_press_Tab_key:
358
change_focus_area_press_Tab_key:
358
	cmp	[open_dialog_type],1
359
	cmp	[open_dialog_type],1
359
	jne	still
360
	jne	still
360
	mov	al,[Tab_key_block]
361
	mov	al,[Tab_key_block]
361
	test	al,al
362
	test	al,al
362
	jnz	still
363
	jnz	still
363
	xor	eax,eax
364
	xor	eax,eax
364
	inc	eax
365
	inc	eax
365
	mov	[Tab_key],al
366
	mov	[Tab_key],al
366
	jmp	still
367
	jmp	still
367
;---------------------------------------------------------------------
368
;---------------------------------------------------------------------
368
change_focus_area_check_Tab_key:
369
change_focus_area_check_Tab_key:
369
	cmp	[open_dialog_type],1
370
	cmp	[open_dialog_type],1
370
	jne	still
371
	jne	still
371
	xor	eax,eax
372
	xor	eax,eax
372
	mov	[Tab_key_block],al
373
	mov	[Tab_key_block],al
373
	mov	al,[Tab_key]
374
	mov	al,[Tab_key]
374
	test	al,al
375
	test	al,al
375
	jz	still
376
	jz	still
376
	xor	eax,eax
377
	xor	eax,eax
377
	mov	[Tab_key],al
378
	mov	[Tab_key],al
378
;---------------------------------------------------------------------
379
;---------------------------------------------------------------------
379
change_focus_area:
380
change_focus_area:
380
	mov	al,[focus_pointer]
381
	mov	al,[focus_pointer]
381
	inc	al
382
	inc	al
382
	and	al,1
383
	and	al,1
383
	mov	[focus_pointer],al
384
	mov	[focus_pointer],al
384
.1:
385
.1:
385
	mov	edi,edit1
386
	mov	edi,edit1
386
	test	al,al
387
	test	al,al
387
	jne	@f
388
	jne	@f
388
	mov	[file_browser_data_1.select_panel_counter],1
389
	mov	[file_browser_data_1.select_panel_counter],1
389
	and	[edi+44],dword 0xFFFFFFFD	; ed_focus
390
	and	[edi+44],dword 0xFFFFFFFD	; ed_focus
390
	mov	[edi+12],dword 0xffffff ; color white
391
	mov	[edi+12],dword 0xffffff ; color white
391
	call	draw_draw_file_browser1
392
	call	draw_draw_file_browser1
392
	mcall	66,1,1
393
	mcall	66,1,1
393
	jmp	still
394
	jmp	still
394
@@:
395
@@:
395
	mov	[file_browser_data_1.select_panel_counter],0
396
	mov	[file_browser_data_1.select_panel_counter],0
396
	or	[edi+44],dword ed_focus
397
	or	[edi+44],dword ed_focus
397
	mov	[edi+12],dword 0xffffb0 ; color yellow
398
	mov	[edi+12],dword 0xffffb0 ; color yellow
398
	call	draw_draw_file_browser1
399
	call	draw_draw_file_browser1
399
	mcall	66,1,0
400
	mcall	66,1,0
400
	jmp	still
401
	jmp	still
401
;---------------------------------------------------------------------
402
;---------------------------------------------------------------------
402
key_ASCII:
403
key_ASCII:
403
	mcall	2
404
	mcall	2
404
	cmp	ah,9
405
	cmp	ah,9
405
	je	change_focus_area_Tab_key_ASCII
406
	je	change_focus_area_Tab_key_ASCII
406
	cmp	ah,13
407
	cmp	ah,13
407
	je	.13
408
	je	.13
408
	cmp	ah,27
409
	cmp	ah,27
409
	je	button.exit
410
	je	button.exit
410
	push	dword name_editboxes
411
	push	dword name_editboxes
411
	call	[edit_box_key]
412
	call	[edit_box_key]
412
	jmp	still
413
	jmp	still
413
.13:
414
.13:
414
;	cmp [open_dialog_type],2	; Select dir
415
;	cmp [open_dialog_type],2	; Select dir
415
;	je	file_no_folder
416
;	je	file_no_folder
416
;	cmp	[open_dialog_type],1	; Save file
417
;	cmp	[open_dialog_type],1	; Save file
417
;	jne	user_selected_name_action	; load_dir
418
;	jne	user_selected_name_action	; load_dir
418
;	inc	[open_dialog_type]
419
;	inc	[open_dialog_type]
419
	jmp	file_no_folder
420
	jmp	file_no_folder
420
;.load_dir:
421
;.load_dir:
421
;	mov	[file_browser_data_1.select_panel_counter],1
422
;	mov	[file_browser_data_1.select_panel_counter],1
422
;	xor	eax,eax
423
;	xor	eax,eax
423
;	mov	[focus_pointer],al
424
;	mov	[focus_pointer],al
424
;	mcall	66,1,1
425
;	mcall	66,1,1
425
 
426
 
426
;	xor	eax,eax
427
;	xor	eax,eax
427
;	mov	esi,dir_path
428
;	mov	esi,dir_path
428
;	cld
429
;	cld
429
;@@:
430
;@@:
430
;	lodsb
431
;	lodsb
431
;	test	al,al
432
;	test	al,al
432
;	jne	@r
433
;	jne	@r
433
;	sub	esi,2
434
;	sub	esi,2
434
;	cmp	[esi],byte '/'
435
;	cmp	[esi],byte '/'
435
;	jne	@f
436
;	jne	@f
436
;	xor	eax,eax
437
;	xor	eax,eax
437
;	mov	[esi],al
438
;	mov	[esi],al
438
;@@:
439
;@@:
439
;	call	load_next_dir.1
440
;	call	load_next_dir.1
440
;	jmp	still
441
;	jmp	still
441
;---------------------------------------------------------------------
442
;---------------------------------------------------------------------
442
user_selected_name_action:
443
user_selected_name_action:
443
	mov	eax,[communication_area]
444
	mov	eax,[communication_area]
444
	test	eax,eax
445
	test	eax,eax
445
	jnz	@f
446
	jnz	@f
446
	call	control_minimal_window_size
447
	call	control_minimal_window_size
447
	call	draw_window
448
	call	draw_window
448
	ret
449
	ret
449
@@:
450
@@:
450
	add	eax,16	;12
451
	add	eax,16	;12
451
;copy_path	user_selected_name,dir_path,eax,0
452
;copy_path	user_selected_name,dir_path,eax,0
452
	mov	esi,dir_path
453
	mov	esi,dir_path
453
	mov	edi,eax
454
	mov	edi,eax
454
	call	copy_dir_name
455
	call	copy_dir_name
455
	mov	[edi-1],byte '/'
456
	mov	[edi-1],byte '/'
456
	mov	esi,user_selected_name
457
	mov	esi,user_selected_name
457
	call	copy_dir_name
458
	call	copy_dir_name
458
	
459
	
459
	mov	eax,[communication_area]
460
	mov	eax,[communication_area]
460
	mov	[eax],word 1
461
	mov	[eax],word 1
461
	jmp	button.exit
462
	jmp	button.exit
462
;---------------------------------------------------------------------	
463
;---------------------------------------------------------------------	
463
select_disk:
464
select_disk:
464
	call	check_alt
465
	call	check_alt
465
.1:
466
.1:
466
	call	load_root_directory
467
	call	load_root_directory
467
	xor	eax,eax
468
	xor	eax,eax
468
	mov	[menu_data_1.ret_key],eax
469
	mov	[menu_data_1.ret_key],eax
469
 
470
 
470
	push	dword menu_data_1
471
	push	dword menu_data_1
471
	call	[menu_bar_activate]
472
	call	[menu_bar_activate]
472
 
473
 
473
	call	clear_control_key_flag
474
	call	clear_control_key_flag
474
 
475
 
475
	mov	eax,[menu_data_1.ret_key]
476
	mov	eax,[menu_data_1.ret_key]
476
	mov	[menu_data_1.ret_key],dword 0
477
	mov	[menu_data_1.ret_key],dword 0
477
	cmp	eax,1
478
	cmp	eax,1
478
	je	select_filter.1
479
	je	select_filter.1
479
 
480
 
480
	cmp	eax,2
481
	cmp	eax,2
481
	je	select_sort.1
482
	je	select_sort.1
482
 
483
 
483
	cmp	[menu_data_1.click],dword 1
484
	cmp	[menu_data_1.click],dword 1
484
	jne	still
485
	jne	still
485
 
486
 
486
	cmp	[menu_data_1.cursor_out],dword 0
487
	cmp	[menu_data_1.cursor_out],dword 0
487
	jne	analyse_out_menu_1
488
	jne	analyse_out_menu_1
488
	jmp	still
489
	jmp	still
489
;---------------------------------------------------------------------
490
;---------------------------------------------------------------------
490
select_sort:
491
select_sort:
491
	call	check_alt
492
	call	check_alt
492
.1:
493
.1:
493
	xor	eax,eax
494
	xor	eax,eax
494
	mov	[menu_data_2.ret_key],eax
495
	mov	[menu_data_2.ret_key],eax
495
 
496
 
496
	push	dword menu_data_2
497
	push	dword menu_data_2
497
	call	[menu_bar_activate]
498
	call	[menu_bar_activate]
498
 
499
 
499
	call	clear_control_key_flag
500
	call	clear_control_key_flag
500
 
501
 
501
	mov	eax,[menu_data_2.ret_key]
502
	mov	eax,[menu_data_2.ret_key]
502
	mov	[menu_data_2.ret_key],dword 0
503
	mov	[menu_data_2.ret_key],dword 0
503
	cmp	eax,1
504
	cmp	eax,1
504
	je	select_disk.1
505
	je	select_disk.1
505
 
506
 
506
	cmp	eax,2
507
	cmp	eax,2
507
	je	select_filter.1
508
	je	select_filter.1
508
 
509
 
509
 
510
 
510
	cmp	[menu_data_2.click],dword 1
511
	cmp	[menu_data_2.click],dword 1
511
	jne	still
512
	jne	still
512
 
513
 
513
	cmp	[menu_data_2.cursor_out],dword 0
514
	cmp	[menu_data_2.cursor_out],dword 0
514
	jne	analyse_out_menu_2
515
	jne	analyse_out_menu_2
515
	jmp	still
516
	jmp	still
516
;---------------------------------------------------------------------
517
;---------------------------------------------------------------------
517
select_filter:
518
select_filter:
518
	call	check_alt
519
	call	check_alt
519
.1:
520
.1:
520
	xor	eax,eax
521
	xor	eax,eax
521
	mov	[menu_data_3.ret_key],eax
522
	mov	[menu_data_3.ret_key],eax
522
 
523
 
523
	push	dword menu_data_3
524
	push	dword menu_data_3
524
	call	[menu_bar_activate]
525
	call	[menu_bar_activate]
525
 
526
 
526
	call	clear_control_key_flag
527
	call	clear_control_key_flag
527
 
528
 
528
	mov	eax,[menu_data_3.ret_key]
529
	mov	eax,[menu_data_3.ret_key]
529
	mov	[menu_data_3.ret_key],dword 0
530
	mov	[menu_data_3.ret_key],dword 0
530
	cmp	eax,1
531
	cmp	eax,1
531
	je	select_sort.1
532
	je	select_sort.1
532
 
533
 
533
	cmp	eax,2
534
	cmp	eax,2
534
	je	select_disk.1
535
	je	select_disk.1
535
 
536
 
536
 
537
 
537
	cmp	[menu_data_3.click],dword 1
538
	cmp	[menu_data_3.click],dword 1
538
	jne	still
539
	jne	still
539
 
540
 
540
	cmp	[menu_data_3.cursor_out],dword 0
541
	cmp	[menu_data_3.cursor_out],dword 0
541
	jne	analyse_out_menu_3
542
	jne	analyse_out_menu_3
542
	jmp	still
543
	jmp	still
543
;---------------------------------------------------------------------
544
;---------------------------------------------------------------------
544
symbol_a_up:
545
symbol_a_up:
545
NumPad_plus_Up:
546
NumPad_plus_Up:
546
	call	check_ctrl
547
	call	check_ctrl
547
	jmp	key.9
548
	jmp	key.9
548
;---------------------------------------
549
;---------------------------------------
549
NumPad_minus_Up:
550
NumPad_minus_Up:
550
	call	check_ctrl
551
	call	check_ctrl
551
	jmp	key.10
552
	jmp	key.10
552
;---------------------------------------
553
;---------------------------------------
553
NumPad_invert_Up:
554
NumPad_invert_Up:
554
	call	check_ctrl
555
	call	check_ctrl
555
	jmp	key.11
556
	jmp	key.11
556
;---------------------------------------	
557
;---------------------------------------	
557
check_alt:
558
check_alt:
558
	xor	eax,eax
559
	xor	eax,eax
559
	mov	al,[alt_flag]
560
	mov	al,[alt_flag]
560
	test	eax,eax
561
	test	eax,eax
561
	jz	@f
562
	jz	@f
562
	xor	ebx,ebx
563
	xor	ebx,ebx
563
	ret
564
	ret
564
@@:
565
@@:
565
	add	esp,4
566
	add	esp,4
566
	jmp	still
567
	jmp	still
567
;---------------------------------------	
568
;---------------------------------------	
568
check_ctrl:
569
check_ctrl:
569
	xor	eax,eax
570
	xor	eax,eax
570
	mov	al,[ctrl_flag]
571
	mov	al,[ctrl_flag]
571
	test	eax,eax
572
	test	eax,eax
572
	jz	@f
573
	jz	@f
573
	xor	ebx,ebx
574
	xor	ebx,ebx
574
	ret
575
	ret
575
@@:
576
@@:
576
	add	esp,4
577
	add	esp,4
577
	jmp	still
578
	jmp	still
578
;---------------------------------------------------------------------
579
;---------------------------------------------------------------------
579
clear_control_key_flag:
580
clear_control_key_flag:
580
	xor	eax,eax
581
	xor	eax,eax
581
	mov	[shift_flag],al
582
	mov	[shift_flag],al
582
	mov	[ctrl_flag],al
583
	mov	[ctrl_flag],al
583
	mov	[alt_flag],al
584
	mov	[alt_flag],al
584
	ret
585
	ret
585
;---------------------------------------------------------------------
586
;---------------------------------------------------------------------
586
key_shift_up:
587
key_shift_up:
587
	mov	[shift_flag],1
588
	mov	[shift_flag],1
588
	jmp	still
589
	jmp	still
589
;---------------------------------------------------------------------
590
;---------------------------------------------------------------------
590
key_shift_down:
591
key_shift_down:
591
	mov	[shift_flag],0
592
	mov	[shift_flag],0
592
	jmp	still
593
	jmp	still
593
;---------------------------------------------------------------------
594
;---------------------------------------------------------------------
594
key_ctrl_up:
595
key_ctrl_up:
595
	mov	[ctrl_flag],1
596
	mov	[ctrl_flag],1
596
	jmp	still
597
	jmp	still
597
;---------------------------------------------------------------------
598
;---------------------------------------------------------------------
598
key_ctrl_down:
599
key_ctrl_down:
599
	mov	[ctrl_flag],0
600
	mov	[ctrl_flag],0
600
	jmp	still
601
	jmp	still
601
;---------------------------------------------------------------------
602
;---------------------------------------------------------------------
602
key_alt_up:
603
key_alt_up:
603
	mov	[alt_flag],1
604
	mov	[alt_flag],1
604
	jmp	still
605
	jmp	still
605
;---------------------------------------------------------------------
606
;---------------------------------------------------------------------
606
key_alt_down:
607
key_alt_down:
607
	mov	[alt_flag],0
608
	mov	[alt_flag],0
608
	jmp	still
609
	jmp	still
609
;---------------------------------------------------------------------
610
;---------------------------------------------------------------------
610
button:
611
button:
611
	mcall	17
612
	mcall	17
612
	cmp	ah,6
613
	cmp	ah,6
613
	je	.reload_dir_1
614
	je	.reload_dir_1
614
	cmp	ah,4
615
	cmp	ah,4
615
	je	.open_dir_or_file
616
	je	.open_dir_or_file
616
	cmp	ah,3
617
	cmp	ah,3
617
	je	.exit
618
	je	.exit
618
	cmp	ah,2
619
	cmp	ah,2
619
	je	.exit_dir
620
	je	.exit_dir
620
	cmp	ah,1
621
	cmp	ah,1
621
	jne	still
622
	jne	still
622
.exit:
623
.exit:
623
	mov	eax,[communication_area]
624
	mov	eax,[communication_area]
624
	test	eax,eax
625
	test	eax,eax
625
	jz	@f
626
	jz	@f
626
	cmp	[eax],word 1
627
	cmp	[eax],word 1
627
	je	@f
628
	je	@f
628
	mov	[eax],word 3
629
	mov	[eax],word 3
629
@@:
630
@@:
630
	mov	eax,[N_error]
631
	mov	eax,[N_error]
631
	test	eax,eax
632
	test	eax,eax
632
	jz	@f
633
	jz	@f
633
	call	start_error_window_thread
634
	call	start_error_window_thread
634
@@:
635
@@:
635
	call	get_window_param
636
	call	get_window_param
636
	mov	ebx,[communication_area]
637
	mov	ebx,[communication_area]
637
	mov	ecx,procinfo
638
	mov	ecx,procinfo
638
;	mov	eax,[window_x]
639
;	mov	eax,[window_x]
639
	mov	eax,[ecx+34]
640
	mov	eax,[ecx+34]
640
	shl	eax,16
641
	shl	eax,16
641
	add	eax,[ecx+42]
642
	add	eax,[ecx+42]
642
	mov	[ebx+4],eax
643
	mov	[ebx+4],eax
643
;	mov	eax,[window_y]
644
;	mov	eax,[window_y]
644
	mov	eax,[ecx+38]
645
	mov	eax,[ecx+38]
645
	shl	eax,16
646
	shl	eax,16
646
	add	eax,[ecx+46]
647
	add	eax,[ecx+46]
647
	mov	[ebx+8],eax
648
	mov	[ebx+8],eax
648
 
649
 
649
	mcall	-1
650
	mcall	-1
650
;---------------------------------------------------------------------
651
;---------------------------------------------------------------------
651
.reload_dir:
652
.reload_dir:
652
	cmp	[ctrl_flag],bl
653
	cmp	[ctrl_flag],bl
653
	je	key.12 ; Just symbol 'R' or 'r'
654
	je	key.12 ; Just symbol 'R' or 'r'
654
.reload_dir_1:
655
.reload_dir_1:
655
	call	load_next_dir.1
656
	call	load_next_dir.1
656
	jmp	still
657
	jmp	still
657
;---------------------------------------------------------------------
658
;---------------------------------------------------------------------
658
.exit_dir:
659
.exit_dir:
659
	call	load_next_dir.exit_dir
660
	call	load_next_dir.exit_dir
660
	jmp	still
661
	jmp	still
661
;---------------------------------------------------------------------
662
;---------------------------------------------------------------------
662
.open_dir_or_file:
663
.open_dir_or_file:
663
	cmp	[open_dialog_type],0	;Open file
664
	cmp	[open_dialog_type],0	;Open file
664
	jne	@f
665
	jne	@f
665
 
666
 
666
	mov	eax,[file_browser_data_1.folder_data]
667
	mov	eax,[file_browser_data_1.folder_data]
667
	mov	eax,[eax+4]
668
	mov	eax,[eax+4]
668
	test	eax,eax
669
	test	eax,eax
669
	jz	button.exit
670
	jz	button.exit
670
@@:
671
@@:
671
	cmp	[open_dialog_type],2	;Select dir
672
	cmp	[open_dialog_type],2	;Select dir
672
	je	file_no_folder
673
	je	file_no_folder
673
	
674
	
674
	cmp	[open_dialog_type],1	;Save file
675
	cmp	[open_dialog_type],1	;Save file
675
	jne	@f
676
	jne	@f
676
 
677
 
677
	mov	al,[focus_pointer]
678
	mov	al,[focus_pointer]
678
	test	al,al
679
	test	al,al
679
	jne	file_no_folder	
680
	jne	file_no_folder	
680
@@:
681
@@:
681
	xor	ebx,ebx
682
	xor	ebx,ebx
682
	jmp	key.7
683
	jmp	key.7
683
;---------------------------------------------------------------------
684
;---------------------------------------------------------------------
684
thread_start:
685
thread_start:
685
	mov	eax,[N_error]
686
	mov	eax,[N_error]
686
	cmp	al,1
687
	cmp	al,1
687
	jne	@f
688
	jne	@f
688
	mov	[N_error],load_ini_error_type
689
	mov	[N_error],load_ini_error_type
689
	mov	[error_path],file_name
690
	mov	[error_path],file_name
690
	jmp	.error_type
691
	jmp	.error_type
691
@@:
692
@@:
692
	cmp	al,2
693
	cmp	al,2
693
	jne	@f
694
	jne	@f
694
	mov	[N_error],load_icons_error_type
695
	mov	[N_error],load_icons_error_type
695
	mov	[error_path],file_name
696
	mov	[error_path],file_name
696
	jmp	.error_type
697
	jmp	.error_type
697
@@:
698
@@:
698
	cmp	al,3
699
	cmp	al,3
699
	jne	@f
700
	jne	@f
700
	mov	[N_error],memory_free_error_type
701
	mov	[N_error],memory_free_error_type
701
	xor	eax,eax
702
	xor	eax,eax
702
	mov	[error_path],eax
703
	mov	[error_path],eax
703
	mov	[error_type],eax
704
	mov	[error_type],eax
704
	jmp	.red
705
	jmp	.red
705
@@:
706
@@:
706
	cmp	al,4
707
	cmp	al,4
707
	jne	@f
708
	jne	@f
708
	mov	[N_error],memory_get_error_type
709
	mov	[N_error],memory_get_error_type
709
	xor	eax,eax
710
	xor	eax,eax
710
	mov	[error_path],eax
711
	mov	[error_path],eax
711
	mov	[error_type],eax
712
	mov	[error_type],eax
712
	jmp	.red
713
	jmp	.red
713
@@:
714
@@:
714
	cmp	al,5
715
	cmp	al,5
715
	jne	@f
716
	jne	@f
716
	mov	[N_error],load_directory_error_type
717
	mov	[N_error],load_directory_error_type
717
	mov	[error_path],dir_path
718
	mov	[error_path],dir_path
718
	jmp	.error_type
719
	jmp	.error_type
719
@@:
720
@@:
720
	cmp	al,6
721
	cmp	al,6
721
	jne	.button
722
	jne	.button
722
	mov	[N_error],convert_icons_error_type
723
	mov	[N_error],convert_icons_error_type
723
	mov	[error_path],file_name
724
	mov	[error_path],file_name
724
	xor	eax,eax
725
	xor	eax,eax
725
	mov	[error_type],eax
726
	mov	[error_type],eax
726
	jmp	.red
727
	jmp	.red
727
.error_type:
728
.error_type:
728
	mov	eax,[error_type]
729
	mov	eax,[error_type]
729
	shl	eax,2
730
	shl	eax,2
730
	add	eax,error_fs_text_pointers
731
	add	eax,error_fs_text_pointers
731
	mov	eax,[eax]
732
	mov	eax,[eax]
732
	mov	[error_type],eax
733
	mov	[error_type],eax
733
.red:
734
.red:
734
	call	draw_error_window
735
	call	draw_error_window
735
.still:
736
.still:
736
	mcall	10
737
	mcall	10
737
	cmp	eax,1
738
	cmp	eax,1
738
	je	.red
739
	je	.red
739
	cmp	eax,2
740
	cmp	eax,2
740
	je	.key
741
	je	.key
741
	cmp	eax,3
742
	cmp	eax,3
742
	je	.button
743
	je	.button
743
	jmp	.still
744
	jmp	.still
744
.key:
745
.key:
745
	mcall	2
746
	mcall	2
746
	jmp	.still
747
	jmp	.still
747
.button:
748
.button:
748
	mcall	-1
749
	mcall	-1
749
	jmp	.still
750
	jmp	.still
750
;---------------------------------------------------------------------
751
;---------------------------------------------------------------------
751
draw_error_window:
752
draw_error_window:
752
	mcall	12,1
753
	mcall	12,1
753
	mcall	0,[error_window_x],[error_window_y],0x03ff0000
754
	mcall	0,[error_window_x],[error_window_y],0x03ff0000
754
	call	type_title
755
	call	type_title
755
	mcall	4,<10,30>,0x90ffffff,[N_error]
756
	mcall	4,<10,30>,0x90ffffff,[N_error]
756
	mov	eax,[error_path]
757
	mov	eax,[error_path]
757
	test	eax,eax
758
	test	eax,eax
758
	jz	@f
759
	jz	@f
759
	mcall	4,<10,50>,,[error_path]
760
	mcall	4,<10,50>,,[error_path]
760
@@:
761
@@:
761
	mov	eax,[error_type]
762
	mov	eax,[error_type]
762
	test	eax,eax
763
	test	eax,eax
763
	jz	@f
764
	jz	@f
764
	mcall	4,<10,70>,,[error_type]
765
	mcall	4,<10,70>,,[error_type]
765
@@:
766
@@:
766
	mcall	12,2
767
	mcall	12,2
767
	ret
768
	ret
768
;---------------------------------------------------------------------
769
;---------------------------------------------------------------------
769
start_error_window_thread:
770
start_error_window_thread:
770
	mcall	9,procinfo,-1
771
	mcall	9,procinfo,-1
771
	mov	eax,[ebx+46]
772
	mov	eax,[ebx+46]
772
	shr	eax,1
773
	shr	eax,1
773
	add	eax,[ebx+38]
774
	add	eax,[ebx+38]
774
	sub	eax,40
775
	sub	eax,40
775
	mov	[error_window_y+2],ax
776
	mov	[error_window_y+2],ax
776
	mov	eax,[ebx+42]
777
	mov	eax,[ebx+42]
777
	shr	eax,1
778
	shr	eax,1
778
	add	eax,[ebx+34]
779
	add	eax,[ebx+34]
779
	sub	eax,125
780
	sub	eax,125
780
	mov	[error_window_x+2],ax
781
	mov	[error_window_x+2],ax
781
	mcall	51,1,thread_start,thread_stack
782
	mcall	51,1,thread_start,thread_stack
782
	ret
783
	ret
783
;---------------------------------------------------------------------
784
;---------------------------------------------------------------------
784
mouse:
785
mouse:
785
	mcall	18,7
786
	mcall	18,7
786
	cmp	[active_process],eax
787
	cmp	[active_process],eax
787
	jne	still
788
	jne	still
788
 
789
 
789
	mcall	37,7
790
	mcall	37,7
790
	mov	[mouse_scroll_data],eax
791
	mov	[mouse_scroll_data],eax
791
 
792
 
792
	mcall	37,1
793
	mcall	37,1
793
	mov	[mouse_position],eax
794
	mov	[mouse_position],eax
794
 
795
 
795
	cmp	[scroll_bar_data_vertical.delta2],0
796
	cmp	[scroll_bar_data_vertical.delta2],0
796
	jne	.scrollbar
797
	jne	.scrollbar
797
 
798
 
798
	mov	[file_browser_data_1.select_flag],0
799
	mov	[file_browser_data_1.select_flag],0
799
 
800
 
800
	push	dword file_browser_data_1
801
	push	dword file_browser_data_1
801
	call	[FileBrowser_mouse]
802
	call	[FileBrowser_mouse]
802
 
803
 
803
	call	draw_open_button_label
804
	call	draw_open_button_label
804
 
805
 
805
	mov	eax,file_browser_data_1.mouse_keys_delta
806
	mov	eax,file_browser_data_1.mouse_keys_delta
806
	cmp	[eax],dword 3
807
	cmp	[eax],dword 3
807
	jne	.check_focus	; scrollbar
808
	jne	.check_focus	; scrollbar
808
	mov	[eax],dword 0
809
	mov	[eax],dword 0
809
	call	load_next_dir
810
	call	load_next_dir
810
	jmp	still
811
	jmp	still
811
;---------------------------------------------------
812
;---------------------------------------------------
812
.check_focus:
813
.check_focus:
813
	mov	ebx,[file_browser_data_1.select_flag]
814
	mov	ebx,[file_browser_data_1.select_flag]
814
	test	ebx,ebx
815
	test	ebx,ebx
815
	jz	.scrollbar	;@f
816
	jz	.scrollbar	;@f
816
	mov	al,[focus_pointer]
817
	mov	al,[focus_pointer]
817
	test	al,al
818
	test	al,al
818
	jz	.scrollbar
819
	jz	.scrollbar
819
	xor	eax,eax
820
	xor	eax,eax
820
	mov	[focus_pointer],al
821
	mov	[focus_pointer],al
821
	jmp	change_focus_area.1
822
	jmp	change_focus_area.1
822
;---------------------------------------------------
823
;---------------------------------------------------
823
.scrollbar:
824
.scrollbar:
824
	mov	eax,[scroll_bar_data_vertical.max_area]
825
	mov	eax,[scroll_bar_data_vertical.max_area]
825
	cmp	eax,[scroll_bar_data_vertical.cur_area]
826
	cmp	eax,[scroll_bar_data_vertical.cur_area]
826
	jbe	.menu_bar	;still
827
	jbe	.menu_bar	;still
827
	
828
	
828
	push	dword scroll_bar_data_vertical
829
	push	dword scroll_bar_data_vertical
829
	call	[scrollbar_ver_mouse]
830
	call	[scrollbar_ver_mouse]
830
	
831
	
831
	cmp	[scroll_bar_data_vertical.redraw],0
832
	cmp	[scroll_bar_data_vertical.redraw],0
832
	je	.menu_bar	;still
833
	je	.menu_bar	;still
833
	mov	[scroll_bar_data_vertical.redraw],0
834
	mov	[scroll_bar_data_vertical.redraw],0
834
.draw:
835
.draw:
835
	call	draw_draw_file_browser2
836
	call	draw_draw_file_browser2
836
	jmp	still
837
	jmp	still
837
 
838
 
838
;---------------------------------------------------
839
;---------------------------------------------------
839
.menu_bar:
840
.menu_bar:
840
	cmp	[scroll_bar_data_vertical.delta2],0
841
	cmp	[scroll_bar_data_vertical.delta2],0
841
	jne	still
842
	jne	still
842
 
843
 
843
.menu_bar_1:
844
.menu_bar_1:
844
	call	.set_mouse_flag
845
	call	.set_mouse_flag
845
@@:
846
@@:
846
	push	dword menu_data_1
847
	push	dword menu_data_1
847
	call	[menu_bar_mouse]
848
	call	[menu_bar_mouse]
848
 
849
 
849
	cmp	[menu_data_1.click],dword 1
850
	cmp	[menu_data_1.click],dword 1
850
	jne	.menu_bar_2
851
	jne	.menu_bar_2
851
 
852
 
852
	cmp	[menu_data_1.cursor_out],dword 0
853
	cmp	[menu_data_1.cursor_out],dword 0
853
	jne	select_disk.1	;analyse_out_menu_1
854
	jne	select_disk.1	;analyse_out_menu_1
854
	jmp	.menu_bar_1
855
	jmp	.menu_bar_1
855
;--------------------------------------------
856
;--------------------------------------------
856
.menu_bar_2:
857
.menu_bar_2:
857
	push	dword menu_data_2
858
	push	dword menu_data_2
858
	call	[menu_bar_mouse]
859
	call	[menu_bar_mouse]
859
 
860
 
860
	cmp	[menu_data_2.click],dword 1
861
	cmp	[menu_data_2.click],dword 1
861
	jne	.menu_bar_3
862
	jne	.menu_bar_3
862
 
863
 
863
	cmp	[menu_data_2.cursor_out],dword 0
864
	cmp	[menu_data_2.cursor_out],dword 0
864
	jne	analyse_out_menu_2
865
	jne	analyse_out_menu_2
865
	jmp	.menu_bar_1
866
	jmp	.menu_bar_1
866
;---------------------------------------------------
867
;---------------------------------------------------
867
.menu_bar_3:
868
.menu_bar_3:
868
	push	dword menu_data_3
869
	push	dword menu_data_3
869
	call	[menu_bar_mouse]
870
	call	[menu_bar_mouse]
870
 
871
 
871
	cmp	[menu_data_3.click],dword 1
872
	cmp	[menu_data_3.click],dword 1
872
	jne	.check_editboxes
873
	jne	.check_editboxes
873
 
874
 
874
	cmp	[menu_data_3.cursor_out],dword 0
875
	cmp	[menu_data_3.cursor_out],dword 0
875
	jne	analyse_out_menu_3
876
	jne	analyse_out_menu_3
876
	jmp	.menu_bar_1
877
	jmp	.menu_bar_1
877
;---------------------------------------------------
878
;---------------------------------------------------
878
.check_editboxes:
879
.check_editboxes:
879
	cmp	[open_dialog_type],1
880
	cmp	[open_dialog_type],1
880
	jne	.check_scroll_event
881
	jne	.check_scroll_event
881
	mov	eax,[edit1+44]
882
	mov	eax,[edit1+44]
882
	and	eax,10b
883
	and	eax,10b
883
	push	dword name_editboxes
884
	push	dword name_editboxes
884
	call	[edit_box_mouse]
885
	call	[edit_box_mouse]
885
	mov	ebx,[edit1+44]
886
	mov	ebx,[edit1+44]
886
	and	ebx,10b
887
	and	ebx,10b
887
	cmp	eax,ebx
888
	cmp	eax,ebx
888
	je	.check_scroll_event
889
	je	.check_scroll_event
889
	mov	al,[focus_pointer]
890
	mov	al,[focus_pointer]
890
	test	al,al
891
	test	al,al
891
	jnz	.check_scroll_event
892
	jnz	.check_scroll_event
892
	xor	eax,eax
893
	xor	eax,eax
893
	test	ebx,10b
894
	test	ebx,10b
894
	jz	@f
895
	jz	@f
895
	inc	eax
896
	inc	eax
896
@@:
897
@@:
897
	mov	[focus_pointer],al
898
	mov	[focus_pointer],al
898
	jmp	change_focus_area.1
899
	jmp	change_focus_area.1
899
;---------------------------------------------------
900
;---------------------------------------------------
900
.check_scroll_event:
901
.check_scroll_event:
901
	mov	eax,[mouse_position]
902
	mov	eax,[mouse_position]
902
	xor	ebx,ebx
903
	xor	ebx,ebx
903
	mov	bx,ax	; EBX mouse y
904
	mov	bx,ax	; EBX mouse y
904
	shr	eax,16	; EAX mouse x
905
	shr	eax,16	; EAX mouse x
905
	
906
	
906
	mov	cx,[file_browser_data_1.start_x]
907
	mov	cx,[file_browser_data_1.start_x]
907
	mov	dx,[file_browser_data_1.start_y]
908
	mov	dx,[file_browser_data_1.start_y]
908
 
909
 
909
	cmp	ax,cx
910
	cmp	ax,cx
910
	jb	.mouse_next	; min x
911
	jb	.mouse_next	; min x
911
 
912
 
912
	cmp	bx,dx
913
	cmp	bx,dx
913
	jb	.mouse_next	; min y
914
	jb	.mouse_next	; min y
914
 
915
 
915
	add	cx,[file_browser_data_1.size_x]
916
	add	cx,[file_browser_data_1.size_x]
916
	cmp	ax,cx	
917
	cmp	ax,cx	
917
	ja	.mouse_next	; max x
918
	ja	.mouse_next	; max x
918
 
919
 
919
	add	dx,[file_browser_data_1.size_y]
920
	add	dx,[file_browser_data_1.size_y]
920
	cmp	bx,dx
921
	cmp	bx,dx
921
	ja	.mouse_next	; max y
922
	ja	.mouse_next	; max y
922
 
923
 
923
	xor	ecx,ecx
924
	xor	ecx,ecx
924
	xor	ebx,ebx
925
	xor	ebx,ebx
925
	mov	eax,[mouse_scroll_data]
926
	mov	eax,[mouse_scroll_data]
926
	test	eax,eax
927
	test	eax,eax
927
	jz	.mouse_next
928
	jz	.mouse_next
928
	test	ax,0x8000
929
	test	ax,0x8000
929
	jnz	.decr
930
	jnz	.decr
930
	shr	eax,16
931
	shr	eax,16
931
	test	ax,0x8000
932
	test	ax,0x8000
932
	jnz	.decr_1
933
	jnz	.decr_1
933
 
934
 
934
	mov	cx,[mouse_scroll_data.vertical]
935
	mov	cx,[mouse_scroll_data.vertical]
935
	test	ecx,ecx
936
	test	ecx,ecx
936
	jnz	@f
937
	jnz	@f
937
	mov	cx,[mouse_scroll_data.horizontal]
938
	mov	cx,[mouse_scroll_data.horizontal]
938
	test	ecx,ecx
939
	test	ecx,ecx
939
	jz	.mouse_next
940
	jz	.mouse_next
940
@@:
941
@@:
941
	mov	ebx,1
942
	mov	ebx,1
942
@@:
943
@@:
943
	push	ebx ecx
944
	push	ebx ecx
944
	call	key.key_action
945
	call	key.key_action
945
	pop	ecx ebx
946
	pop	ecx ebx
946
	dec	ecx
947
	dec	ecx
947
	jnz	@r
948
	jnz	@r
948
	jmp	still
949
	jmp	still
949
;----------------------------------------
950
;----------------------------------------
950
.decr:
951
.decr:
951
	mov	bx,[mouse_scroll_data.vertical]
952
	mov	bx,[mouse_scroll_data.vertical]
952
	jmp	@f
953
	jmp	@f
953
.decr_1:
954
.decr_1:
954
	mov	bx,[mouse_scroll_data.horizontal]
955
	mov	bx,[mouse_scroll_data.horizontal]
955
@@:
956
@@:
956
	mov	ecx,0xffff
957
	mov	ecx,0xffff
957
	sub	ecx,ebx
958
	sub	ecx,ebx
958
	inc	ecx
959
	inc	ecx
959
	mov	ebx,2
960
	mov	ebx,2
960
@@:
961
@@:
961
	push	ebx ecx
962
	push	ebx ecx
962
	call	key.key_action
963
	call	key.key_action
963
	pop	ecx ebx
964
	pop	ecx ebx
964
	dec	ecx
965
	dec	ecx
965
	jnz	@r
966
	jnz	@r
966
	jmp	still
967
	jmp	still
967
;---------------------------------------------------
968
;---------------------------------------------------
968
.mouse_next:
969
.mouse_next:
969
	jmp	still
970
	jmp	still
970
;---------------------------------------------------------------------
971
;---------------------------------------------------------------------
971
.set_mouse_flag:
972
.set_mouse_flag:
972
	xor	eax,eax
973
	xor	eax,eax
973
	inc	eax
974
	inc	eax
974
	mov	[menu_data_1.get_mouse_flag],eax
975
	mov	[menu_data_1.get_mouse_flag],eax
975
	mov	[menu_data_2.get_mouse_flag],eax
976
	mov	[menu_data_2.get_mouse_flag],eax
976
	ret
977
	ret
977
;---------------------------------------------------------------------
978
;---------------------------------------------------------------------
978
analyse_out_menu_1:
979
analyse_out_menu_1:
979
; Available disks
980
; Available disks
980
	mov	eax,[menu_data_1.cursor_out]
981
	mov	eax,[menu_data_1.cursor_out]
981
	dec	eax
982
	dec	eax
982
	imul	esi,eax,10
983
	imul	esi,eax,10
983
	add	esi,retrieved_devices_table
984
	add	esi,retrieved_devices_table
984
	mov	edi,dir_path
985
	mov	edi,dir_path
985
	call	copy_dir_name
986
	call	copy_dir_name
986
	call	load_next_dir.1
987
	call	load_next_dir.1
987
	jmp	still
988
	jmp	still
988
;---------------------------------------------------------------------
989
;---------------------------------------------------------------------
989
analyse_out_menu_2:
990
analyse_out_menu_2:
990
; Sort
991
; Sort
991
	mov	eax,[menu_data_2.cursor_out]
992
	mov	eax,[menu_data_2.cursor_out]
992
	xor	ebx,ebx
993
	xor	ebx,ebx
993
	cmp	eax,dword 1
994
	cmp	eax,dword 1
994
	je	.1
995
	je	.1
995
	cmp	eax,dword 2
996
	cmp	eax,dword 2
996
	je	.2
997
	je	.2
997
	cmp	eax,dword 3
998
	cmp	eax,dword 3
998
	je	.3
999
	je	.3
999
	cmp	eax,dword 4
1000
	cmp	eax,dword 4
1000
	je	.4
1001
	je	.4
1001
	jmp	still
1002
	jmp	still
1002
.4:
1003
.4:
1003
	add	ebx,2
1004
	add	ebx,2
1004
.3:
1005
.3:
1005
	add	ebx,2
1006
	add	ebx,2
1006
.2:
1007
.2:
1007
	add	ebx,2
1008
	add	ebx,2
1008
.1:
1009
.1:
1009
	mov	[sort_type],ebx
1010
	mov	[sort_type],ebx
1010
	call	sort_directory
1011
	call	sort_directory
1011
	call	draw_draw_file_browser1
1012
	call	draw_draw_file_browser1
1012
	jmp	still
1013
	jmp	still
1013
;---------------------------------------------------------------------
1014
;---------------------------------------------------------------------
1014
analyse_out_menu_3:
1015
analyse_out_menu_3:
1015
; Filter
1016
; Filter
1016
	mov	eax,[menu_data_3.cursor_out]
1017
	mov	eax,[menu_data_3.cursor_out]
1017
	cmp	eax,dword 1
1018
	cmp	eax,dword 1
1018
	jne	@f
1019
	jne	@f
1019
	mov	[filter_flag],0
1020
	mov	[filter_flag],0
1020
	call	load_next_dir.1
1021
	call	load_next_dir.1
1021
	jmp	still
1022
	jmp	still
1022
@@:
1023
@@:
1023
	cmp	eax,dword 2
1024
	cmp	eax,dword 2
1024
	jne	still
1025
	jne	still
1025
	mov	[filter_flag],1
1026
	mov	[filter_flag],1
1026
	call	load_next_dir.1
1027
	call	load_next_dir.1
1027
	jmp	still	
1028
	jmp	still	
1028
;---------------------------------------------------------------------
1029
;---------------------------------------------------------------------
1029
get_communication_area:
1030
get_communication_area:
1030
	xor	eax,eax
1031
	xor	eax,eax
1031
	mov	al,[param]
1032
	mov	al,[param]
1032
	test	eax,eax
1033
	test	eax,eax
1033
	jz	.exit
1034
	jz	.exit
1034
	mcall	68,22,param,,0x01
1035
	mcall	68,22,param,,0x01
1035
	mov	[communication_area],eax
1036
	mov	[communication_area],eax
1036
	movzx	ebx,word [eax+2]
1037
	movzx	ebx,word [eax+2]
1037
	mov	[open_dialog_type],ebx
1038
	mov	[open_dialog_type],ebx
1038
	cmp	ebx,1
1039
	cmp	ebx,1
1039
	jne	@f
1040
	jne	@f
1040
	pushad
1041
	pushad
1041
	mov	[focus_pointer],bl
1042
	mov	[focus_pointer],bl
1042
	mov	edi,edit1
1043
	mov	edi,edit1
1043
	mov	[file_browser_data_1.select_panel_counter],0
1044
	mov	[file_browser_data_1.select_panel_counter],0
1044
	or	[edi+44],dword ed_focus
1045
	or	[edi+44],dword ed_focus
1045
	mov	[edi+12],dword 0xffffb0 ; color yellow
1046
	mov	[edi+12],dword 0xffffb0 ; color yellow
1046
	mcall	66,1,0
1047
	mcall	66,1,0
1047
	popad
1048
	popad
1048
@@:
1049
@@:
1049
	mov	ebx,[eax+4]
1050
	mov	ebx,[eax+4]
1050
	cmp	bx,word x_minimal_size ;300
1051
	cmp	bx,word x_minimal_size ;300
1051
	jb	@f
1052
	jb	@f
1052
	mov	[window_x],ebx
1053
	mov	[window_x],ebx
1053
	mov	ebx,[eax+8]
1054
	mov	ebx,[eax+8]
1054
	cmp	bx,word y_minimal_size ;200
1055
	cmp	bx,word y_minimal_size ;200
1055
	jb	@f
1056
	jb	@f
1056
	mov	[window_y],ebx
1057
	mov	[window_y],ebx
1057
.exit:
1058
.exit:
1058
	ret
1059
	ret
1059
;---------------------------------------------------------------------
1060
;---------------------------------------------------------------------
1060
load_start_directory:
1061
load_start_directory:
1061
	mov	eax,[communication_area]	
1062
	mov	eax,[communication_area]	
1062
	test	eax,eax
1063
	test	eax,eax
1063
	jz	.1
1064
	jz	.1
1064
	movzx	ebx,word [eax]
1065
	movzx	ebx,word [eax]
1065
	test	eax,eax
1066
	test	eax,eax
1066
	jz	.1
1067
	jz	.1
1067
	add	eax,16	;12 ;4
1068
	add	eax,16	;12 ;4
1068
	mov	esi,eax
1069
	mov	esi,eax
1069
	push	esi
1070
	push	esi
1070
	mov	esi,[communication_area]
1071
	mov	esi,[communication_area]
1071
	add	esi,3840 ;4096-256
1072
	add	esi,3840 ;4096-256
1072
	mov	eax,[esi]
1073
	mov	eax,[esi]
1073
	test	al,al
1074
	test	al,al
1074
	jnz	@f
1075
	jnz	@f
1075
	mov	esi,example_name_temp
1076
	mov	esi,example_name_temp
1076
@@:
1077
@@:
1077
	mov	edi,user_selected_name
1078
	mov	edi,user_selected_name
1078
	call	copy_dir_name
1079
	call	copy_dir_name
1079
	pop	esi
1080
	pop	esi
1080
	jmp	.2
1081
	jmp	.2
1081
.1:
1082
.1:
1082
	mov	esi,start_pach
1083
	mov	esi,start_pach
1083
.2:
1084
.2:
1084
	mov	edi,dir_path
1085
	mov	edi,dir_path
1085
	call	copy_dir_name
1086
	call	copy_dir_name
1086
	
1087
	
1087
;	call	load_directory
1088
;	call	load_directory
1088
;	mov	eax,[N_error]
1089
;	mov	eax,[N_error]
1089
;	test	eax,eax
1090
;	test	eax,eax
1090
;	jnz	button.exit
1091
;	jnz	button.exit
1091
.3:
1092
.3:
1092
	call	load_directory
1093
	call	load_directory
1093
	mov	eax,[N_error]
1094
	mov	eax,[N_error]
1094
	test	eax,eax
1095
	test	eax,eax
1095
	jz	@f
1096
	jz	@f
1096
	call	error_handler
1097
	call	error_handler
1097
	jmp	.3
1098
	jmp	.3
1098
@@:
1099
@@:
1099
	ret
1100
	ret
1100
;---------------------------------------------------------------------
1101
;---------------------------------------------------------------------
1101
load_next_dir:
1102
load_next_dir:
1102
	mov	ebx,[file_browser_data_1.folder_block]
1103
	mov	ebx,[file_browser_data_1.folder_block]
1103
	test	ebx,ebx
1104
	test	ebx,ebx
1104
	jz	.exit
1105
	jz	.exit
1105
 
1106
 
1106
	mov	ebx,[file_browser_data_1.selected_BDVK_adress]
1107
	mov	ebx,[file_browser_data_1.selected_BDVK_adress]
1107
	add	ebx,40
1108
	add	ebx,40
1108
	test	[ebx-40],byte 0x10
1109
	test	[ebx-40],byte 0x10
1109
	jz	file_no_folder
1110
	jz	file_no_folder
1110
	cmp	[ebx],word '..'
1111
	cmp	[ebx],word '..'
1111
	jne	@f
1112
	jne	@f
1112
	cmp	[ebx+2],byte 0
1113
	cmp	[ebx+2],byte 0
1113
	je	.exit_dir
1114
	je	.exit_dir
1114
@@:
1115
@@:
1115
	mov	esi,dir_path
1116
	mov	esi,dir_path
1116
	call	copy_dir_path
1117
	call	copy_dir_path
1117
 
1118
 
1118
@@:
1119
@@:
1119
.1:
1120
.1:
1120
	call	load_directory
1121
	call	load_directory
1121
	mov	eax,[N_error]
1122
	mov	eax,[N_error]
1122
	test	eax,eax
1123
	test	eax,eax
1123
	jz	@f
1124
	jz	@f
1124
	call	error_handler
1125
	call	error_handler
1125
	jmp	.1
1126
	jmp	.1
1126
@@:
1127
@@:
1127
	call	sort_directory
1128
	call	sort_directory
1128
 
1129
 
1129
	mov	ebx,[scroll_bar_data_vertical.x]
1130
	mov	ebx,[scroll_bar_data_vertical.x]
1130
	inc	ebx
1131
	inc	ebx
1131
	mov	ecx,[scroll_bar_data_vertical.y]
1132
	mov	ecx,[scroll_bar_data_vertical.y]
1132
	inc	ecx
1133
	inc	ecx
1133
	mcall	13,,,0xcccccc
1134
	mcall	13,,,0xcccccc
1134
	mov	edi,edit1
1135
	mov	edi,edit1
1135
	xor	eax,eax
1136
	xor	eax,eax
1136
	mov	[edi+44],eax
1137
	mov	[edi+44],eax
1137
	mov	[edi+12],dword 0xffffff ; color white
1138
	mov	[edi+12],dword 0xffffff ; color white
1138
	call	draw_draw_file_browser1
1139
	call	draw_draw_file_browser1
1139
.exit:
1140
.exit:
1140
	ret
1141
	ret
1141
.exit_dir:
1142
.exit_dir:
1142
	mov	esi,dir_path
1143
	mov	esi,dir_path
1143
	call	copy_exit_dir
1144
	call	copy_exit_dir
1144
	jmp	.1
1145
	jmp	.1
1145
;---------------------------------------------------------------------
1146
;---------------------------------------------------------------------
1146
error_handler:
1147
error_handler:
1147
	mcall	66,2
1148
	mcall	66,2
1148
	mov	[error_handler_store_input_mode],eax
1149
	mov	[error_handler_store_input_mode],eax
1149
	mcall	66,1,1
1150
	mcall	66,1,1
1150
.red:
1151
.red:
1151
	call	.draw_window
1152
	call	.draw_window
1152
;------------------------------------
1153
;------------------------------------
1153
.still:
1154
.still:
1154
	mcall	10
1155
	mcall	10
1155
	cmp	eax,1
1156
	cmp	eax,1
1156
	je	.red
1157
	je	.red
1157
	cmp	eax,2
1158
	cmp	eax,2
1158
	je	.key
1159
	je	.key
1159
	cmp	eax,3
1160
	cmp	eax,3
1160
	je	.button
1161
	je	.button
1161
	jmp	.still
1162
	jmp	.still
1162
;------------------------------------
1163
;------------------------------------
1163
.draw_window:
1164
.draw_window:
1164
	xor	eax,eax
1165
	xor	eax,eax
1165
	inc	eax
1166
	inc	eax
1166
	mov	[error_window],al
1167
	mov	[error_window],al
1167
	call	control_minimal_window_size
1168
	call	control_minimal_window_size
1168
	call	draw_window
1169
	call	draw_window
1169
	xor	eax,eax
1170
	xor	eax,eax
1170
	mov	[error_window],al
1171
	mov	[error_window],al
1171
	ret
1172
	ret
1172
;------------------------------------
1173
;------------------------------------
1173
.key:
1174
.key:
1174
	mcall	2
1175
	mcall	2
1175
	xor	ebx,ebx
1176
	xor	ebx,ebx
1176
	cmp	[extended_key],1
1177
	cmp	[extended_key],1
1177
	je	.extended_key
1178
	je	.extended_key
1178
	test	al,al
1179
	test	al,al
1179
	jnz	.still
1180
	jnz	.still
1180
	cmp	ah,0xE0
1181
	cmp	ah,0xE0
1181
	jne	@f
1182
	jne	@f
1182
	mov	[extended_key],1
1183
	mov	[extended_key],1
1183
	jmp	.still
1184
	jmp	.still
1184
@@:
1185
@@:
1185
	cmp	ah,129	; Esc
1186
	cmp	ah,129	; Esc
1186
	je	.exit
1187
	je	.exit
1187
	jmp	.still
1188
	jmp	.still
1188
.extended_key:
1189
.extended_key:
1189
	jmp	.still
1190
	jmp	.still
1190
;------------------------------------
1191
;------------------------------------
1191
.button:
1192
.button:
1192
	mcall	17
1193
	mcall	17
1193
	cmp	ah,5
1194
	cmp	ah,5
1194
	je	.exit
1195
	je	.exit
1195
	cmp	ah,1
1196
	cmp	ah,1
1196
	jne	.still
1197
	jne	.still
1197
	xor	eax,eax
1198
	xor	eax,eax
1198
	mov	[N_error],eax
1199
	mov	[N_error],eax
1199
	jmp	button.exit
1200
	jmp	button.exit
1200
;------------------------------------
1201
;------------------------------------
1201
.exit:
1202
.exit:
1202
	cmp	[open_dialog_type],1
1203
	cmp	[open_dialog_type],1
1203
	jne	@f
1204
	jne	@f
1204
 
1205
 
1205
	mov	esi,root_pach
1206
	mov	esi,root_pach
1206
	mov	edi,dir_path
1207
	mov	edi,dir_path
1207
	call	copy_dir_name.1
1208
	call	copy_dir_name.1
1208
	mov	esi,root_pach
1209
	mov	esi,root_pach
1209
	mov	edi,previous_dir_path
1210
	mov	edi,previous_dir_path
1210
	call	copy_dir_name.1
1211
	call	copy_dir_name.1
1211
	jmp	.restore_input_mode
1212
	jmp	.restore_input_mode
1212
@@:
1213
@@:
1213
	mov	esi,previous_dir_path
1214
	mov	esi,previous_dir_path
1214
	mov	edi,dir_path
1215
	mov	edi,dir_path
1215
	call	copy_dir_name.1
1216
	call	copy_dir_name.1
1216
	mov	esi,start_pach
1217
	mov	esi,start_pach
1217
	mov	edi,previous_dir_path
1218
	mov	edi,previous_dir_path
1218
	call	copy_dir_name.1
1219
	call	copy_dir_name.1
1219
.restore_input_mode:
1220
.restore_input_mode:
1220
	mcall	66,1,[error_handler_store_input_mode]
1221
	mcall	66,1,[error_handler_store_input_mode]
1221
	ret
1222
	ret
1222
;---------------------------------------------------------------------
1223
;---------------------------------------------------------------------
1223
file_no_folder:
1224
file_no_folder:
1224
	mov	esi,dir_path
1225
	mov	esi,dir_path
1225
	mov	edi,file_name
1226
	mov	edi,file_name
1226
	call	copy_dir_name
1227
	call	copy_dir_name
1227
	push	ebx
1228
	push	ebx
1228
	mov	al,[focus_pointer]
1229
	mov	al,[focus_pointer]
1229
	test	al,al
1230
	test	al,al
1230
	je	@f
1231
	je	@f
1231
	mov	ebx,user_selected_name
1232
	mov	ebx,user_selected_name
1232
	xor	eax,eax
1233
	xor	eax,eax
1233
	cmp	[ebx],al
1234
	cmp	[ebx],al
1234
	je	.exit
1235
	je	.exit
1235
@@:
1236
@@:
1236
	cmp	[open_dialog_type],2
1237
	cmp	[open_dialog_type],2
1237
	je	@f
1238
	je	@f
1238
	mov	esi,file_name
1239
	mov	esi,file_name
1239
	call	copy_dir_path
1240
	call	copy_dir_path
1240
@@:
1241
@@:
1241
	mov	eax,[communication_area]
1242
	mov	eax,[communication_area]
1242
	test	eax,eax
1243
	test	eax,eax
1243
	jnz	@f
1244
	jnz	@f
1244
	call	control_minimal_window_size
1245
	call	control_minimal_window_size
1245
	call	draw_window
1246
	call	draw_window
1246
	pop	ebx
1247
	pop	ebx
1247
	ret
1248
	ret
1248
@@:
1249
@@:
1249
	mov	edi,eax
1250
	mov	edi,eax
1250
	add	edi,16	;12
1251
	add	edi,16	;12
1251
	mov	esi,file_name	
1252
	mov	esi,file_name	
1252
	call	copy_dir_name
1253
	call	copy_dir_name
1253
	
1254
	
1254
	pop	esi
1255
	pop	esi
1255
	mov	al,[focus_pointer]
1256
	mov	al,[focus_pointer]
1256
	test	al,al
1257
	test	al,al
1257
	jz	@f
1258
	jz	@f
1258
	mov	esi,user_selected_name
1259
	mov	esi,user_selected_name
1259
@@:
1260
@@:
1260
	xor	eax,eax
1261
	xor	eax,eax
1261
	cmp	[esi],al
1262
	cmp	[esi],al
1262
	je	.exit
1263
	je	.exit
1263
	mov	edi,[communication_area]
1264
	mov	edi,[communication_area]
1264
	add	edi,3840 ;4096-256
1265
	add	edi,3840 ;4096-256
1265
	call	copy_dir_name
1266
	call	copy_dir_name
1266
.exit:
1267
.exit:
1267
	mov	eax,[communication_area]
1268
	mov	eax,[communication_area]
1268
	mov	[eax],word 1
1269
	mov	[eax],word 1
1269
	jmp	button.exit
1270
	jmp	button.exit
1270
;---------------------------------------------------------------------
1271
;---------------------------------------------------------------------
1271
load_root_directory:
1272
load_root_directory:
1272
	mov	[dirinfo.name],dword dir_path_temp
1273
	mov	[dirinfo.name],dword dir_path_temp
1273
	mov	eax,[dirinfo.return]
1274
	mov	eax,[dirinfo.return]
1274
	push	eax
1275
	push	eax
1275
	mov	eax,[file_browser_data_1.folder_data]
1276
	mov	eax,[file_browser_data_1.folder_data]
1276
	push	eax
1277
	push	eax
1277
	xor	eax,eax
1278
	xor	eax,eax
1278
	mov	[dirinfo.return],eax
1279
	mov	[dirinfo.return],eax
1279
	mov	[file_browser_data_1.folder_data],eax
1280
	mov	[file_browser_data_1.folder_data],eax
1280
	mov	esi,root_pach
1281
	mov	esi,root_pach
1281
	mov	edi,dir_path_temp
1282
	mov	edi,dir_path_temp
1282
	call	copy_dir_name
1283
	call	copy_dir_name
1283
	call	load_directory
1284
	call	load_directory
1284
	mov	eax,[N_error]
1285
	mov	eax,[N_error]
1285
	test	eax,eax
1286
	test	eax,eax
1286
	jnz	button.exit
1287
	jnz	button.exit
1287
 
1288
 
1288
	mov	eax,[dirinfo.return]
1289
	mov	eax,[dirinfo.return]
1289
	mov	[root_folder_area],eax
1290
	mov	[root_folder_area],eax
1290
	mov	eax,[eax+4]
1291
	mov	eax,[eax+4]
1291
	mov	[root_folder_block],eax
1292
	mov	[root_folder_block],eax
1292
 
1293
 
1293
	xor	eax,eax
1294
	xor	eax,eax
1294
	mov	[dirinfo.return],eax
1295
	mov	[dirinfo.return],eax
1295
	mov	[file_browser_data_1.folder_data],eax
1296
	mov	[file_browser_data_1.folder_data],eax
1296
	mov	[temp_counter_1],eax	;0
1297
	mov	[temp_counter_1],eax	;0
1297
 
1298
 
1298
	mov	[retrieved_devices_table_counter],eax	;0
1299
	mov	[retrieved_devices_table_counter],eax	;0
1299
.start_temp_counter_1:
1300
.start_temp_counter_1:
1300
	imul	esi,[temp_counter_1],304
1301
	imul	esi,[temp_counter_1],304
1301
	add	esi,[root_folder_area]
1302
	add	esi,[root_folder_area]
1302
	add	esi,32+40
1303
	add	esi,32+40
1303
	mov	edi,dir_path_temp+1
1304
	mov	edi,dir_path_temp+1
1304
	mov	[edi-1],byte '/'
1305
	mov	[edi-1],byte '/'
1305
	call	copy_dir_name
1306
	call	copy_dir_name
1306
	call	load_directory
1307
	call	load_directory
1307
	mov	eax,[N_error]
1308
	mov	eax,[N_error]
1308
	test	eax,eax
1309
	test	eax,eax
1309
	jnz	button.exit
1310
	jnz	button.exit
1310
 
1311
 
1311
	mov	eax,[dirinfo.return]
1312
	mov	eax,[dirinfo.return]
1312
	mov	[root1_folder_area],eax
1313
	mov	[root1_folder_area],eax
1313
	mov	eax,[eax+4]
1314
	mov	eax,[eax+4]
1314
	test	eax,eax
1315
	test	eax,eax
1315
	jz	.continue
1316
	jz	.continue
1316
	mov	[root1_folder_block],eax
1317
	mov	[root1_folder_block],eax
1317
	
1318
	
1318
	mov	ebp,0
1319
	mov	ebp,0
1319
.start_copy_device_patch:
1320
.start_copy_device_patch:
1320
	imul	edi,[retrieved_devices_table_counter],10
1321
	imul	edi,[retrieved_devices_table_counter],10
1321
	add	edi,retrieved_devices_table
1322
	add	edi,retrieved_devices_table
1322
	mov	[edi],byte '/'
1323
	mov	[edi],byte '/'
1323
	inc	edi
1324
	inc	edi
1324
	imul	esi,[temp_counter_1],304
1325
	imul	esi,[temp_counter_1],304
1325
	add	esi,[root_folder_area]
1326
	add	esi,[root_folder_area]
1326
	add	esi,32+40
1327
	add	esi,32+40
1327
 
1328
 
1328
	call	copy_dir_name
1329
	call	copy_dir_name
1329
 
1330
 
1330
	imul	esi,ebp,304
1331
	imul	esi,ebp,304
1331
	add	esi,[root1_folder_area]
1332
	add	esi,[root1_folder_area]
1332
	add	esi,32+40
1333
	add	esi,32+40
1333
	mov	[edi-1],byte '/'
1334
	mov	[edi-1],byte '/'
1334
 
1335
 
1335
	call	copy_dir_name
1336
	call	copy_dir_name
1336
 
1337
 
1337
	inc	[retrieved_devices_table_counter]
1338
	inc	[retrieved_devices_table_counter]
1338
	inc	ebp
1339
	inc	ebp
1339
	cmp	ebp,[root1_folder_block]
1340
	cmp	ebp,[root1_folder_block]
1340
	jb	.start_copy_device_patch
1341
	jb	.start_copy_device_patch
1341
.continue:
1342
.continue:
1342
	inc	[temp_counter_1]
1343
	inc	[temp_counter_1]
1343
	mov	eax,[temp_counter_1]
1344
	mov	eax,[temp_counter_1]
1344
	cmp	eax,[root_folder_block]
1345
	cmp	eax,[root_folder_block]
1345
	jb	.start_temp_counter_1
1346
	jb	.start_temp_counter_1
1346
 
1347
 
1347
	cmp	[root_folder_area],dword 0
1348
	cmp	[root_folder_area],dword 0
1348
	je	@f
1349
	je	@f
1349
	mcall	68,13,[root_folder_area]
1350
	mcall	68,13,[root_folder_area]
1350
	test	eax,eax
1351
	test	eax,eax
1351
	jz	memory_free_error
1352
	jz	memory_free_error
1352
@@:
1353
@@:
1353
 
1354
 
1354
	xor	ecx,ecx
1355
	xor	ecx,ecx
1355
	mov	edi,menu_text_area_1_1	;.1
1356
	mov	edi,menu_text_area_1_1	;.1
1356
@@:
1357
@@:
1357
	imul	esi,ecx,10
1358
	imul	esi,ecx,10
1358
	add	esi,retrieved_devices_table
1359
	add	esi,retrieved_devices_table
1359
	call	copy_dir_name
1360
	call	copy_dir_name
1360
	inc	ecx
1361
	inc	ecx
1361
	cmp	ecx,[retrieved_devices_table_counter]
1362
	cmp	ecx,[retrieved_devices_table_counter]
1362
	jb	@b
1363
	jb	@b
1363
	mov	[menu_data_1.text_end],edi
1364
	mov	[menu_data_1.text_end],edi
1364
	xor	eax,eax
1365
	xor	eax,eax
1365
	mov	[edi],eax
1366
	mov	[edi],eax
1366
	pop	eax
1367
	pop	eax
1367
	mov	[file_browser_data_1.folder_data],eax
1368
	mov	[file_browser_data_1.folder_data],eax
1368
	pop	eax
1369
	pop	eax
1369
	mov	[dirinfo.return],eax
1370
	mov	[dirinfo.return],eax
1370
	mov	[dirinfo.name],dword dir_path
1371
	mov	[dirinfo.name],dword dir_path
1371
	ret
1372
	ret
1372
;---------------------------------------------------------------------
1373
;---------------------------------------------------------------------
1373
memory_free_error:
1374
memory_free_error:
1374
	mov	[N_error],3
1375
	mov	[N_error],3
1375
	jmp	button.exit
1376
	jmp	button.exit
1376
;---------------------------------------------------------------------
1377
;---------------------------------------------------------------------
1377
memory_get_error:
1378
memory_get_error:
1378
	mov	[N_error],4
1379
	mov	[N_error],4
1379
	jmp	button.exit
1380
	jmp	button.exit
1380
;---------------------------------------------------------------------
1381
;---------------------------------------------------------------------
1381
type_title:
1382
type_title:
1382
	mov	ecx,[open_dialog_type]
1383
	mov	ecx,[open_dialog_type]
1383
	shl	ecx,2
1384
	shl	ecx,2
1384
	add	ecx,open_dialog_title_pointer
1385
	add	ecx,open_dialog_title_pointer
1385
	mov	ecx,[ecx]
1386
	mov	ecx,[ecx]
1386
	test	ecx,ecx
1387
	test	ecx,ecx
1387
	jz	@f
1388
	jz	@f
1388
	mcall	71,1,; title ;;param ;file_name ;dir_path
1389
	mcall	71,1,; title ;;param ;file_name ;dir_path
1389
@@:
1390
@@:
1390
	ret
1391
	ret
1391
;---------------------------------------------------------------------
1392
;---------------------------------------------------------------------
1392
draw_window:
1393
draw_window:
1393
 
1394
 
1394
	mcall	12,1
1395
	mcall	12,1
1395
	call	prepare_system_colors
1396
	call	prepare_system_colors
1396
	xor	esi,esi
1397
	xor	esi,esi
1397
	mcall	0,[window_x],[window_y],0x63AABBCC
1398
	mcall	0,[window_x],[window_y],0x63AABBCC
1398
	call	type_title
1399
	call	type_title
1399
	call	get_window_param
1400
	call	get_window_param
1400
	mov	eax,[procinfo+70] ;status of window
1401
	mov	eax,[procinfo+70] ;status of window
1401
	test	eax,100b
1402
	test	eax,100b
1402
	jne	.end
1403
	jne	.end
1403
 
1404
 
1404
	mov	eax,[window_high]
1405
	mov	eax,[window_high]
1405
	sub	eax,25+45
1406
	sub	eax,25+45
1406
	mov	[file_browser_data_1.size_y],ax
1407
	mov	[file_browser_data_1.size_y],ax
1407
	mov	[scroll_bar_data_vertical.size_y],ax
1408
	mov	[scroll_bar_data_vertical.size_y],ax
1408
	mov	eax,[window_width]
1409
	mov	eax,[window_width]
1409
	sub	eax,10+20
1410
	sub	eax,10+20
1410
	mov	[file_browser_data_1.size_x],ax
1411
	mov	[file_browser_data_1.size_x],ax
1411
	add	ax,10
1412
	add	ax,10
1412
	mov	[scroll_bar_data_vertical.start_x],ax
1413
	mov	[scroll_bar_data_vertical.start_x],ax
1413
	mov	edx,[w_work]	; color of work area RRGGBB,8->color
1414
	mov	edx,[w_work]	; color of work area RRGGBB,8->color
1414
	or	edx,0x63000000
1415
	or	edx,0x63000000
1415
	mcall	13,[window_width],45	;,0xcccccc
1416
	mcall	13,[window_width],45	;,0xcccccc
1416
 
1417
 
1417
	push	ecx
1418
	push	ecx
1418
	rol	ecx,16
1419
	rol	ecx,16
1419
	add	cx,[file_browser_data_1.size_y]
1420
	add	cx,[file_browser_data_1.size_y]
1420
	add	cx,45
1421
	add	cx,45
1421
	ror	ecx,16
1422
	ror	ecx,16
1422
	mov	cx,25
1423
	mov	cx,25
1423
	mcall
1424
	mcall
1424
	pop	ecx
1425
	pop	ecx
1425
	add	ecx,45 shl 16
1426
	add	ecx,45 shl 16
1426
	mov	cx,[file_browser_data_1.size_y]
1427
	mov	cx,[file_browser_data_1.size_y]
1427
	mov	bx,10
1428
	mov	bx,10
1428
	mcall
1429
	mcall
1429
	mov	bx,[file_browser_data_1.size_x]
1430
	mov	bx,[file_browser_data_1.size_x]
1430
	add	bx,10
1431
	add	bx,10
1431
	shl	ebx,16
1432
	shl	ebx,16
1432
	mov	bx,20
1433
	mov	bx,20
1433
	mcall
1434
	mcall
1434
 
1435
 
1435
	cmp	[error_window],0
1436
	cmp	[error_window],0
1436
	je	@f
1437
	je	@f
1437
	call	draw_for_fs_errors
1438
	call	draw_for_fs_errors
1438
	jmp	.1
1439
	jmp	.1
1439
@@:
1440
@@:
1440
	mov	[do_not_draw_open_button_label],1
1441
	mov	[do_not_draw_open_button_label],1
1441
	call	draw_draw_file_browser1
1442
	call	draw_draw_file_browser1
1442
	mov	[do_not_draw_open_button_label],0
1443
	mov	[do_not_draw_open_button_label],0
1443
.1:
1444
.1:
1444
	push	dword menu_data_1
1445
	push	dword menu_data_1
1445
	call	[menu_bar_draw]
1446
	call	[menu_bar_draw]
1446
	push	dword menu_data_2
1447
	push	dword menu_data_2
1447
	call	[menu_bar_draw]
1448
	call	[menu_bar_draw]
1448
	push	dword menu_data_3
1449
	push	dword menu_data_3
1449
	call	[menu_bar_draw]
1450
	call	[menu_bar_draw]
1450
 
1451
 
1451
	mov	ebx,[file_browser_data_1.x]
1452
	mov	ebx,[file_browser_data_1.x]
1452
	mov	ax,bx
1453
	mov	ax,bx
1453
	shl	eax,16
1454
	shl	eax,16
1454
	add	ebx,eax
1455
	add	ebx,eax
1455
	mov	eax,50
1456
	mov	eax,50
1456
	mov	bx,ax
1457
	mov	bx,ax
1457
	shl	eax,16
1458
	shl	eax,16
1458
	sub	ebx,eax
1459
	sub	ebx,eax
1459
	mov	ecx,25 shl 16 + 16
1460
	mov	ecx,25 shl 16 + 16
1460
	mcall	8,,,2,[w_work_button]	;0xffffff
1461
	mcall	8,,,2,[w_work_button]	;0xffffff
1461
 
1462
 
1462
	pusha
1463
	pusha
1463
	shr	ecx,16
1464
	shr	ecx,16
1464
	mov	bx,cx
1465
	mov	bx,cx
1465
	add	ebx,21 shl 16
1466
	add	ebx,21 shl 16
1466
	mov	ecx,[w_work_button_text]
1467
	mov	ecx,[w_work_button_text]
1467
	or	ecx,0x90000000
1468
	or	ecx,0x90000000
1468
	mcall	4,,,message_ExitDir_button
1469
	mcall	4,,,message_ExitDir_button
1469
	add	ebx,4
1470
	add	ebx,4
1470
	mcall
1471
	mcall
1471
	add	ebx,4
1472
	add	ebx,4
1472
	mcall
1473
	mcall
1473
	popa
1474
	popa
1474
 
1475
 
1475
	push	ebx
1476
	push	ebx
1476
	sub	ebx,70 shl 16
1477
	sub	ebx,70 shl 16
1477
	mov	bx,60
1478
	mov	bx,60
1478
	mcall	8,,,6
1479
	mcall	8,,,6
1479
 
1480
 
1480
	shr	ecx,16
1481
	shr	ecx,16
1481
	mov	bx,cx
1482
	mov	bx,cx
1482
	add	ebx,2 shl 16
1483
	add	ebx,2 shl 16
1483
	mov	ecx,[w_work_button_text]
1484
	mov	ecx,[w_work_button_text]
1484
	or	ecx,0x90000000
1485
	or	ecx,0x90000000
1485
	mcall	4,,,message_ReloadDir_button
1486
	mcall	4,,,message_ReloadDir_button
1486
	pop	ebx
1487
	pop	ebx
1487
 
1488
 
1488
	mov	ebx,[file_browser_data_1.x]
1489
	mov	ebx,[file_browser_data_1.x]
1489
	mov	ax,bx
1490
	mov	ax,bx
1490
	shl	eax,16
1491
	shl	eax,16
1491
	add	ebx,eax
1492
	add	ebx,eax
1492
	mov	eax,55
1493
	mov	eax,55
1493
	mov	bx,ax
1494
	mov	bx,ax
1494
	shl	eax,16
1495
	shl	eax,16
1495
	sub	ebx,eax
1496
	sub	ebx,eax
1496
	mov	ecx,[file_browser_data_1.y]
1497
	mov	ecx,[file_browser_data_1.y]
1497
	mov	ax,cx
1498
	mov	ax,cx
1498
	add	eax,3
1499
	add	eax,3
1499
	shl	eax,16
1500
	shl	eax,16
1500
	add	ecx,eax
1501
	add	ecx,eax
1501
	mov	cx,16
1502
	mov	cx,16
1502
	mcall	8,,,3
1503
	mcall	8,,,3
1503
 
1504
 
1504
	pusha
1505
	pusha
1505
	shr	ecx,16
1506
	shr	ecx,16
1506
	mov	bx,cx
1507
	mov	bx,cx
1507
	add	ebx,4 shl 16
1508
	add	ebx,4 shl 16
1508
	mov	ecx,[w_work_button_text]
1509
	mov	ecx,[w_work_button_text]
1509
	or	ecx,0x90000000
1510
	or	ecx,0x90000000
1510
	mcall	4,,,message_cancel_button
1511
	mcall	4,,,message_cancel_button
1511
	popa
1512
	popa
1512
 
1513
 
1513
	sub	ebx,65 shl 16
1514
	sub	ebx,65 shl 16
1514
	mcall	8,,,4
1515
	mcall	8,,,4
1515
 
1516
 
1516
	shr	ecx,16
1517
	shr	ecx,16
1517
	mov	bx,cx
1518
	mov	bx,cx
1518
	add	ebx,4 shl 16
1519
	add	ebx,4 shl 16
1519
	mov	edx,[open_dialog_type]
1520
	mov	edx,[open_dialog_type]
1520
	shl	edx,2
1521
	shl	edx,2
1521
	add	edx,message_open_dialog_button
1522
	add	edx,message_open_dialog_button
1522
	mov	edx,[edx]
1523
	mov	edx,[edx]
1523
;-------------------------------
1524
;-------------------------------
1524
	cmp	[open_dialog_type],1
1525
	cmp	[open_dialog_type],1
1525
	jne	@f
1526
	jne	@f
1526
 
1527
 
1527
	cmp	[focus_pointer],1
1528
	cmp	[focus_pointer],1
1528
	je	@f
1529
	je	@f
1529
 
1530
 
1530
	cmp	[error_window],0
1531
	cmp	[error_window],0
1531
	jne	@f
1532
	jne	@f
1532
 
1533
 
1533
	mov	eax,[file_browser_data_1.folder_block]
1534
	mov	eax,[file_browser_data_1.folder_block]
1534
	test	eax,eax
1535
	test	eax,eax
1535
	jz	@f
1536
	jz	@f
1536
 
1537
 
1537
	mov	eax,[file_browser_data_1.selected_BDVK_adress]
1538
	mov	eax,[file_browser_data_1.selected_BDVK_adress]
1538
	test	[eax],byte 0x10
1539
	test	[eax],byte 0x10
1539
	jz	@f
1540
	jz	@f
1540
 
1541
 
1541
	mov	edx,message_0	; Open Dir
1542
	mov	edx,message_0	; Open Dir
1542
@@:
1543
@@:
1543
;--------------------------------------
1544
;--------------------------------------
1544
	mov	[open_button_coordinates],ebx
1545
	mov	[open_button_coordinates],ebx
1545
	mov	ecx,[w_work_button_text]
1546
	mov	ecx,[w_work_button_text]
1546
	or	ecx,0x90000000
1547
	or	ecx,0x90000000
1547
	mcall	4	;message_open_button
1548
	mcall	4	;message_open_button
1548
.end:
1549
.end:
1549
	mcall	12,2
1550
	mcall	12,2
1550
	ret
1551
	ret
1551
;---------------------------------------------------------------------
1552
;---------------------------------------------------------------------
1552
draw_open_button_label:
1553
draw_open_button_label:
1553
	cmp	[do_not_draw_open_button_label],1
1554
	cmp	[do_not_draw_open_button_label],1
1554
	je	.exit_1 
1555
	je	.exit_1 
1555
 
1556
 
1556
	cmp	[open_dialog_type],1
1557
	cmp	[open_dialog_type],1
1557
	jne	.exit_1
1558
	jne	.exit_1
1558
 
1559
 
1559
	cmp	[focus_pointer],1
1560
	cmp	[focus_pointer],1
1560
	je	draw_save_button_label
1561
	je	draw_save_button_label
1561
	
1562
	
1562
	pusha
1563
	pusha
1563
	mov	ebx,[open_button_coordinates]
1564
	mov	ebx,[open_button_coordinates]
1564
	test	ebx,ebx
1565
	test	ebx,ebx
1565
	jz	.exit
1566
	jz	.exit
1566
 
1567
 
1567
	mov	edx,[open_dialog_type]
1568
	mov	edx,[open_dialog_type]
1568
	shl	edx,2
1569
	shl	edx,2
1569
	add	edx,message_open_dialog_button
1570
	add	edx,message_open_dialog_button
1570
	mov	edx,[edx]
1571
	mov	edx,[edx]
1571
	
1572
	
1572
	mov	eax,[file_browser_data_1.folder_block]
1573
	mov	eax,[file_browser_data_1.folder_block]
1573
	test	eax,eax
1574
	test	eax,eax
1574
	jz	.1
1575
	jz	.1
1575
	
1576
	
1576
	mov	eax,[file_browser_data_1.selected_BDVK_adress]
1577
	mov	eax,[file_browser_data_1.selected_BDVK_adress]
1577
	test	[eax],byte 0x10
1578
	test	[eax],byte 0x10
1578
	jz	@f
1579
	jz	@f
1579
	
1580
	
1580
	mov	edx,message_0	; Open Dir
1581
	mov	edx,message_0	; Open Dir
1581
	jmp	.1
1582
	jmp	.1
1582
@@:
1583
@@:
1583
	call	copy_new_file_name
1584
	call	copy_new_file_name
1584
.1:
1585
.1:
1585
	mov	ecx,[w_work_button_text]
1586
	mov	ecx,[w_work_button_text]
1586
	or	ecx,0xd0000000
1587
	or	ecx,0xd0000000
1587
	mov	edi,[w_work_button]
1588
	mov	edi,[w_work_button]
1588
	mcall	4	;message_open_button
1589
	mcall	4	;message_open_button
1589
.exit:
1590
.exit:
1590
	popa
1591
	popa
1591
.exit_1:
1592
.exit_1:
1592
	ret
1593
	ret
1593
;---------------------------------------------------------------------
1594
;---------------------------------------------------------------------
1594
draw_save_button_label:
1595
draw_save_button_label:
1595
	pusha
1596
	pusha
1596
	mov	ebx,[open_button_coordinates]
1597
	mov	ebx,[open_button_coordinates]
1597
 
1598
 
1598
	mov	edx,message_1	; Save
1599
	mov	edx,message_1	; Save
1599
 
1600
 
1600
	mov	ecx,[w_work_button_text]
1601
	mov	ecx,[w_work_button_text]
1601
	or	ecx,0xd0000000
1602
	or	ecx,0xd0000000
1602
	mov	edi,[w_work_button]
1603
	mov	edi,[w_work_button]
1603
	mcall	4	;message_open_button
1604
	mcall	4	;message_open_button
1604
	popa
1605
	popa
1605
	ret
1606
	ret
1606
;---------------------------------------------------------------------
1607
;---------------------------------------------------------------------
1607
copy_new_file_name:
1608
copy_new_file_name:
1608
	mov	esi,[file_browser_data_1.selected_BDVK_adress]
1609
	mov	esi,[file_browser_data_1.selected_BDVK_adress]
1609
	add	esi,40
1610
	add	esi,40
1610
	mov	edi,user_selected_name
1611
	mov	edi,user_selected_name
1611
	cld
1612
	cld
1612
	lodsb
1613
	lodsb
1613
	test	al,al
1614
	test	al,al
1614
	jnz	.1
1615
	jnz	.1
1615
	ret
1616
	ret
1616
@@:
1617
@@:
1617
	lodsb
1618
	lodsb
1618
.1:
1619
.1:
1619
	stosb
1620
	stosb
1620
	test	al,al
1621
	test	al,al
1621
	jnz	@r
1622
	jnz	@r
1622
	
1623
	
1623
	sub	edi,user_selected_name
1624
	sub	edi,user_selected_name
1624
	dec	edi
1625
	dec	edi
1625
	
1626
	
1626
	mov	esi,edit1
1627
	mov	esi,edit1
1627
	mov	[esi+48],edi ;ed_size
1628
	mov	[esi+48],edi ;ed_size
1628
	mov	[esi+52],edi ;ed_pos
1629
	mov	[esi+52],edi ;ed_pos
1629
 
1630
 
1630
	push	dword name_editboxes
1631
	push	dword name_editboxes
1631
	call	[edit_box_draw]
1632
	call	[edit_box_draw]
1632
	ret
1633
	ret
1633
;---------------------------------------------------------------------
1634
;---------------------------------------------------------------------
1634
prepare_system_colors:
1635
prepare_system_colors:
1635
	mcall	48,3,app_colours,10*4
1636
	mcall	48,3,app_colours,10*4
1636
 
1637
 
1637
	mov	eax,[w_work]
1638
	mov	eax,[w_work]
1638
	mov	[menu_data_1.bckg_col],eax
1639
	mov	[menu_data_1.bckg_col],eax
1639
	mov	[menu_data_2.bckg_col],eax
1640
	mov	[menu_data_2.bckg_col],eax
1640
	mov	[menu_data_3.bckg_col],eax
1641
	mov	[menu_data_3.bckg_col],eax
1641
 
1642
 
1642
	mov	[menu_data_1.menu_col],eax
1643
	mov	[menu_data_1.menu_col],eax
1643
	mov	[menu_data_2.menu_col],eax
1644
	mov	[menu_data_2.menu_col],eax
1644
	mov	[menu_data_3.menu_col],eax
1645
	mov	[menu_data_3.menu_col],eax
1645
	
1646
	
1646
	mov	[scroll_bar_data_vertical.bckg_col],eax 
1647
	mov	[scroll_bar_data_vertical.bckg_col],eax 
1647
 
1648
 
1648
	mov	eax,[w_work_button]
1649
	mov	eax,[w_work_button]
1649
	mov	[menu_data_1.frnt_col],eax
1650
	mov	[menu_data_1.frnt_col],eax
1650
	mov	[menu_data_2.frnt_col],eax
1651
	mov	[menu_data_2.frnt_col],eax
1651
	mov	[menu_data_3.frnt_col],eax
1652
	mov	[menu_data_3.frnt_col],eax
1652
 
1653
 
1653
	mov	[scroll_bar_data_vertical.frnt_col],eax 
1654
	mov	[scroll_bar_data_vertical.frnt_col],eax 
1654
 
1655
 
1655
	mov	eax,[w_work_button]
1656
	mov	eax,[w_work_button]
1656
	mov	[menu_data_1.menu_sel_col],eax
1657
	mov	[menu_data_1.menu_sel_col],eax
1657
	mov	[menu_data_2.menu_sel_col],eax
1658
	mov	[menu_data_2.menu_sel_col],eax
1658
	mov	[menu_data_3.menu_sel_col],eax
1659
	mov	[menu_data_3.menu_sel_col],eax
1659
 
1660
 
1660
	mov	eax,[w_work_text]
1661
	mov	eax,[w_work_text]
1661
	mov	[menu_data_1.bckg_text_col],eax
1662
	mov	[menu_data_1.bckg_text_col],eax
1662
	mov	[menu_data_2.bckg_text_col],eax
1663
	mov	[menu_data_2.bckg_text_col],eax
1663
	mov	[menu_data_3.bckg_text_col],eax
1664
	mov	[menu_data_3.bckg_text_col],eax
1664
	
1665
	
1665
	mov	eax,[w_work_button_text]
1666
	mov	eax,[w_work_button_text]
1666
	mov	[menu_data_1.frnt_text_col],eax
1667
	mov	[menu_data_1.frnt_text_col],eax
1667
	mov	[menu_data_2.frnt_text_col],eax
1668
	mov	[menu_data_2.frnt_text_col],eax
1668
	mov	[menu_data_3.frnt_text_col],eax
1669
	mov	[menu_data_3.frnt_text_col],eax
1669
	
1670
	
1670
	mov	[scroll_bar_data_vertical.line_col],eax 
1671
	mov	[scroll_bar_data_vertical.line_col],eax 
1671
	ret
1672
	ret
1672
;---------------------------------------------------------------------
1673
;---------------------------------------------------------------------
1673
draw_for_fs_errors:
1674
draw_for_fs_errors:
1674
	call	draw_dir_path
1675
	call	draw_dir_path
1675
 
1676
 
1676
	mov	ebx,[file_browser_data_1.x]
1677
	mov	ebx,[file_browser_data_1.x]
1677
	mov	ecx,[file_browser_data_1.y]
1678
	mov	ecx,[file_browser_data_1.y]
1678
	mcall	13,,,[file_browser_data_1.background_color]
1679
	mcall	13,,,[file_browser_data_1.background_color]
1679
	push	ebx ecx
1680
	push	ebx ecx
1680
	add	ebx,10 shl 16
1681
	add	ebx,10 shl 16
1681
	sub	ebx,20
1682
	sub	ebx,20
1682
	add	ecx,10 shl 16
1683
	add	ecx,10 shl 16
1683
	sub	ecx,20
1684
	sub	ecx,20
1684
 
1685
 
1685
	shr	ecx,16
1686
	shr	ecx,16
1686
	mov	bx,cx
1687
	mov	bx,cx
1687
	add	ebx,5 shl 16+15
1688
	add	ebx,5 shl 16+15
1688
	mcall	4,,0x90000000,load_directory_error_type
1689
	mcall	4,,0x90000000,load_directory_error_type
1689
 
1690
 
1690
	add	ebx,20
1691
	add	ebx,20
1691
	mcall	4,,,dir_path	
1692
	mcall	4,,,dir_path	
1692
 
1693
 
1693
	mov	eax,[error_type]
1694
	mov	eax,[error_type]
1694
	shl	eax,2
1695
	shl	eax,2
1695
	add	eax,error_fs_text_pointers
1696
	add	eax,error_fs_text_pointers
1696
	mov	edx,[eax]
1697
	mov	edx,[eax]
1697
	add	ebx,20
1698
	add	ebx,20
1698
	mcall	4
1699
	mcall	4
1699
	
1700
	
1700
	add	ebx,20
1701
	add	ebx,20
1701
	mcall	,,,error_help_text
1702
	mcall	,,,error_help_text
1702
 
1703
 
1703
	pop	ecx ebx
1704
	pop	ecx ebx
1704
 
1705
 
1705
	mov	ebx,[file_browser_data_1.x]
1706
	mov	ebx,[file_browser_data_1.x]
1706
	mov	ax,bx
1707
	mov	ax,bx
1707
	shr	eax,1
1708
	shr	eax,1
1708
	shl	eax,16
1709
	shl	eax,16
1709
	add	ebx,eax
1710
	add	ebx,eax
1710
	mov	eax,50
1711
	mov	eax,50
1711
	mov	bx,ax
1712
	mov	bx,ax
1712
	shr	eax,1
1713
	shr	eax,1
1713
	shl	eax,16
1714
	shl	eax,16
1714
	sub	ebx,eax
1715
	sub	ebx,eax
1715
 
1716
 
1716
	mov	ecx,[file_browser_data_1.y]
1717
	mov	ecx,[file_browser_data_1.y]
1717
	mov	ax,cx
1718
	mov	ax,cx
1718
	sub	eax,40
1719
	sub	eax,40
1719
	shl	eax,16
1720
	shl	eax,16
1720
	add	ecx,eax
1721
	add	ecx,eax
1721
	mov	cx,15
1722
	mov	cx,15
1722
 
1723
 
1723
	mcall	8,,,5,[w_work_button]	;0xffffff
1724
	mcall	8,,,5,[w_work_button]	;0xffffff
1724
 
1725
 
1725
	shr	ecx,16
1726
	shr	ecx,16
1726
	mov	bx,cx
1727
	mov	bx,cx
1727
	add	ebx,4 shl 16
1728
	add	ebx,4 shl 16
1728
	mov	ecx,[w_work_button_text]
1729
	mov	ecx,[w_work_button_text]
1729
	add	ecx,0x90000000
1730
	add	ecx,0x90000000
1730
	mcall	4,,,message_cancel_button
1731
	mcall	4,,,message_cancel_button
1731
 
1732
 
1732
	ret
1733
	ret
1733
;---------------------------------------------------------------------	
1734
;---------------------------------------------------------------------	
1734
draw_file_name:
1735
draw_file_name:
1735
	mov	esi,user_selected_name
1736
	mov	esi,user_selected_name
1736
	cld
1737
	cld
1737
@@:
1738
@@:
1738
	lodsb
1739
	lodsb
1739
	test	al,al
1740
	test	al,al
1740
	jne	@r
1741
	jne	@r
1741
	sub	esi,user_selected_name
1742
	sub	esi,user_selected_name
1742
	mov	eax,esi
1743
	mov	eax,esi
1743
	dec	eax
1744
	dec	eax
1744
	
1745
	
1745
	mov	edi,edit1
1746
	mov	edi,edit1
1746
	mov	[edi+48],eax ;ed_size
1747
	mov	[edi+48],eax ;ed_size
1747
	mov	[edi+52],eax ;ed_pos
1748
	mov	[edi+52],eax ;ed_pos
1748
;--------------------------------------
1749
;--------------------------------------
1749
	mov	eax,[file_browser_data_1.x]
1750
	mov	eax,[file_browser_data_1.x]
1750
	mov	ebx,eax
1751
	mov	ebx,eax
1751
	shr	ebx,16
1752
	shr	ebx,16
1752
	and	eax,0xffff
1753
	and	eax,0xffff
1753
	sub	eax,200
1754
	sub	eax,200
1754
	mov	[edi],eax
1755
	mov	[edi],eax
1755
	add	ebx,70
1756
	add	ebx,70
1756
	mov	[edi+4],ebx
1757
	mov	[edi+4],ebx
1757
	
1758
	
1758
	mov	eax,[file_browser_data_1.y]
1759
	mov	eax,[file_browser_data_1.y]
1759
	mov	ebx,eax
1760
	mov	ebx,eax
1760
	shr	ebx,16
1761
	shr	ebx,16
1761
	and	eax,0xffff
1762
	and	eax,0xffff
1762
	add	eax,ebx
1763
	add	eax,ebx
1763
	add	eax,5
1764
	add	eax,5
1764
	mov	[edi+8],eax
1765
	mov	[edi+8],eax
1765
	
1766
	
1766
	push	dword name_editboxes
1767
	push	dword name_editboxes
1767
	call	[edit_box_draw] 
1768
	call	[edit_box_draw] 
1768
	
1769
	
1769
	mov	bx,[file_browser_data_1.start_x]
1770
	mov	bx,[file_browser_data_1.start_x]
1770
	add	bx,5
1771
	add	bx,5
1771
	shl	ebx,16
1772
	shl	ebx,16
1772
	mov	bx,[file_browser_data_1.start_y]
1773
	mov	bx,[file_browser_data_1.start_y]
1773
	add	bx,[file_browser_data_1.size_y]
1774
	add	bx,[file_browser_data_1.size_y]
1774
	add	bx,9
1775
	add	bx,9
1775
	mov	ecx,[w_work_text]
1776
	mov	ecx,[w_work_text]
1776
	add	ecx,0x80000000
1777
	add	ecx,0x80000000
1777
	mcall	4,,,message_file_name
1778
	mcall	4,,,message_file_name
1778
	ret
1779
	ret
1779
;---------------------------------------------------------------------
1780
;---------------------------------------------------------------------
1780
draw_dir_path:
1781
draw_dir_path:
1781
	mov	eax,[file_browser_data_1.x]
1782
	mov	eax,[file_browser_data_1.x]
1782
	mov	ebx,eax
1783
	mov	ebx,eax
1783
	shr	ebx,16
1784
	shr	ebx,16
1784
	add	ebx,3
1785
	add	ebx,3
1785
	and	eax,0xffff
1786
	and	eax,0xffff
1786
	sub	eax,5
1787
	sub	eax,5
1787
	
1788
	
1788
	mov	[PathShow_data_1.area_size_x],ax
1789
	mov	[PathShow_data_1.area_size_x],ax
1789
	mov	[PathShow_data_1.start_x],bx
1790
	mov	[PathShow_data_1.start_x],bx
1790
;--------------------------------------
1791
;--------------------------------------
1791
;; top line
1792
;; top line
1792
;	mov	ebx,[file_browser_data_1.x]
1793
;	mov	ebx,[file_browser_data_1.x]
1793
;	mcall	13,,<7,1>,0x0
1794
;	mcall	13,,<7,1>,0x0
1794
; down line
1795
; down line
1795
;	push	ebx ecx
1796
;	push	ebx ecx
1796
;	mcall	,,<21,1>,
1797
;	mcall	,,<21,1>,
1797
;	pop	ecx ebx
1798
;	pop	ecx ebx
1798
; left line	
1799
; left line	
1799
;	push	ebx
1800
;	push	ebx
1800
;	mov	bx,1
1801
;	mov	bx,1
1801
;	mov	cx,15
1802
;	mov	cx,15
1802
;	mcall
1803
;	mcall
1803
;	pop	ebx
1804
;	pop	ebx
1804
; right line
1805
; right line
1805
;	mov	ax,bx
1806
;	mov	ax,bx
1806
;	shr	ebx,16
1807
;	shr	ebx,16
1807
;	add	bx,ax
1808
;	add	bx,ax
1808
;	dec	ebx
1809
;	dec	ebx
1809
;	shl	ebx,16
1810
;	shl	ebx,16
1810
;	mov	bx,1
1811
;	mov	bx,1
1811
;	mcall	13
1812
;	mcall	13
1812
;-------------------------------------- 
1813
;-------------------------------------- 
1813
	mov	ebx,[file_browser_data_1.x]
1814
	mov	ebx,[file_browser_data_1.x]
1814
	sub	ebx,2
1815
	sub	ebx,2
1815
	add	ebx,1 shl 16
1816
	add	ebx,1 shl 16
1816
	mcall	13,,<8,13>,0xffffcc
1817
	mcall	13,,<8,13>,0xffffcc
1817
;--------------------------------------
1818
;--------------------------------------
1818
; prepare for PathShow
1819
; prepare for PathShow
1819
	push	dword PathShow_data_1
1820
	push	dword PathShow_data_1
1820
	call	[PathShow_prepare]
1821
	call	[PathShow_prepare]
1821
	
1822
	
1822
; draw for PathShow
1823
; draw for PathShow
1823
	push	dword PathShow_data_1
1824
	push	dword PathShow_data_1
1824
	call	[PathShow_draw]
1825
	call	[PathShow_draw]
1825
	
1826
	
1826
	ret
1827
	ret
1827
;---------------------------------------------------------------------
1828
;---------------------------------------------------------------------
1828
draw_draw_file_browser1:
1829
draw_draw_file_browser1:
1829
	call	draw_dir_path
1830
	call	draw_dir_path
1830
	cmp	[open_dialog_type],1
1831
	cmp	[open_dialog_type],1
1831
	jne	@f	
1832
	jne	@f	
1832
	call	draw_file_name
1833
	call	draw_file_name
1833
@@:
1834
@@:
1834
	xor	eax,eax
1835
	xor	eax,eax
1835
	inc	eax
1836
	inc	eax
1836
	mov	[file_browser_data_1.all_redraw],eax
1837
	mov	[file_browser_data_1.all_redraw],eax
1837
	mov	[scroll_bar_data_vertical.all_redraw],eax
1838
	mov	[scroll_bar_data_vertical.all_redraw],eax
1838
	
1839
	
1839
	push	dword file_browser_data_1
1840
	push	dword file_browser_data_1
1840
	call	[FileBrowser_draw]
1841
	call	[FileBrowser_draw]
1841
 
1842
 
1842
	call	draw_open_button_label
1843
	call	draw_open_button_label
1843
	
1844
	
1844
	call	prepare_scrollbar_data
1845
	call	prepare_scrollbar_data
1845
 
1846
 
1846
	call	draw_scrollbar
1847
	call	draw_scrollbar
1847
 
1848
 
1848
	xor	eax,eax
1849
	xor	eax,eax
1849
	mov	[file_browser_data_1.all_redraw],eax
1850
	mov	[file_browser_data_1.all_redraw],eax
1850
	mov	[scroll_bar_data_vertical.all_redraw],eax
1851
	mov	[scroll_bar_data_vertical.all_redraw],eax
1851
	ret
1852
	ret
1852
;---------------------------------------------------------------------
1853
;---------------------------------------------------------------------
1853
draw_draw_file_browser2:
1854
draw_draw_file_browser2:
1854
	mov	eax,2
1855
	mov	eax,2
1855
	mov	[file_browser_data_1.all_redraw],eax
1856
	mov	[file_browser_data_1.all_redraw],eax
1856
 
1857
 
1857
	call	get_scrollbar_data
1858
	call	get_scrollbar_data
1858
 
1859
 
1859
	push	dword file_browser_data_1
1860
	push	dword file_browser_data_1
1860
	call	[FileBrowser_draw]
1861
	call	[FileBrowser_draw]
1861
 
1862
 
1862
	call	draw_open_button_label
1863
	call	draw_open_button_label
1863
 
1864
 
1864
	xor	eax,eax
1865
	xor	eax,eax
1865
	mov	[file_browser_data_1.all_redraw],eax
1866
	mov	[file_browser_data_1.all_redraw],eax
1866
	ret
1867
	ret
1867
;---------------------------------------------------------------------
1868
;---------------------------------------------------------------------
1868
draw_scrollbar1:
1869
draw_scrollbar1:
1869
	mov	eax,[file_browser_data_1.start_draw_line]
1870
	mov	eax,[file_browser_data_1.start_draw_line]
1870
	mov	[scroll_bar_data_vertical.position],eax
1871
	mov	[scroll_bar_data_vertical.position],eax
1871
 
1872
 
1872
	call	draw_scrollbar
1873
	call	draw_scrollbar
1873
 
1874
 
1874
	ret
1875
	ret
1875
;---------------------------------------------------------------------
1876
;---------------------------------------------------------------------
1876
draw_scrollbar:
1877
draw_scrollbar:
1877
	mov	eax,[scroll_bar_data_vertical.max_area]
1878
	mov	eax,[scroll_bar_data_vertical.max_area]
1878
	cmp	eax,[scroll_bar_data_vertical.cur_area]
1879
	cmp	eax,[scroll_bar_data_vertical.cur_area]
1879
	jbe	@f
1880
	jbe	@f
1880
	cmp	[scroll_bar_data_vertical.cur_area],0
1881
	cmp	[scroll_bar_data_vertical.cur_area],0
1881
	je	@f
1882
	je	@f
1882
	push	dword scroll_bar_data_vertical
1883
	push	dword scroll_bar_data_vertical
1883
	call	[scrollbar_ver_draw]
1884
	call	[scrollbar_ver_draw]
1884
@@:
1885
@@:
1885
	ret
1886
	ret
1886
;---------------------------------------------------------------------
1887
;---------------------------------------------------------------------
1887
get_scrollbar_data:
1888
get_scrollbar_data:
1888
	mov	eax,[scroll_bar_data_vertical.position]
1889
	mov	eax,[scroll_bar_data_vertical.position]
1889
	mov	[file_browser_data_1.start_draw_line],eax
1890
	mov	[file_browser_data_1.start_draw_line],eax
1890
	ret
1891
	ret
1891
;---------------------------------------------------------------------
1892
;---------------------------------------------------------------------
1892
prepare_scrollbar_data:
1893
prepare_scrollbar_data:
1893
	mov	eax,[file_browser_data_1.folder_block]
1894
	mov	eax,[file_browser_data_1.folder_block]
1894
	mov	[scroll_bar_data_vertical.max_area],eax
1895
	mov	[scroll_bar_data_vertical.max_area],eax
1895
	mov	eax,[file_browser_data_1.max_panel_line]
1896
	mov	eax,[file_browser_data_1.max_panel_line]
1896
	mov	[scroll_bar_data_vertical.cur_area],eax
1897
	mov	[scroll_bar_data_vertical.cur_area],eax
1897
	ret
1898
	ret
1898
;---------------------------------------------------------------------
1899
;---------------------------------------------------------------------
1899
get_active_pocess:
1900
get_active_pocess:
1900
	mcall	9,procinfo,-1
1901
	mcall	9,procinfo,-1
1901
	mov	ecx,[ebx+30]	; PID
1902
	mov	ecx,[ebx+30]	; PID
1902
	mcall	18,21
1903
	mcall	18,21
1903
	mov	[active_process],eax	; WINDOW SLOT
1904
	mov	[active_process],eax	; WINDOW SLOT
1904
	mov	ebx,[communication_area]	
1905
	mov	ebx,[communication_area]	
1905
	test	ebx,ebx
1906
	test	ebx,ebx
1906
	jz	.1
1907
	jz	.1
1907
	mov	[ebx+12],eax	; WINDOW SLOT to com. area
1908
	mov	[ebx+12],eax	; WINDOW SLOT to com. area
1908
.1:
1909
.1:
1909
	ret
1910
	ret
1910
;---------------------------------------------------------------------
1911
;---------------------------------------------------------------------
1911
get_window_param:
1912
get_window_param:
1912
	mcall	9,procinfo,-1
1913
	mcall	9,procinfo,-1
1913
	mov	eax,[ebx+66]
1914
	mov	eax,[ebx+66]
1914
	inc	eax
1915
	inc	eax
1915
	mov	[window_high],eax
1916
	mov	[window_high],eax
1916
	mov	eax,[ebx+62]
1917
	mov	eax,[ebx+62]
1917
	inc	eax
1918
	inc	eax
1918
	mov	[window_width],eax
1919
	mov	[window_width],eax
1919
	mov	eax,[ebx+70]
1920
	mov	eax,[ebx+70]
1920
	mov	[window_status],eax
1921
	mov	[window_status],eax
1921
	ret
1922
	ret
1922
;---------------------------------------------------------------------
1923
;---------------------------------------------------------------------
1923
convert_icons:
1924
convert_icons:
1924
	xor	eax,eax
1925
	xor	eax,eax
1925
	mov	[return_code],eax
1926
	mov	[return_code],eax
1926
;	mov	eax,image_file
1927
;	mov	eax,image_file
1927
	push	image_file
1928
	push	image_file
1928
	call	[cnv_png_import.Start]
1929
	call	[cnv_png_import.Start]
1929
 
1930
 
1930
	mov	ecx,[image_file]
1931
	mov	ecx,[image_file]
1931
	mcall	68,13,
1932
	mcall	68,13,
1932
	test	eax,eax
1933
	test	eax,eax
1933
	jz	memory_free_error
1934
	jz	memory_free_error
1934
 
1935
 
1935
	cmp	[return_code],dword 0
1936
	cmp	[return_code],dword 0
1936
	je	@f
1937
	je	@f
1937
	mov	[N_error],6
1938
	mov	[N_error],6
1938
	jmp	button.exit
1939
	jmp	button.exit
1939
@@:
1940
@@:
1940
 
1941
 
1941
	mov	ebx,[raw_pointer]
1942
	mov	ebx,[raw_pointer]
1942
	mov	eax,[ebx+4]
1943
	mov	eax,[ebx+4]
1943
; set of icon size x
1944
; set of icon size x
1944
	mov	[file_browser_data_1.icon_size_x],ax
1945
	mov	[file_browser_data_1.icon_size_x],ax
1945
; mov eax,[ebx+8]
1946
; mov eax,[ebx+8]
1946
; set of icon size y
1947
; set of icon size y
1947
	mov	[file_browser_data_1.icon_size_y],ax
1948
	mov	[file_browser_data_1.icon_size_y],ax
1948
	inc	ax
1949
	inc	ax
1949
	mov	[file_browser_data_1.line_size_y],ax
1950
	mov	[file_browser_data_1.line_size_y],ax
1950
	mov	eax,[ebx+12]
1951
	mov	eax,[ebx+12]
1951
; set of RAW resolution to pixel
1952
; set of RAW resolution to pixel
1952
	mov	[file_browser_data_1.resolution_raw],eax
1953
	mov	[file_browser_data_1.resolution_raw],eax
1953
 
1954
 
1954
	mov	eax,[ebx+20]
1955
	mov	eax,[ebx+20]
1955
	add	eax,ebx
1956
	add	eax,ebx
1956
; set RAW palette,use else resolution 8bit or less
1957
; set RAW palette,use else resolution 8bit or less
1957
	mov	[file_browser_data_1.palette_raw],eax
1958
	mov	[file_browser_data_1.palette_raw],eax
1958
 
1959
 
1959
	mov	eax,[ebx+28]
1960
	mov	eax,[ebx+28]
1960
	add	eax,ebx
1961
	add	eax,ebx
1961
; set RAW area for icon
1962
; set RAW area for icon
1962
	mov	[file_browser_data_1.icon_raw_area],eax
1963
	mov	[file_browser_data_1.icon_raw_area],eax
1963
	ret
1964
	ret
1964
;---------------------------------------------------------------------
1965
;---------------------------------------------------------------------
1965
calc_ini:
1966
calc_ini:
1966
	mov	eax,[image_file]
1967
	mov	eax,[image_file]
1967
	mov	[file_browser_data_1.ini_file_start],eax
1968
	mov	[file_browser_data_1.ini_file_start],eax
1968
	add	eax,[img_size]
1969
	add	eax,[img_size]
1969
	mov	[file_browser_data_1.ini_file_end],eax
1970
	mov	[file_browser_data_1.ini_file_end],eax
1970
	ret
1971
	ret
1971
;---------------------------------------------------------------------
1972
;---------------------------------------------------------------------
1972
load_ini:
1973
load_ini:
1973
	mov	edi,ini_file_name
1974
	mov	edi,ini_file_name
1974
 
1975
 
1975
	mov	[fileinfo.name],edi
1976
	mov	[fileinfo.name],edi
1976
	mov	[fileinfo.subfunction],dword 5
1977
	mov	[fileinfo.subfunction],dword 5
1977
	mov	[fileinfo.size],dword 0
1978
	mov	[fileinfo.size],dword 0
1978
	mov	[fileinfo.return],dword file_info
1979
	mov	[fileinfo.return],dword file_info
1979
	mcall	70,fileinfo
1980
	mcall	70,fileinfo
1980
	test	eax,eax
1981
	test	eax,eax
1981
	jnz	.error
1982
	jnz	.error
1982
 
1983
 
1983
	mov	[fileinfo.subfunction],dword 0
1984
	mov	[fileinfo.subfunction],dword 0
1984
 
1985
 
1985
	mov	ecx,[file_info+32]
1986
	mov	ecx,[file_info+32]
1986
	mov	[fileinfo.size],ecx
1987
	mov	[fileinfo.size],ecx
1987
	mov	[img_size],ecx
1988
	mov	[img_size],ecx
1988
	
1989
	
1989
	mcall	68,12
1990
	mcall	68,12
1990
	test	eax,eax
1991
	test	eax,eax
1991
	jz	memory_get_error
1992
	jz	memory_get_error
1992
 
1993
 
1993
	mov	[fileinfo.return],eax
1994
	mov	[fileinfo.return],eax
1994
	mov	[image_file],eax
1995
	mov	[image_file],eax
1995
 
1996
 
1996
	mcall	70,fileinfo
1997
	mcall	70,fileinfo
1997
	test	eax,eax
1998
	test	eax,eax
1998
	jnz	.error
1999
	jnz	.error
1999
	ret
2000
	ret
2000
.error:
2001
.error:
2001
	mov	[N_error],1
2002
	mov	[N_error],1
2002
	mov	[error_type],eax
2003
	mov	[error_type],eax
2003
	jmp	button.exit
2004
	jmp	button.exit
2004
;---------------------------------------------------------------------
2005
;---------------------------------------------------------------------
2005
load_icons:
2006
load_icons:
2006
	mov	ebx,icons_file_name_2
2007
	mov	ebx,icons_file_name_2
2007
	mov	esi,path
2008
	mov	esi,path
2008
	mov	edi,file_name
2009
	mov	edi,file_name
2009
	call	copy_file_path
2010
	call	copy_file_path
2010
 
2011
 
2011
	mov	[fileinfo.subfunction],dword 5
2012
	mov	[fileinfo.subfunction],dword 5
2012
	mov	[fileinfo.size],dword 0
2013
	mov	[fileinfo.size],dword 0
2013
	mov	[fileinfo.return],dword file_info
2014
	mov	[fileinfo.return],dword file_info
2014
	mcall	70,fileinfo
2015
	mcall	70,fileinfo
2015
	test	eax,eax
2016
	test	eax,eax
2016
	jz	@f
2017
	jz	@f
2017
	
2018
	
2018
	mov	edi,icons_path
2019
	mov	edi,icons_path
2019
 
2020
 
2020
	mov	[fileinfo.name],edi 
2021
	mov	[fileinfo.name],edi 
2021
	mov	[fileinfo.subfunction],dword 5
2022
	mov	[fileinfo.subfunction],dword 5
2022
	mov	[fileinfo.size],dword 0
2023
	mov	[fileinfo.size],dword 0
2023
	mov	[fileinfo.return],dword file_info
2024
	mov	[fileinfo.return],dword file_info
2024
	mcall	70,fileinfo
2025
	mcall	70,fileinfo
2025
	test	eax,eax
2026
	test	eax,eax
2026
	jnz	.error
2027
	jnz	.error
2027
@@:
2028
@@:
2028
	mov	[fileinfo.subfunction],dword 0
2029
	mov	[fileinfo.subfunction],dword 0
2029
 
2030
 
2030
	mov	ecx,[file_info+32]
2031
	mov	ecx,[file_info+32]
2031
	mov	[fileinfo.size],ecx
2032
	mov	[fileinfo.size],ecx
2032
	mov	[img_size],ecx
2033
	mov	[img_size],ecx
2033
	
2034
	
2034
	mcall	68,12
2035
	mcall	68,12
2035
	test	eax,eax
2036
	test	eax,eax
2036
	jz	memory_get_error
2037
	jz	memory_get_error
2037
 
2038
 
2038
	mov	[fileinfo.return],eax
2039
	mov	[fileinfo.return],eax
2039
	mov	[image_file],eax
2040
	mov	[image_file],eax
2040
 
2041
 
2041
	mcall	70,fileinfo
2042
	mcall	70,fileinfo
2042
	test	eax,eax
2043
	test	eax,eax
2043
	jnz	.error
2044
	jnz	.error
2044
	ret
2045
	ret
2045
.error:
2046
.error:
2046
	mov	[N_error],2
2047
	mov	[N_error],2
2047
	mov	[error_type],eax
2048
	mov	[error_type],eax
2048
	jmp	button.exit
2049
	jmp	button.exit
2049
;---------------------------------------------------------------------
2050
;---------------------------------------------------------------------
2050
sort_directory:
2051
sort_directory:
2051
	mov	eax,[file_browser_data_1.folder_data]
2052
	mov	eax,[file_browser_data_1.folder_data]
2052
	mov	ebx,[eax+4]	; number of files
2053
	mov	ebx,[eax+4]	; number of files
2053
	add	eax,32
2054
	add	eax,32
2054
	cmp	[eax+40],word '..'
2055
	cmp	[eax+40],word '..'
2055
	jne	@f
2056
	jne	@f
2056
	cmp	[eax+40+2],byte 0
2057
	cmp	[eax+40+2],byte 0
2057
	jne	@f
2058
	jne	@f
2058
	dec	ebx
2059
	dec	ebx
2059
	add	eax,304
2060
	add	eax,304
2060
@@:
2061
@@:
2061
	push	dword [sort_type]	; sort mode
2062
	push	dword [sort_type]	; sort mode
2062
	push	ebx	; number of files
2063
	push	ebx	; number of files
2063
	push	eax	; data files
2064
	push	eax	; data files
2064
	call	[sort_dir]
2065
	call	[sort_dir]
2065
	ret
2066
	ret
2066
;--------------------------------------------------------------------
2067
;--------------------------------------------------------------------
2067
load_directory:
2068
load_directory:
2068
	xor	eax,eax
2069
	xor	eax,eax
2069
	mov	[N_error],eax
2070
	mov	[N_error],eax
2070
	cmp	[file_browser_data_1.folder_data],eax
2071
	cmp	[file_browser_data_1.folder_data],eax
2071
	je	@f
2072
	je	@f
2072
	mcall	68,13,[file_browser_data_1.folder_data]
2073
	mcall	68,13,[file_browser_data_1.folder_data]
2073
	test	eax,eax
2074
	test	eax,eax
2074
	jz	memory_free_error
2075
	jz	memory_free_error
2075
 
2076
 
2076
@@:
2077
@@:
2077
	mov	[dirinfo.size],dword 0
2078
	mov	[dirinfo.size],dword 0
2078
	mov	[dirinfo.return],dir_header
2079
	mov	[dirinfo.return],dir_header
2079
	mcall	70,dirinfo
2080
	mcall	70,dirinfo
2080
	test	eax,eax
2081
	test	eax,eax
2081
	jz	@f
2082
	jz	@f
2082
;	mov	esi,previous_dir_path
2083
;	mov	esi,previous_dir_path
2083
;	mov	edi,dir_path
2084
;	mov	edi,dir_path
2084
;	call	copy_dir_name.1
2085
;	call	copy_dir_name.1
2085
;	mcall	70,dirinfo
2086
;	mcall	70,dirinfo
2086
;	test	eax,eax
2087
;	test	eax,eax
2087
;	jz	@f	
2088
;	jz	@f	
2088
	xor	ebx,ebx
2089
	xor	ebx,ebx
2089
	mov	[file_browser_data_1.folder_data],ebx
2090
	mov	[file_browser_data_1.folder_data],ebx
2090
	jmp	.error
2091
	jmp	.error
2091
@@:
2092
@@:
2092
	
2093
	
2093
	mov	ecx,[dir_header.totl_blocks]
2094
	mov	ecx,[dir_header.totl_blocks]
2094
	mov	[dirinfo.size],ecx
2095
	mov	[dirinfo.size],ecx
2095
	imul	ecx,304
2096
	imul	ecx,304
2096
	add	ecx,32
2097
	add	ecx,32
2097
	mcall	68,12
2098
	mcall	68,12
2098
	test	eax,eax
2099
	test	eax,eax
2099
	jz	memory_get_error
2100
	jz	memory_get_error
2100
 
2101
 
2101
	mov	[dirinfo.return],eax
2102
	mov	[dirinfo.return],eax
2102
	mov	[file_browser_data_1.folder_data],eax
2103
	mov	[file_browser_data_1.folder_data],eax
2103
 
2104
 
2104
	mcall	70,dirinfo
2105
	mcall	70,dirinfo
2105
	test	eax,eax
2106
	test	eax,eax
2106
	jnz	.error
2107
	jnz	.error
2107
	
2108
	
2108
; test for empty directory
2109
; test for empty directory
2109
	mov	eax,[dirinfo.return]
2110
	mov	eax,[dirinfo.return]
2110
	mov	eax,[eax+4]
2111
	mov	eax,[eax+4]
2111
	test	eax,eax
2112
	test	eax,eax
2112
	jz	@f
2113
	jz	@f
2113
	
2114
	
2114
	call	delete_point_dir
2115
	call	delete_point_dir
2115
;	call	files_name_normalize
2116
;	call	files_name_normalize
2116
	call	check_filter
2117
	call	check_filter
2117
	call	prepare_extension_and_mark
2118
	call	prepare_extension_and_mark
2118
	call	clear_data_fb_and_sb
2119
	call	clear_data_fb_and_sb
2119
@@:
2120
@@:
2120
	ret
2121
	ret
2121
 
2122
 
2122
.error:
2123
.error:
2123
	mov	[N_error],5
2124
	mov	[N_error],5
2124
	mov	[error_type],eax
2125
	mov	[error_type],eax
2125
	ret
2126
	ret
2126
;---------------------------------------------------------------------
2127
;---------------------------------------------------------------------
2127
clear_data_fb_and_sb:
2128
clear_data_fb_and_sb:
2128
	xor	eax,eax
2129
	xor	eax,eax
2129
	mov	[file_browser_data_1.start_draw_cursor_line],ax
2130
	mov	[file_browser_data_1.start_draw_cursor_line],ax
2130
	mov	[file_browser_data_1.start_draw_line],eax
2131
	mov	[file_browser_data_1.start_draw_line],eax
2131
	mov	[scroll_bar_data_vertical.position],eax 
2132
	mov	[scroll_bar_data_vertical.position],eax 
2132
	ret
2133
	ret
2133
;---------------------------------------------------------------------
2134
;---------------------------------------------------------------------
2134
check_filter:
2135
check_filter:
2135
	cmp [open_dialog_type],2	; Select dir
2136
	cmp [open_dialog_type],2	; Select dir
2136
	je	.1
2137
	je	.1
2137
	xor	eax,eax
2138
	xor	eax,eax
2138
	mov	al,[filter_flag]
2139
	mov	al,[filter_flag]
2139
	test	eax,eax
2140
	test	eax,eax
2140
	jz	@f
2141
	jz	@f
2141
 
2142
 
2142
	mov	eax,[communication_area]
2143
	mov	eax,[communication_area]
2143
	test	eax,eax
2144
	test	eax,eax
2144
	jz	@f
2145
	jz	@f
2145
	mov	eax,[eax+4096]
2146
	mov	eax,[eax+4096]
2146
	test	eax,eax
2147
	test	eax,eax
2147
	jz	@f
2148
	jz	@f
2148
.1:
2149
.1:
2149
	call	delete_unsupported_BDFE
2150
	call	delete_unsupported_BDFE
2150
@@:
2151
@@:
2151
	ret
2152
	ret
2152
;---------------------------------------------------------------------
2153
;---------------------------------------------------------------------
2153
delete_unsupported_BDFE:
2154
delete_unsupported_BDFE:
2154
	mov	ebx,[file_browser_data_1.folder_data]
2155
	mov	ebx,[file_browser_data_1.folder_data]
2155
	add	ebx,4
2156
	add	ebx,4
2156
	xor	ecx,ecx
2157
	xor	ecx,ecx
2157
	dec	ecx
2158
	dec	ecx
2158
	
2159
	
2159
	mov	eax,[file_browser_data_1.folder_data]
2160
	mov	eax,[file_browser_data_1.folder_data]
2160
	add	eax,32+40
2161
	add	eax,32+40
2161
	sub	eax,304
2162
	sub	eax,304
2162
.start:
2163
.start:
2163
	inc	ecx
2164
	inc	ecx
2164
	add	eax,304
2165
	add	eax,304
2165
.1:
2166
.1:
2166
	cmp	[ebx],ecx
2167
	cmp	[ebx],ecx
2167
	je	.end
2168
	je	.end
2168
	cmp	[eax],byte '.'
2169
	cmp	[eax],byte '.'
2169
	jne	@f
2170
	jne	@f
2170
	cmp	[eax+1],byte 0
2171
	cmp	[eax+1],byte 0
2171
	je	.delete
2172
	je	.delete
2172
@@:
2173
@@:
2173
	test	[eax-40],byte 0x10
2174
	test	[eax-40],byte 0x10
2174
	jnz	.start
2175
	jnz	.start
2175
	
2176
	
2176
	cmp	[open_dialog_type],2	; Select dir
2177
	cmp	[open_dialog_type],2	; Select dir
2177
	je	.delete
2178
	je	.delete
2178
	
2179
	
2179
	push	eax ebx
2180
	push	eax ebx
2180
	mov	esi,eax
2181
	mov	esi,eax
2181
	call	search_expansion
2182
	call	search_expansion
2182
	test	eax,eax
2183
	test	eax,eax
2183
	pop	ebx eax
2184
	pop	ebx eax
2184
	jnz	.delete
2185
	jnz	.delete
2185
	
2186
	
2186
	push	eax ebx ecx esi
2187
	push	eax ebx ecx esi
2187
	mov	edi,[communication_area]
2188
	mov	edi,[communication_area]
2188
	add	edi,4100
2189
	add	edi,4100
2189
	call	compare_expansion
2190
	call	compare_expansion
2190
	test	eax,eax
2191
	test	eax,eax
2191
	pop	esi ecx ebx eax
2192
	pop	esi ecx ebx eax
2192
	jz	.start
2193
	jz	.start
2193
	
2194
	
2194
;-------------------------------------------
2195
;-------------------------------------------
2195
.delete:
2196
.delete:
2196
	dec	dword [ebx]
2197
	dec	dword [ebx]
2197
	mov	esi,[ebx]
2198
	mov	esi,[ebx]
2198
	sub	esi,ecx
2199
	sub	esi,ecx
2199
 
2200
 
2200
	push	ecx
2201
	push	ecx
2201
	mov	ecx,esi
2202
	mov	ecx,esi
2202
	imul	ecx,304/4
2203
	imul	ecx,304/4
2203
	mov	edi,eax
2204
	mov	edi,eax
2204
	sub	edi,40
2205
	sub	edi,40
2205
	mov	esi,edi
2206
	mov	esi,edi
2206
	add	esi,304
2207
	add	esi,304
2207
	cld
2208
	cld
2208
	rep	movsd
2209
	rep	movsd
2209
	pop	ecx
2210
	pop	ecx
2210
	
2211
	
2211
	jmp	.1
2212
	jmp	.1
2212
.end:
2213
.end:
2213
	ret
2214
	ret
2214
;---------------------------------------------------------------------
2215
;---------------------------------------------------------------------
2215
search_expansion:
2216
search_expansion:
2216
	mov	edi,esi
2217
	mov	edi,esi
2217
	xor	eax,eax
2218
	xor	eax,eax
2218
@@:
2219
@@:
2219
	cld
2220
	cld
2220
	lodsb
2221
	lodsb
2221
	test	eax,eax
2222
	test	eax,eax
2222
	jnz	@b
2223
	jnz	@b
2223
	mov	ebx,esi
2224
	mov	ebx,esi
2224
	dec	esi
2225
	dec	esi
2225
@@:
2226
@@:
2226
	std
2227
	std
2227
	lodsb
2228
	lodsb
2228
	cmp	esi,edi
2229
	cmp	esi,edi
2229
	jb	.end_err
2230
	jb	.end_err
2230
	cmp	al,'.'
2231
	cmp	al,'.'
2231
	jne	@b
2232
	jne	@b
2232
	
2233
	
2233
	add	esi,2
2234
	add	esi,2
2234
	sub	ebx,esi
2235
	sub	ebx,esi
2235
	mov	[expansion_length],ebx
2236
	mov	[expansion_length],ebx
2236
	cld
2237
	cld
2237
	xor	eax,eax
2238
	xor	eax,eax
2238
	ret
2239
	ret
2239
	
2240
	
2240
.end_err:
2241
.end_err:
2241
	cld
2242
	cld
2242
	xor	eax,eax
2243
	xor	eax,eax
2243
	inc	eax
2244
	inc	eax
2244
	ret
2245
	ret
2245
;---------------------------------------------------------------------
2246
;---------------------------------------------------------------------
2246
compare_expansion:
2247
compare_expansion:
2247
	mov	ebx,[edi]
2248
	mov	ebx,[edi]
2248
	add	ebx,edi
2249
	add	ebx,edi
2249
	add	edi,3
2250
	add	edi,3
2250
.start:
2251
.start:
2251
	cmp	ebx,edi
2252
	cmp	ebx,edi
2252
	jb	.end_err
2253
	jb	.end_err
2253
	mov	ecx,[expansion_length]
2254
	mov	ecx,[expansion_length]
2254
	inc	edi
2255
	inc	edi
2255
	
2256
	
2256
	push	esi edi
2257
	push	esi edi
2257
@@:
2258
@@:
2258
	cld
2259
	cld
2259
	lodsb
2260
	lodsb
2260
	xchg	esi,edi
2261
	xchg	esi,edi
2261
	shl	eax,8
2262
	shl	eax,8
2262
	lodsb
2263
	lodsb
2263
	xchg	esi,edi
2264
	xchg	esi,edi
2264
	call	char_todown
2265
	call	char_todown
2265
	xchg	al,ah
2266
	xchg	al,ah
2266
	call	char_todown
2267
	call	char_todown
2267
	cmp	al,ah
2268
	cmp	al,ah
2268
	jne	@f
2269
	jne	@f
2269
	dec	ecx
2270
	dec	ecx
2270
	jnz	@b
2271
	jnz	@b
2271
	jmp	.end
2272
	jmp	.end
2272
@@:
2273
@@:
2273
	pop	edi esi
2274
	pop	edi esi
2274
	jmp	.start
2275
	jmp	.start
2275
.end:
2276
.end:
2276
	pop	edi esi
2277
	pop	edi esi
2277
	xor	eax,eax
2278
	xor	eax,eax
2278
	ret
2279
	ret
2279
	
2280
	
2280
.end_err:
2281
.end_err:
2281
	xor	eax,eax
2282
	xor	eax,eax
2282
	inc	eax
2283
	inc	eax
2283
	ret
2284
	ret
2284
;---------------------------------------------------------------------
2285
;---------------------------------------------------------------------
2285
prepare_extension_and_mark:
2286
prepare_extension_and_mark:
2286
	mov	esi,[dirinfo.return]
2287
	mov	esi,[dirinfo.return]
2287
	mov	ebp,[esi+4]
2288
	mov	ebp,[esi+4]
2288
	test	ebp,ebp
2289
	test	ebp,ebp
2289
	jz	.end
2290
	jz	.end
2290
 
2291
 
2291
	add	esi,32+40
2292
	add	esi,32+40
2292
.start:
2293
.start:
2293
	push	esi
2294
	push	esi
2294
	call	search_extension_start
2295
	call	search_extension_start
2295
	mov	eax,esi
2296
	mov	eax,esi
2296
	pop	esi
2297
	pop	esi
2297
	sub	eax,esi
2298
	sub	eax,esi
2298
	sub	ebx,esi
2299
	sub	ebx,esi
2299
	shl	eax,16
2300
	shl	eax,16
2300
	mov	ax,bx
2301
	mov	ax,bx
2301
	mov	[esi+300-40],eax
2302
	mov	[esi+300-40],eax
2302
	mov	[esi+299-40],byte 0
2303
	mov	[esi+299-40],byte 0
2303
	add	esi,304
2304
	add	esi,304
2304
	dec	ebp
2305
	dec	ebp
2305
	jnz	.start
2306
	jnz	.start
2306
.end:
2307
.end:
2307
	ret
2308
	ret
2308
;---------------------------------------------------------------------
2309
;---------------------------------------------------------------------
2309
search_extension_start:
2310
search_extension_start:
2310
	mov	edx,esi
2311
	mov	edx,esi
2311
	xor	eax,eax
2312
	xor	eax,eax
2312
	cld
2313
	cld
2313
@@:
2314
@@:
2314
	lodsb
2315
	lodsb
2315
	test	eax,eax
2316
	test	eax,eax
2316
	jnz	@b
2317
	jnz	@b
2317
	dec	esi
2318
	dec	esi
2318
	dec	edx
2319
	dec	edx
2319
	push	esi
2320
	push	esi
2320
	std
2321
	std
2321
@@:
2322
@@:
2322
	lodsb
2323
	lodsb
2323
	cmp	esi,edx
2324
	cmp	esi,edx
2324
	je	.end
2325
	je	.end
2325
	cmp	al,'.'
2326
	cmp	al,'.'
2326
	jnz	@b
2327
	jnz	@b
2327
	add	esi,2
2328
	add	esi,2
2328
	cld
2329
	cld
2329
	pop	ebx
2330
	pop	ebx
2330
	ret
2331
	ret
2331
.end:
2332
.end:
2332
	cld
2333
	cld
2333
	pop	esi
2334
	pop	esi
2334
	mov	ebx,esi
2335
	mov	ebx,esi
2335
	ret
2336
	ret
2336
;---------------------------------------------------------------------
2337
;---------------------------------------------------------------------
2337
delete_point_dir:
2338
delete_point_dir:
2338
	mov	eax,[dirinfo.return]
2339
	mov	eax,[dirinfo.return]
2339
	cmp	[eax+32+40],byte '.'
2340
	cmp	[eax+32+40],byte '.'
2340
	jne	@f
2341
	jne	@f
2341
	cmp	[eax+32+40+1],byte 0
2342
	cmp	[eax+32+40+1],byte 0
2342
	jne	@f
2343
	jne	@f
2343
	mov	edi,eax
2344
	mov	edi,eax
2344
	add	edi,32
2345
	add	edi,32
2345
	mov	esi,edi
2346
	mov	esi,edi
2346
	add	esi,304
2347
	add	esi,304
2347
	mov	ecx,[eax+4]
2348
	mov	ecx,[eax+4]
2348
	dec	ecx
2349
	dec	ecx
2349
	mov	[eax+4],ecx
2350
	mov	[eax+4],ecx
2350
	imul	ecx,304
2351
	imul	ecx,304
2351
	shr	ecx,2
2352
	shr	ecx,2
2352
	cld
2353
	cld
2353
	rep	movsd
2354
	rep	movsd
2354
@@:
2355
@@:
2355
	ret
2356
	ret
2356
;---------------------------------------------------------------------
2357
;---------------------------------------------------------------------
2357
;files_name_normalize:
2358
;files_name_normalize:
2358
;	mov	esi,[dirinfo.return]
2359
;	mov	esi,[dirinfo.return]
2359
;	mov	ebp,[esi+4]
2360
;	mov	ebp,[esi+4]
2360
;	add	esi,32+40
2361
;	add	esi,32+40
2361
;.start:
2362
;.start:
2362
;	push	esi
2363
;	push	esi
2363
;	mov	al,[esi]
2364
;	mov	al,[esi]
2364
;	call	char_toupper
2365
;	call	char_toupper
2365
;	mov	[esi],al
2366
;	mov	[esi],al
2366
;@@:
2367
;@@:
2367
;	inc	esi
2368
;	inc	esi
2368
;	mov	al,[esi]
2369
;	mov	al,[esi]
2369
;	test	al,al
2370
;	test	al,al
2370
;	jz	@f
2371
;	jz	@f
2371
;	call	char_todown
2372
;	call	char_todown
2372
;	mov	[esi],al
2373
;	mov	[esi],al
2373
;	jmp	@b
2374
;	jmp	@b
2374
;@@:
2375
;@@:
2375
;	pop	esi
2376
;	pop	esi
2376
;	add	esi,304
2377
;	add	esi,304
2377
;	dec	ebp
2378
;	dec	ebp
2378
;	jnz	.start
2379
;	jnz	.start
2379
;	ret
2380
;	ret
2380
;---------------------------------------------------------------------
2381
;---------------------------------------------------------------------
2381
char_toupper:
2382
char_toupper:
2382
; convert character to uppercase,using cp866 encoding
2383
; convert character to uppercase,using cp866 encoding
2383
; in: al=symbol
2384
; in: al=symbol
2384
; out: al=converted symbol
2385
; out: al=converted symbol
2385
	cmp	al,'a'
2386
	cmp	al,'a'
2386
	jb	.ret
2387
	jb	.ret
2387
	cmp	al,'z'
2388
	cmp	al,'z'
2388
	jbe	.az
2389
	jbe	.az
2389
	cmp	al,' '
2390
	cmp	al,' '
2390
	jb	.ret
2391
	jb	.ret
2391
	cmp	al,'à'
2392
	cmp	al,'à'
2392
	jb	.rus1
2393
	jb	.rus1
2393
	cmp	al,'ï'
2394
	cmp	al,'ï'
2394
	ja	.ret
2395
	ja	.ret
2395
; 0xE0-0xEF -> 0x90-0x9F
2396
; 0xE0-0xEF -> 0x90-0x9F
2396
	sub	al,'à'-''
2397
	sub	al,'à'-''
2397
.ret:
2398
.ret:
2398
	ret
2399
	ret
2399
.rus1:
2400
.rus1:
2400
; 0xA0-0xAF -> 0x80-0x8F
2401
; 0xA0-0xAF -> 0x80-0x8F
2401
.az:
2402
.az:
2402
	and	al,not	0x20
2403
	and	al,not	0x20
2403
	ret
2404
	ret
2404
;---------------------------------------------------------------------
2405
;---------------------------------------------------------------------
2405
char_todown:
2406
char_todown:
2406
; convert character to uppercase,using cp866 encoding
2407
; convert character to uppercase,using cp866 encoding
2407
; in: al=symbol
2408
; in: al=symbol
2408
; out: al=converted symbol
2409
; out: al=converted symbol
2409
	cmp	al,'A'
2410
	cmp	al,'A'
2410
	jb	.ret
2411
	jb	.ret
2411
	cmp	al,'Z'
2412
	cmp	al,'Z'
2412
	jbe	.az
2413
	jbe	.az
2413
	cmp	al,'€'
2414
	cmp	al,'€'
2414
	jb	.ret
2415
	jb	.ret
2415
	cmp	al,''
2416
	cmp	al,''
2416
	jb	.rus1
2417
	jb	.rus1
2417
	cmp	al,'Ÿ'
2418
	cmp	al,'Ÿ'
2418
	ja	.ret
2419
	ja	.ret
2419
; 0x90-0x9F -> 0xE0-0xEF
2420
; 0x90-0x9F -> 0xE0-0xEF
2420
	add	al,'à'-''
2421
	add	al,'à'-''
2421
.ret:
2422
.ret:
2422
	ret
2423
	ret
2423
.rus1:
2424
.rus1:
2424
; 0x80-0x8F -> 0xA0-0xAF
2425
; 0x80-0x8F -> 0xA0-0xAF
2425
.az:
2426
.az:
2426
	add	al,0x20
2427
	add	al,0x20
2427
	ret
2428
	ret
2428
;---------------------------------------------------------------------
2429
;---------------------------------------------------------------------
2429
copy_file_path:
2430
copy_file_path:
2430
	xor	eax,eax
2431
	xor	eax,eax
2431
	cld
2432
	cld
2432
@@:
2433
@@:
2433
	lodsb
2434
	lodsb
2434
	stosb
2435
	stosb
2435
	test	eax,eax
2436
	test	eax,eax
2436
	jnz	@b
2437
	jnz	@b
2437
	mov	esi,edi
2438
	mov	esi,edi
2438
	dec	esi
2439
	dec	esi
2439
	std
2440
	std
2440
@@:
2441
@@:
2441
	lodsb
2442
	lodsb
2442
	cmp	al,'/'
2443
	cmp	al,'/'
2443
	jnz	@b
2444
	jnz	@b
2444
	mov	edi,esi
2445
	mov	edi,esi
2445
	add	edi,2
2446
	add	edi,2
2446
	mov	esi,ebx
2447
	mov	esi,ebx
2447
	cld
2448
	cld
2448
@@:
2449
@@:
2449
	lodsb
2450
	lodsb
2450
	stosb
2451
	stosb
2451
	test	eax,eax
2452
	test	eax,eax
2452
	jnz	@b
2453
	jnz	@b
2453
	ret
2454
	ret
2454
;---------------------------------------------------------------------
2455
;---------------------------------------------------------------------
2455
copy_dir_path:
2456
copy_dir_path:
2456
	mov	ecx,esi
2457
	mov	ecx,esi
2457
	inc	ecx
2458
	inc	ecx
2458
	inc	ecx
2459
	inc	ecx
2459
	xor	eax,eax
2460
	xor	eax,eax
2460
	cld
2461
	cld
2461
@@:
2462
@@:
2462
	lodsb
2463
	lodsb
2463
	test	eax,eax
2464
	test	eax,eax
2464
	jnz	@b
2465
	jnz	@b
2465
 
2466
 
2466
	cmp	ecx,esi
2467
	cmp	ecx,esi
2467
	jb	@f
2468
	jb	@f
2468
	dec	esi
2469
	dec	esi
2469
@@:
2470
@@:
2470
	mov	[esi-1],byte '/'
2471
	mov	[esi-1],byte '/'
2471
	mov	edi,esi
2472
	mov	edi,esi
2472
	mov	esi,ebx
2473
	mov	esi,ebx
2473
@@:
2474
@@:
2474
	lodsb
2475
	lodsb
2475
	stosb
2476
	stosb
2476
	test	eax,eax
2477
	test	eax,eax
2477
	jnz	@b
2478
	jnz	@b
2478
	ret
2479
	ret
2479
;---------------------------------------------------------------------
2480
;---------------------------------------------------------------------
2480
copy_exit_dir:
2481
copy_exit_dir:
2481
	mov	ebx,esi
2482
	mov	ebx,esi
2482
	inc	ebx
2483
	inc	ebx
2483
	xor	eax,eax
2484
	xor	eax,eax
2484
	cld
2485
	cld
2485
@@:
2486
@@:
2486
	lodsb
2487
	lodsb
2487
	test	eax,eax
2488
	test	eax,eax
2488
	jnz	@b
2489
	jnz	@b
2489
	sub	esi,2
2490
	sub	esi,2
2490
	std
2491
	std
2491
@@:
2492
@@:
2492
	lodsb
2493
	lodsb
2493
	cmp	al,'/'
2494
	cmp	al,'/'
2494
	jnz	@b
2495
	jnz	@b
2495
	xor	eax,eax
2496
	xor	eax,eax
2496
	cmp	ebx,esi
2497
	cmp	ebx,esi
2497
	jb	@f
2498
	jb	@f
2498
	inc	esi
2499
	inc	esi
2499
@@:
2500
@@:
2500
	mov	[esi+1],al
2501
	mov	[esi+1],al
2501
	cld
2502
	cld
2502
	ret
2503
	ret
2503
;---------------------------------------------------------------------
2504
;---------------------------------------------------------------------
2504
copy_dir_name:
2505
copy_dir_name:
2505
	push	esi edi
2506
	push	esi edi
2506
	mov	esi,edi
2507
	mov	esi,edi
2507
	mov	edi,previous_dir_path
2508
	mov	edi,previous_dir_path
2508
	call	.1
2509
	call	.1
2509
	pop	edi esi
2510
	pop	edi esi
2510
.1:
2511
.1:
2511
	xor	eax,eax
2512
	xor	eax,eax
2512
	cmp	[esi],al
2513
	cmp	[esi],al
2513
	je	.exit
2514
	je	.exit
2514
	cld
2515
	cld
2515
@@:
2516
@@:
2516
	lodsb
2517
	lodsb
2517
	stosb
2518
	stosb
2518
	test	eax,eax
2519
	test	eax,eax
2519
	jnz	@b
2520
	jnz	@b
2520
.exit:
2521
.exit:
2521
	ret
2522
	ret
2522
;---------------------------------------------------------------------
2523
;---------------------------------------------------------------------
2523
;---------------------------------------------------------------------
2524
;---------------------------------------------------------------------
2524
 
2525
 
2525
;plugins_directory	db 'plugins/',0
2526
;plugins_directory	db 'plugins/',0
2526
plugins_directory	db 0
2527
plugins_directory	db 0
2527
 
2528
 
2528
system_dir_Boxlib	db '/sys/lib/box_lib.obj',0
2529
system_dir_Boxlib	db '/sys/lib/box_lib.obj',0
2529
system_dir_CnvPNG	db '/sys/lib/cnv_png.obj',0
2530
system_dir_CnvPNG	db '/sys/lib/cnv_png.obj',0
2530
system_dir_Sort 	db '/sys/lib/sort.obj',0
2531
system_dir_Sort 	db '/sys/lib/sort.obj',0
2531
system_dir_UNPACK	db '/sys/lib/archiver.obj',0
2532
system_dir_UNPACK	db '/sys/lib/archiver.obj',0
2532
 
-
 
2533
ihead_f_i:
-
 
2534
ihead_f_l	db 'System      error',0
-
 
2535
 
-
 
2536
er_message_found_lib	db 'box_lib.obj - Not found!',0
-
 
2537
er_message_import	db 'box_lib.obj - Wrong import!',0
-
 
2538
 
-
 
2539
er_message_found_lib2	db 'cnv_png.obj - Not found!',0
-
 
2540
er_message_import2	db 'cnv_png.obj - Wrong import!',0
-
 
2541
 
-
 
2542
err_message_found_lib3	db 'sort.obj - Not found!',0
-
 
2543
err_message_import3	db 'sort.obj - Wrong import!',0
-
 
2544
 
-
 
2545
err_message_found_lib4	db 'archiver.obj - Not found!',0
-
 
2546
err_message_import4	db 'archiver.obj - Wrong import!',0
-
 
2547
 
2533
 
2548
align	4
2534
align	4
2549
l_libs_start:
2535
l_libs_start:
2550
library01	l_libs	system_dir_Boxlib+9,path,file_name,system_dir_Boxlib,\
2536
library01	l_libs	system_dir_Boxlib+9,file_name,system_dir_Boxlib,\
2551
er_message_found_lib,ihead_f_l,Box_lib_import,er_message_import,ihead_f_i,plugins_directory
2537
Box_lib_import,plugins_directory
2552
 
2538
 
2553
library02	l_libs	system_dir_CnvPNG+9,path,file_name,system_dir_CnvPNG,\
2539
library02	l_libs	system_dir_CnvPNG+9,file_name,system_dir_CnvPNG,\
2554
er_message_found_lib2,ihead_f_l,cnv_png_import,er_message_import2,ihead_f_i,plugins_directory
2540
cnv_png_import,plugins_directory
2555
 
2541
 
2556
library03	l_libs	system_dir_Sort+9,path,file_name,system_dir_Sort,\
2542
library03	l_libs	system_dir_Sort+9,file_name,system_dir_Sort,\
2557
err_message_found_lib3,ihead_f_l,Sort_import,err_message_import3,ihead_f_i,plugins_directory
2543
Sort_import,plugins_directory
2558
 
2544
 
2559
library04	l_libs	system_dir_UNPACK+9,path,file_name,system_dir_UNPACK,\
2545
library04	l_libs	system_dir_UNPACK+9,file_name,system_dir_UNPACK,\
2560
err_message_found_lib4,ihead_f_l,UNPACK_import,err_message_import4,ihead_f_i,plugins_directory
2546
UNPACK_import,plugins_directory
2561
 
2547
 
2562
end_l_libs:
2548
end_l_libs:
2563
 
2549
 
2564
;---------------------------------------------------------------------
2550
;---------------------------------------------------------------------
2565
align	4
2551
align	4
2566
UNPACK_import:
2552
UNPACK_import:
2567
;unpack_Version 		dd aUnpack_Version
2553
;unpack_Version 		dd aUnpack_Version
2568
;unpack_PluginLoad		dd aUnpack_PluginLoad	
2554
;unpack_PluginLoad		dd aUnpack_PluginLoad	
2569
;unpack_OpenFilePlugin		dd aUnpack_OpenFilePlugin
2555
;unpack_OpenFilePlugin		dd aUnpack_OpenFilePlugin
2570
;unpack_ClosePlugin		dd aUnpack_ClosePlugin
2556
;unpack_ClosePlugin		dd aUnpack_ClosePlugin
2571
;unpack_ReadFolder		dd aUnpack_ReadFolder	
2557
;unpack_ReadFolder		dd aUnpack_ReadFolder	
2572
;unpack_SetFolder		dd aUnpack_SetFolder
2558
;unpack_SetFolder		dd aUnpack_SetFolder
2573
;unpack_GetFiles		dd aUnpack_GetFiles
2559
;unpack_GetFiles		dd aUnpack_GetFiles
2574
;unpack_GetOpenPluginInfo	dd aUnpack_GetOpenPluginInfo
2560
;unpack_GetOpenPluginInfo	dd aUnpack_GetOpenPluginInfo
2575
;unpack_Getattr 		dd aUnpack_Getattr
2561
;unpack_Getattr 		dd aUnpack_Getattr
2576
;unpack_Open			dd aUnpack_Open
2562
;unpack_Open			dd aUnpack_Open
2577
;unpack_Read			dd aUnpack_Read
2563
;unpack_Read			dd aUnpack_Read
2578
;unpack_Setpos			dd aUnpack_Setpos
2564
;unpack_Setpos			dd aUnpack_Setpos
2579
;unpack_Close			dd aUnpack_Close
2565
;unpack_Close			dd aUnpack_Close
2580
;unpack_DeflateUnpack		dd aUnpack_DeflateUnpack
2566
;unpack_DeflateUnpack		dd aUnpack_DeflateUnpack
2581
unpack_DeflateUnpack2		dd aUnpack_DeflateUnpack2
2567
unpack_DeflateUnpack2		dd aUnpack_DeflateUnpack2
2582
	dd 0
2568
	dd 0
2583
	dd 0
2569
	dd 0
2584
 
2570
 
2585
;aUnpack_Version		db 'version',0
2571
;aUnpack_Version		db 'version',0
2586
;aUnpack_PluginLoad		db 'plugin_load',0
2572
;aUnpack_PluginLoad		db 'plugin_load',0
2587
;aUnpack_OpenFilePlugin 	db 'OpenFilePlugin',0
2573
;aUnpack_OpenFilePlugin 	db 'OpenFilePlugin',0
2588
;aUnpack_ClosePlugin		db 'ClosePlugin',0
2574
;aUnpack_ClosePlugin		db 'ClosePlugin',0
2589
;aUnpack_ReadFolder		db 'ReadFolder',0
2575
;aUnpack_ReadFolder		db 'ReadFolder',0
2590
;aUnpack_SetFolder		db 'SetFolder',0
2576
;aUnpack_SetFolder		db 'SetFolder',0
2591
;aUnpack_GetFiles		db 'GetFiles',0
2577
;aUnpack_GetFiles		db 'GetFiles',0
2592
;aUnpack_GetOpenPluginInfo	db 'GetOpenPluginInfo',0
2578
;aUnpack_GetOpenPluginInfo	db 'GetOpenPluginInfo',0
2593
;aUnpack_Getattr		db 'getattr',0
2579
;aUnpack_Getattr		db 'getattr',0
2594
;aUnpack_Open			db 'open',0
2580
;aUnpack_Open			db 'open',0
2595
;aUnpack_Read			db 'read',0
2581
;aUnpack_Read			db 'read',0
2596
;aUnpack_Setpos 		db 'setpos',0
2582
;aUnpack_Setpos 		db 'setpos',0
2597
;aUnpack_Close			db 'close',0
2583
;aUnpack_Close			db 'close',0
2598
;aUnpack_DeflateUnpack		db 'deflate_unpack',0
2584
;aUnpack_DeflateUnpack		db 'deflate_unpack',0
2599
aUnpack_DeflateUnpack2		db 'deflate_unpack2',0
2585
aUnpack_DeflateUnpack2		db 'deflate_unpack2',0
2600
 
2586
 
2601
;---------------------------------------------------------------------
2587
;---------------------------------------------------------------------
2602
;---------------------------------------------------------------------
2588
;---------------------------------------------------------------------
2603
align	4
2589
align	4
2604
Sort_import:
2590
Sort_import:
2605
sort_init	dd aSort_init
2591
sort_init	dd aSort_init
2606
sort_version	dd aSort_version
2592
sort_version	dd aSort_version
2607
sort_dir	dd aSort_SortDir
2593
sort_dir	dd aSort_SortDir
2608
sort_strcmpi	dd aSort_strcmpi
2594
sort_strcmpi	dd aSort_strcmpi
2609
	dd 0
2595
	dd 0
2610
	dd 0
2596
	dd 0
2611
 
2597
 
2612
aSort_init	db 'START',0
2598
aSort_init	db 'START',0
2613
aSort_version	db 'version',0
2599
aSort_version	db 'version',0
2614
aSort_SortDir	db 'SortDir',0
2600
aSort_SortDir	db 'SortDir',0
2615
aSort_strcmpi	db 'strcmpi',0
2601
aSort_strcmpi	db 'strcmpi',0
2616
 
2602
 
2617
;---------------------------------------------------------------------
2603
;---------------------------------------------------------------------
2618
align	4
2604
align	4
2619
cnv_png_import:
2605
cnv_png_import:
2620
.Start		dd aCP_Start
2606
.Start		dd aCP_Start
2621
.Version	dd aCP_Version
2607
.Version	dd aCP_Version
2622
.Check		dd aCP_Check
2608
.Check		dd aCP_Check
2623
.Assoc		dd aCP_Assoc
2609
.Assoc		dd aCP_Assoc
2624
	dd 0
2610
	dd 0
2625
	dd 0
2611
	dd 0
2626
aCP_Start	db 'START',0
2612
aCP_Start	db 'START',0
2627
aCP_Version	db 'version',0
2613
aCP_Version	db 'version',0
2628
aCP_Check	db 'Check_Header',0
2614
aCP_Check	db 'Check_Header',0
2629
aCP_Assoc	db 'Associations',0
2615
aCP_Assoc	db 'Associations',0
2630
;---------------------------------------------------------------------
2616
;---------------------------------------------------------------------
2631
align	4
2617
align	4
2632
Box_lib_import: 
2618
Box_lib_import: 
2633
;init_lib	dd a_init
2619
;init_lib	dd a_init
2634
;version_lib	dd a_version
2620
;version_lib	dd a_version
2635
 
2621
 
2636
 
2622
 
2637
edit_box_draw		dd aEdit_box_draw
2623
edit_box_draw		dd aEdit_box_draw
2638
edit_box_key		dd aEdit_box_key
2624
edit_box_key		dd aEdit_box_key
2639
edit_box_mouse		dd aEdit_box_mouse
2625
edit_box_mouse		dd aEdit_box_mouse
2640
;version_ed		dd aVersion_ed
2626
;version_ed		dd aVersion_ed
2641
 
2627
 
2642
;check_box_draw dd aCheck_box_draw
2628
;check_box_draw dd aCheck_box_draw
2643
;check_box_mouse	dd aCheck_box_mouse
2629
;check_box_mouse	dd aCheck_box_mouse
2644
;version_ch		dd aVersion_ch
2630
;version_ch		dd aVersion_ch
2645
 
2631
 
2646
;option_box_draw	dd aOption_box_draw
2632
;option_box_draw	dd aOption_box_draw
2647
;option_box_mouse	dd aOption_box_mouse
2633
;option_box_mouse	dd aOption_box_mouse
2648
;version_op		dd aVersion_op
2634
;version_op		dd aVersion_op
2649
 
2635
 
2650
scrollbar_ver_draw	dd aScrollbar_ver_draw
2636
scrollbar_ver_draw	dd aScrollbar_ver_draw
2651
scrollbar_ver_mouse	dd aScrollbar_ver_mouse
2637
scrollbar_ver_mouse	dd aScrollbar_ver_mouse
2652
;scrollbar_hor_draw	dd aScrollbar_hor_draw
2638
;scrollbar_hor_draw	dd aScrollbar_hor_draw
2653
;scrollbar_hor_mouse	dd aScrollbar_hor_mouse
2639
;scrollbar_hor_mouse	dd aScrollbar_hor_mouse
2654
;version_scrollbar	dd aVersion_scrollbar
2640
;version_scrollbar	dd aVersion_scrollbar
2655
 
2641
 
2656
;dinamic_button_draw	dd aDbutton_draw
2642
;dinamic_button_draw	dd aDbutton_draw
2657
;dinamic_button_mouse	dd aDbutton_mouse
2643
;dinamic_button_mouse	dd aDbutton_mouse
2658
;version_dbutton	dd aVersion_dbutton
2644
;version_dbutton	dd aVersion_dbutton
2659
 
2645
 
2660
menu_bar_draw		dd aMenu_bar_draw
2646
menu_bar_draw		dd aMenu_bar_draw
2661
menu_bar_mouse		dd aMenu_bar_mouse
2647
menu_bar_mouse		dd aMenu_bar_mouse
2662
menu_bar_activate	dd aMenu_bar_activate
2648
menu_bar_activate	dd aMenu_bar_activate
2663
;version_menu_bar	dd aVersion_menu_bar
2649
;version_menu_bar	dd aVersion_menu_bar
2664
 
2650
 
2665
FileBrowser_draw	dd aFileBrowser_draw
2651
FileBrowser_draw	dd aFileBrowser_draw
2666
FileBrowser_mouse	dd aFileBrowser_mouse
2652
FileBrowser_mouse	dd aFileBrowser_mouse
2667
FileBrowser_key 	dd aFileBrowser_key
2653
FileBrowser_key 	dd aFileBrowser_key
2668
;Version_FileBrowser	dd aVersion_FileBrowser
2654
;Version_FileBrowser	dd aVersion_FileBrowser
2669
 
2655
 
2670
PathShow_prepare	dd sz_PathShow_prepare
2656
PathShow_prepare	dd sz_PathShow_prepare
2671
PathShow_draw		dd sz_PathShow_draw
2657
PathShow_draw		dd sz_PathShow_draw
2672
;Version_path_show	dd szVersion_path_show
2658
;Version_path_show	dd szVersion_path_show
2673
	dd 0
2659
	dd 0
2674
	dd 0
2660
	dd 0
2675
 
2661
 
2676
;a_init 		db 'lib_init',0
2662
;a_init 		db 'lib_init',0
2677
;a_version		db 'version',0
2663
;a_version		db 'version',0
2678
 
2664
 
2679
aEdit_box_draw		db 'edit_box',0
2665
aEdit_box_draw		db 'edit_box',0
2680
aEdit_box_key		db 'edit_box_key',0
2666
aEdit_box_key		db 'edit_box_key',0
2681
aEdit_box_mouse 	db 'edit_box_mouse',0
2667
aEdit_box_mouse 	db 'edit_box_mouse',0
2682
;aVersion_ed		db 'version_ed',0
2668
;aVersion_ed		db 'version_ed',0
2683
 
2669
 
2684
;aCheck_box_draw	db 'check_box_draw',0
2670
;aCheck_box_draw	db 'check_box_draw',0
2685
;aCheck_box_mouse	db 'check_box_mouse',0
2671
;aCheck_box_mouse	db 'check_box_mouse',0
2686
;aVersion_ch		db 'version_ch',0
2672
;aVersion_ch		db 'version_ch',0
2687
 
2673
 
2688
;aOption_box_draw	db 'option_box_draw',0
2674
;aOption_box_draw	db 'option_box_draw',0
2689
;aOption_box_mouse	db 'option_box_mouse',0
2675
;aOption_box_mouse	db 'option_box_mouse',0
2690
;aVersion_op		db 'version_op',0
2676
;aVersion_op		db 'version_op',0
2691
 
2677
 
2692
aScrollbar_ver_draw	db 'scrollbar_v_draw',0
2678
aScrollbar_ver_draw	db 'scrollbar_v_draw',0
2693
aScrollbar_ver_mouse	db 'scrollbar_v_mouse',0
2679
aScrollbar_ver_mouse	db 'scrollbar_v_mouse',0
2694
;aScrollbar_hor_draw	db 'scrollbar_h_draw',0
2680
;aScrollbar_hor_draw	db 'scrollbar_h_draw',0
2695
;aScrollbar_hor_mouse	db 'scrollbar_h_mouse',0
2681
;aScrollbar_hor_mouse	db 'scrollbar_h_mouse',0
2696
;aVersion_scrollbar	db 'version_scrollbar',0
2682
;aVersion_scrollbar	db 'version_scrollbar',0
2697
 
2683
 
2698
;aDbutton_draw		db 'dbutton_draw',0
2684
;aDbutton_draw		db 'dbutton_draw',0
2699
;aDbutton_mouse 	db 'dbutton_mouse',0
2685
;aDbutton_mouse 	db 'dbutton_mouse',0
2700
;aVersion_dbutton	db 'version_dbutton',0
2686
;aVersion_dbutton	db 'version_dbutton',0
2701
 
2687
 
2702
aMenu_bar_draw		db 'menu_bar_draw',0
2688
aMenu_bar_draw		db 'menu_bar_draw',0
2703
aMenu_bar_mouse 	db 'menu_bar_mouse',0
2689
aMenu_bar_mouse 	db 'menu_bar_mouse',0
2704
aMenu_bar_activate	db 'menu_bar_activate',0
2690
aMenu_bar_activate	db 'menu_bar_activate',0
2705
;aVersion_menu_bar	db 'version_menu_bar',0
2691
;aVersion_menu_bar	db 'version_menu_bar',0
2706
 
2692
 
2707
aFileBrowser_draw	db 'FileBrowser_draw',0
2693
aFileBrowser_draw	db 'FileBrowser_draw',0
2708
aFileBrowser_mouse	db 'FileBrowser_mouse',0
2694
aFileBrowser_mouse	db 'FileBrowser_mouse',0
2709
aFileBrowser_key	db 'FileBrowser_key',0
2695
aFileBrowser_key	db 'FileBrowser_key',0
2710
;aVersion_FileBrowser	db 'version_FileBrowser',0
2696
;aVersion_FileBrowser	db 'version_FileBrowser',0
2711
 
2697
 
2712
sz_PathShow_prepare	db 'PathShow_prepare',0
2698
sz_PathShow_prepare	db 'PathShow_prepare',0
2713
sz_PathShow_draw	db 'PathShow_draw',0
2699
sz_PathShow_draw	db 'PathShow_draw',0
2714
;szVersion_path_show	db 'version_PathShow',0
2700
;szVersion_path_show	db 'version_PathShow',0
2715
;---------------------------------------------------------------------
2701
;---------------------------------------------------------------------
2716
;---------------------------------------------------------------------
2702
;---------------------------------------------------------------------
2717
align	4
2703
align	4
2718
window_high			dd 0
2704
window_high			dd 0
2719
window_width			dd 0
2705
window_width			dd 0
2720
window_status			dd 0
2706
window_status			dd 0
2721
 
2707
 
2722
active_process			dd 0
2708
active_process			dd 0
2723
PID				dd 0
2709
PID				dd 0
2724
sort_type			dd 2
2710
sort_type			dd 2
2725
root_folder_area		dd 0
2711
root_folder_area		dd 0
2726
root_folder_block		dd 0
2712
root_folder_block		dd 0
2727
root1_folder_area		dd 0
2713
root1_folder_area		dd 0
2728
root1_folder_block		dd 0
2714
root1_folder_block		dd 0
2729
temp_counter_1			dd 0
2715
temp_counter_1			dd 0
2730
retrieved_devices_table_counter dd 0
2716
retrieved_devices_table_counter dd 0
2731
communication_area		dd 0
2717
communication_area		dd 0
2732
open_dialog_type		dd 0
2718
open_dialog_type		dd 0
2733
 
2719
 
2734
open_dialog_title_pointer:
2720
open_dialog_title_pointer:
2735
	dd title_0
2721
	dd title_0
2736
	dd title_1
2722
	dd title_1
2737
	dd title_2
2723
	dd title_2
2738
	dd 0
2724
	dd 0
2739
	
2725
	
2740
message_open_dialog_button:
2726
message_open_dialog_button:
2741
	dd message_0
2727
	dd message_0
2742
	dd message_1
2728
	dd message_1
2743
	dd message_2
2729
	dd message_2
2744
	dd 0
2730
	dd 0
2745
;---------------------------------------------------------------------
2731
;---------------------------------------------------------------------
2746
expansion_length	dd 0
2732
expansion_length	dd 0
2747
;---------------------------------------------------------------------
2733
;---------------------------------------------------------------------
2748
N_error 		dd 0
2734
N_error 		dd 0
2749
error_type		dd 0
2735
error_type		dd 0
2750
error_path		dd 0
2736
error_path		dd 0
2751
error_window_x: 	dd 100 shl 16+250
2737
error_window_x: 	dd 100 shl 16+250
2752
error_window_y: 	dd 100 shl 16+120
2738
error_window_y: 	dd 100 shl 16+120
2753
;---------------------------------------------------------------------
2739
;---------------------------------------------------------------------
2754
mouse_scroll_data:
2740
mouse_scroll_data:
2755
.vertical	dw 0
2741
.vertical	dw 0
2756
.horizontal	dw 0
2742
.horizontal	dw 0
2757
 
2743
 
2758
mouse_position:
2744
mouse_position:
2759
.y	dw 0
2745
.y	dw 0
2760
.x	dw 0
2746
.x	dw 0
2761
;---------------------------------------------------------------------
2747
;---------------------------------------------------------------------
2762
; not	change	this	section!!!
2748
; not	change	this	section!!!
2763
; start section
2749
; start section
2764
;---------------------------------------------------------------------
2750
;---------------------------------------------------------------------
2765
align	4
2751
align	4
2766
image_file	dd 0
2752
image_file	dd 0
2767
raw_pointer	dd 0
2753
raw_pointer	dd 0
2768
return_code	dd 0
2754
return_code	dd 0
2769
img_size	dd 0
2755
img_size	dd 0
2770
deflate_unpack	dd 0
2756
deflate_unpack	dd 0
2771
raw_pointer_2	dd 0	;+20
2757
raw_pointer_2	dd 0	;+20
2772
;---------------------------------------------------------------------
2758
;---------------------------------------------------------------------
2773
; end	section
2759
; end	section
2774
;---------------------------------------------------------------------
2760
;---------------------------------------------------------------------
2775
align	4
2761
align	4
2776
fileinfo:
2762
fileinfo:
2777
.subfunction	dd 5
2763
.subfunction	dd 5
2778
.Offset 	dd 0
2764
.Offset 	dd 0
2779
.Offset_1	dd 0
2765
.Offset_1	dd 0
2780
.size		dd 0
2766
.size		dd 0
2781
.return 	dd file_info
2767
.return 	dd file_info
2782
		db 0
2768
		db 0
2783
.name:		dd file_name
2769
.name:		dd file_name
2784
;---------------------------------------------------------------------
2770
;---------------------------------------------------------------------
2785
align	4
2771
align	4
2786
dirinfo:
2772
dirinfo:
2787
.subfunction	dd 1
2773
.subfunction	dd 1
2788
.start		dd 0
2774
.start		dd 0
2789
.flags		dd 0
2775
.flags		dd 0
2790
.size		dd 0
2776
.size		dd 0
2791
.return 	dd 0
2777
.return 	dd 0
2792
		db 0
2778
		db 0
2793
.name:		dd dir_path
2779
.name:		dd dir_path
2794
;---------------------------------------------------------------------
2780
;---------------------------------------------------------------------
2795
align	4
2781
align	4
2796
dir_header:
2782
dir_header:
2797
.version	dd 0	;+0
2783
.version	dd 0	;+0
2798
.curn_blocks	dd 0	;+4
2784
.curn_blocks	dd 0	;+4
2799
.totl_blocks	dd 0	;+8
2785
.totl_blocks	dd 0	;+8
2800
.other	rb	20
2786
.other	rb	20
2801
;---------------------------------------------------------------------
2787
;---------------------------------------------------------------------
2802
load_ini_error_type:
2788
load_ini_error_type:
2803
	db 'Error loading INI file',0
2789
	db 'Error loading INI file',0
2804
 
2790
 
2805
load_icons_error_type:
2791
load_icons_error_type:
2806
	db 'Error loading of icons file',0
2792
	db 'Error loading of icons file',0
2807
 
2793
 
2808
memory_free_error_type:
2794
memory_free_error_type:
2809
	db 'Error of free memory',0
2795
	db 'Error of free memory',0
2810
 
2796
 
2811
memory_get_error_type:
2797
memory_get_error_type:
2812
	db 'Memory allocation error',0
2798
	db 'Memory allocation error',0
2813
 
2799
 
2814
load_directory_error_type:
2800
load_directory_error_type:
2815
	db 'Error loading directory',0
2801
	db 'Error loading directory',0
2816
 
2802
 
2817
convert_icons_error_type:
2803
convert_icons_error_type:
2818
	db 'Unsupported or corrupt data for icons file',0
2804
	db 'Unsupported or corrupt data for icons file',0
2819
;---------------------------------------------------------------------
2805
;---------------------------------------------------------------------
2820
error_help_text:
2806
error_help_text:
2821
	db 'For continue press  key or ',0
2807
	db 'For continue press  key or ',0
2822
;---------------------------------------------------------------------
2808
;---------------------------------------------------------------------
2823
align	4
2809
align	4
2824
error_fs_text_pointers:
2810
error_fs_text_pointers:
2825
	dd error_fs_text_0
2811
	dd error_fs_text_0
2826
	dd error_fs_text_1
2812
	dd error_fs_text_1
2827
	dd error_fs_text_2
2813
	dd error_fs_text_2
2828
	dd error_fs_text_3
2814
	dd error_fs_text_3
2829
	dd error_fs_text_4
2815
	dd error_fs_text_4
2830
	dd error_fs_text_5
2816
	dd error_fs_text_5
2831
	dd error_fs_text_6
2817
	dd error_fs_text_6
2832
	dd error_fs_text_7
2818
	dd error_fs_text_7
2833
	dd error_fs_text_8
2819
	dd error_fs_text_8
2834
	dd error_fs_text_9
2820
	dd error_fs_text_9
2835
	dd error_fs_text_10
2821
	dd error_fs_text_10
2836
	dd error_fs_text_11
2822
	dd error_fs_text_11
2837
 
2823
 
2838
error_fs_text_0:	db '0 - Success full',0
2824
error_fs_text_0:	db '0 - Success full',0
2839
error_fs_text_1:	db '1 - Base and/or partition of a hard disk is not defined',0
2825
error_fs_text_1:	db '1 - Base and/or partition of a hard disk is not defined',0
2840
error_fs_text_2:	db '2 - Function is not supported for the given file system',0
2826
error_fs_text_2:	db '2 - Function is not supported for the given file system',0
2841
error_fs_text_3:	db '3 - Unknown file system',0
2827
error_fs_text_3:	db '3 - Unknown file system',0
2842
error_fs_text_4:	db '4 - Reserved, is never returned in the current implementation',0
2828
error_fs_text_4:	db '4 - Reserved, is never returned in the current implementation',0
2843
error_fs_text_5:	db '5 - File not found',0
2829
error_fs_text_5:	db '5 - File not found',0
2844
error_fs_text_6:	db '6 - End of file, EOF',0
2830
error_fs_text_6:	db '6 - End of file, EOF',0
2845
error_fs_text_7:	db '7 - Pointer lies outside of application memory',0
2831
error_fs_text_7:	db '7 - Pointer lies outside of application memory',0
2846
error_fs_text_8:	db '8 - Disk is full',0
2832
error_fs_text_8:	db '8 - Disk is full',0
2847
error_fs_text_9:	db '9 - FAT table is destroyed',0
2833
error_fs_text_9:	db '9 - FAT table is destroyed',0
2848
error_fs_text_10:	db '10 - Access denied',0
2834
error_fs_text_10:	db '10 - Access denied',0
2849
error_fs_text_11:	db '11 - Device error',0
2835
error_fs_text_11:	db '11 - Device error',0
2850
;---------------------------------------------------------------------
2836
;---------------------------------------------------------------------
2851
 
2837
 
2852
extended_key	db 0
2838
extended_key	db 0
2853
 
2839
 
2854
shift_flag	db 0
2840
shift_flag	db 0
2855
ctrl_flag	db 0
2841
ctrl_flag	db 0
2856
alt_flag	db 0
2842
alt_flag	db 0
2857
 
2843
 
2858
error_window	db 0
2844
error_window	db 0
2859
 
2845
 
2860
Tab_key 	db 0
2846
Tab_key 	db 0
2861
Tab_key_block	db 0
2847
Tab_key_block	db 0
2862
 
2848
 
2863
filter_flag	db 1
2849
filter_flag	db 1
2864
 
2850
 
2865
focus_pointer	db 0
2851
focus_pointer	db 0
2866
;---------------------------------------------------------------------
2852
;---------------------------------------------------------------------
2867
start_pach:
2853
start_pach:
2868
	db '/rd/1',0
2854
	db '/rd/1',0
2869
 
2855
 
2870
root_pach:
2856
root_pach:
2871
	db '/',0
2857
	db '/',0
2872
 
2858
 
2873
icons_file_name_2 db 'buttons/'
2859
icons_file_name_2 db 'buttons/'
2874
icons_path        db '/sys/icons16.png',0
2860
icons_path        db '/sys/icons16.png',0
2875
ini_file_name     db '/sys/File managers/icons.ini',0
2861
ini_file_name     db '/sys/File managers/icons.ini',0
2876
;---------------------------------------------------------------------
2862
;---------------------------------------------------------------------
2877
 
2863
 
2878
message:
2864
message:
2879
	db 'Press any key...',0
2865
	db 'Press any key...',0
2880
 
2866
 
2881
message_cancel_button:
2867
message_cancel_button:
2882
	db 'Cancel',0
2868
	db 'Cancel',0
2883
 
2869
 
2884
message_ReloadDir_button:
2870
message_ReloadDir_button:
2885
	db 'Refresh',0
2871
	db 'Refresh',0
2886
 
2872
 
2887
message_ExitDir_button:
2873
message_ExitDir_button:
2888
	db '^',0
2874
	db '^',0
2889
 
2875
 
2890
message_file_name:
2876
message_file_name:
2891
	db 'File name:',0
2877
	db 'File name:',0
2892
	
2878
	
2893
message_0:
2879
message_0:
2894
	db ' Open ',0
2880
	db ' Open ',0
2895
message_1:
2881
message_1:
2896
	db ' Save ',0
2882
	db ' Save ',0
2897
message_2:
2883
message_2:
2898
	db 'Select',0
2884
	db 'Select',0
2899
	
2885
	
2900
title_0:
2886
title_0:
2901
	db 'Open Dialog',0
2887
	db 'Open Dialog',0
2902
title_1:
2888
title_1:
2903
	db 'Save Dialog',0
2889
	db 'Save Dialog',0
2904
title_2:
2890
title_2:
2905
	db 'Select Dir',0
2891
	db 'Select Dir',0
2906
;---------------------------------------------------------------------
2892
;---------------------------------------------------------------------
2907
align 4
2893
align 4
2908
menu_data_1:
2894
menu_data_1:
2909
.type:		dd 1   ;+0
2895
.type:		dd 1   ;+0
2910
.x:
2896
.x:
2911
.size_x 	dw 80  ;+4
2897
.size_x 	dw 80  ;+4
2912
.start_x	dw 10	;+6
2898
.start_x	dw 10	;+6
2913
.y:
2899
.y:
2914
.size_y 	dw 15	;+8
2900
.size_y 	dw 15	;+8
2915
.start_y	dw 26  ;+10
2901
.start_y	dw 26  ;+10
2916
.text_pointer:	dd menu_text_area_1  ;0 ;+12
2902
.text_pointer:	dd menu_text_area_1  ;0 ;+12
2917
.pos_pointer:	dd menu_text_area_1_1 ;0 ;+16
2903
.pos_pointer:	dd menu_text_area_1_1 ;0 ;+16
2918
.text_end	dd menu_text_area_1_1 ;0 ;+20
2904
.text_end	dd menu_text_area_1_1 ;0 ;+20
2919
.ret_key	dd 0  ;+24
2905
.ret_key	dd 0  ;+24
2920
.mouse_keys	dd 0  ;+28
2906
.mouse_keys	dd 0  ;+28
2921
.x1:
2907
.x1:
2922
.size_x1	dw 80  ;+32
2908
.size_x1	dw 80  ;+32
2923
.start_x1	dw 10	;+34
2909
.start_x1	dw 10	;+34
2924
.y1:
2910
.y1:
2925
.size_y1	dw 100	 ;+36
2911
.size_y1	dw 100	 ;+36
2926
.start_y1	dw 41  ;+38
2912
.start_y1	dw 41  ;+38
2927
.bckg_col	dd 0xffffff  ;0xe5e5e5 ;+40
2913
.bckg_col	dd 0xffffff  ;0xe5e5e5 ;+40
2928
.frnt_col	dd 0xff ;+44
2914
.frnt_col	dd 0xff ;+44
2929
.menu_col	dd 0xeef0ff ;0xffffff ;+48
2915
.menu_col	dd 0xeef0ff ;0xffffff ;+48
2930
.select 	dd 0 ;+52
2916
.select 	dd 0 ;+52
2931
.out_select	dd 0 ;+56
2917
.out_select	dd 0 ;+56
2932
.buf_adress	dd 0 ;+60
2918
.buf_adress	dd 0 ;+60
2933
.procinfo	dd procinfo ;+64
2919
.procinfo	dd procinfo ;+64
2934
.click		dd 0 ;+68
2920
.click		dd 0 ;+68
2935
.cursor 	dd 0 ;+72
2921
.cursor 	dd 0 ;+72
2936
.cursor_old	dd 0 ;+76
2922
.cursor_old	dd 0 ;+76
2937
.interval	dd 16 ;+80
2923
.interval	dd 16 ;+80
2938
.cursor_max	dd 0 ;+84
2924
.cursor_max	dd 0 ;+84
2939
.extended_key	dd 0 ;+88
2925
.extended_key	dd 0 ;+88
2940
.menu_sel_col	dd 0x00cc00 ;+92
2926
.menu_sel_col	dd 0x00cc00 ;+92
2941
.bckg_text_col	dd 0 ; +96
2927
.bckg_text_col	dd 0 ; +96
2942
.frnt_text_col	dd 0xffffff ;+100
2928
.frnt_text_col	dd 0xffffff ;+100
2943
.mouse_keys_old dd 0 ;+104
2929
.mouse_keys_old dd 0 ;+104
2944
.font_height	dd 8 ;+108
2930
.font_height	dd 8 ;+108
2945
.cursor_out	dd 0 ;+112
2931
.cursor_out	dd 0 ;+112
2946
.get_mouse_flag dd 0 ;+116
2932
.get_mouse_flag dd 0 ;+116
2947
;---------------------------------------------------------------------
2933
;---------------------------------------------------------------------
2948
menu_text_area_1:
2934
menu_text_area_1:
2949
db 'Select Disk',0
2935
db 'Select Disk',0
2950
;---------------------------------------------------------------------
2936
;---------------------------------------------------------------------
2951
align 4
2937
align 4
2952
menu_data_2:
2938
menu_data_2:
2953
.type:		dd 0   ;+0
2939
.type:		dd 0   ;+0
2954
.x:
2940
.x:
2955
.size_x 	dw 30  ;+4
2941
.size_x 	dw 30  ;+4
2956
.start_x	dw 95	;+6
2942
.start_x	dw 95	;+6
2957
.y:
2943
.y:
2958
.size_y 	dw 15	;+8
2944
.size_y 	dw 15	;+8
2959
.start_y	dw 26  ;+10
2945
.start_y	dw 26  ;+10
2960
.text_pointer:	dd menu_text_area_2  ;0 ;+12
2946
.text_pointer:	dd menu_text_area_2  ;0 ;+12
2961
.pos_pointer:	dd menu_text_area_2.1 ;0 ;+16
2947
.pos_pointer:	dd menu_text_area_2.1 ;0 ;+16
2962
.text_end	dd menu_text_area_2.end ;0 ;+20
2948
.text_end	dd menu_text_area_2.end ;0 ;+20
2963
.ret_key	dd 0  ;+24
2949
.ret_key	dd 0  ;+24
2964
.mouse_keys	dd 0  ;+28
2950
.mouse_keys	dd 0  ;+28
2965
.x1:
2951
.x1:
2966
.size_x1	dw 30  ;+32
2952
.size_x1	dw 30  ;+32
2967
.start_x1	dw 95	;+34
2953
.start_x1	dw 95	;+34
2968
.y1:
2954
.y1:
2969
.size_y1	dw 100	 ;+36
2955
.size_y1	dw 100	 ;+36
2970
.start_y1	dw 41  ;+38
2956
.start_y1	dw 41  ;+38
2971
.bckg_col	dd 0xffffff ; 0xe5e5e5 ;+40
2957
.bckg_col	dd 0xffffff ; 0xe5e5e5 ;+40
2972
.frnt_col	dd 0xff ;+44
2958
.frnt_col	dd 0xff ;+44
2973
.menu_col	dd 0xeef0ff  ;0xffffff ;+48
2959
.menu_col	dd 0xeef0ff  ;0xffffff ;+48
2974
.select 	dd 0 ;+52
2960
.select 	dd 0 ;+52
2975
.out_select	dd 0 ;+56
2961
.out_select	dd 0 ;+56
2976
.buf_adress	dd 0 ;+60
2962
.buf_adress	dd 0 ;+60
2977
.procinfo	dd procinfo ;+64
2963
.procinfo	dd procinfo ;+64
2978
.click		dd 0 ;+68
2964
.click		dd 0 ;+68
2979
.cursor 	dd 0 ;+72
2965
.cursor 	dd 0 ;+72
2980
.cursor_old	dd 0 ;+76
2966
.cursor_old	dd 0 ;+76
2981
.interval	dd 16 ;+80
2967
.interval	dd 16 ;+80
2982
.cursor_max	dd 0 ;+84
2968
.cursor_max	dd 0 ;+84
2983
.extended_key	dd 0 ;+88
2969
.extended_key	dd 0 ;+88
2984
.menu_sel_col	dd 0x00cc00 ;+92
2970
.menu_sel_col	dd 0x00cc00 ;+92
2985
.bckg_text_col	dd 0 ; +96
2971
.bckg_text_col	dd 0 ; +96
2986
.frnt_text_col	dd 0xffffff ;+100
2972
.frnt_text_col	dd 0xffffff ;+100
2987
.mouse_keys_old dd 0 ;+104
2973
.mouse_keys_old dd 0 ;+104
2988
.font_height	dd 8 ;+108
2974
.font_height	dd 8 ;+108
2989
.cursor_out	dd 0 ;+112
2975
.cursor_out	dd 0 ;+112
2990
.get_mouse_flag dd 0 ;+116
2976
.get_mouse_flag dd 0 ;+116
2991
;---------------------------------------------------------------------
2977
;---------------------------------------------------------------------
2992
menu_text_area_2:
2978
menu_text_area_2:
2993
db 'Sort',0
2979
db 'Sort',0
2994
.1:
2980
.1:
2995
db 'Name',0
2981
db 'Name',0
2996
db 'Type',0
2982
db 'Type',0
2997
db 'Date',0
2983
db 'Date',0
2998
db 'Size',0
2984
db 'Size',0
2999
.end:
2985
.end:
3000
db 0
2986
db 0
3001
;---------------------------------------------------------------------
2987
;---------------------------------------------------------------------
3002
align 4
2988
align 4
3003
menu_data_3:
2989
menu_data_3:
3004
.type:		dd 0   ;+0
2990
.type:		dd 0   ;+0
3005
.x:
2991
.x:
3006
.size_x 	dw 45  ;+4
2992
.size_x 	dw 45  ;+4
3007
.start_x	dw 130	 ;+6
2993
.start_x	dw 130	 ;+6
3008
.y:
2994
.y:
3009
.size_y 	dw 15	;+8
2995
.size_y 	dw 15	;+8
3010
.start_y	dw 26  ;+10
2996
.start_y	dw 26  ;+10
3011
.text_pointer:	dd menu_text_area_3  ;0 ;+12
2997
.text_pointer:	dd menu_text_area_3  ;0 ;+12
3012
.pos_pointer:	dd menu_text_area_3.1 ;0 ;+16
2998
.pos_pointer:	dd menu_text_area_3.1 ;0 ;+16
3013
.text_end	dd menu_text_area_3.end ;0 ;+20
2999
.text_end	dd menu_text_area_3.end ;0 ;+20
3014
.ret_key	dd 0  ;+24
3000
.ret_key	dd 0  ;+24
3015
.mouse_keys	dd 0  ;+28
3001
.mouse_keys	dd 0  ;+28
3016
.x1:
3002
.x1:
3017
.size_x1	dw 95  ;+32
3003
.size_x1	dw 95  ;+32
3018
.start_x1	dw 130	 ;+34
3004
.start_x1	dw 130	 ;+34
3019
.y1:
3005
.y1:
3020
.size_y1	dw 100	 ;+36
3006
.size_y1	dw 100	 ;+36
3021
.start_y1	dw 41  ;+38
3007
.start_y1	dw 41  ;+38
3022
.bckg_col	dd 0xffffff ; 0xe5e5e5 ;+40
3008
.bckg_col	dd 0xffffff ; 0xe5e5e5 ;+40
3023
.frnt_col	dd 0xff ;+44
3009
.frnt_col	dd 0xff ;+44
3024
.menu_col	dd 0xeef0ff  ;0xffffff ;+48
3010
.menu_col	dd 0xeef0ff  ;0xffffff ;+48
3025
.select 	dd 0 ;+52
3011
.select 	dd 0 ;+52
3026
.out_select	dd 0 ;+56
3012
.out_select	dd 0 ;+56
3027
.buf_adress	dd 0 ;+60
3013
.buf_adress	dd 0 ;+60
3028
.procinfo	dd procinfo ;+64
3014
.procinfo	dd procinfo ;+64
3029
.click		dd 0 ;+68
3015
.click		dd 0 ;+68
3030
.cursor 	dd 0 ;+72
3016
.cursor 	dd 0 ;+72
3031
.cursor_old	dd 0 ;+76
3017
.cursor_old	dd 0 ;+76
3032
.interval	dd 16 ;+80
3018
.interval	dd 16 ;+80
3033
.cursor_max	dd 0 ;+84
3019
.cursor_max	dd 0 ;+84
3034
.extended_key	dd 0 ;+88
3020
.extended_key	dd 0 ;+88
3035
.menu_sel_col	dd 0x00cc00 ;+92
3021
.menu_sel_col	dd 0x00cc00 ;+92
3036
.bckg_text_col	dd 0 ; +96
3022
.bckg_text_col	dd 0 ; +96
3037
.frnt_text_col	dd 0xffffff ;+100
3023
.frnt_text_col	dd 0xffffff ;+100
3038
.mouse_keys_old dd 0 ;+104
3024
.mouse_keys_old dd 0 ;+104
3039
.font_height	dd 8 ;+108
3025
.font_height	dd 8 ;+108
3040
.cursor_out	dd 0 ;+112
3026
.cursor_out	dd 0 ;+112
3041
.get_mouse_flag dd 0 ;+116
3027
.get_mouse_flag dd 0 ;+116
3042
;---------------------------------------------------------------------
3028
;---------------------------------------------------------------------
3043
menu_text_area_3:
3029
menu_text_area_3:
3044
db 'Filter',0
3030
db 'Filter',0
3045
.1:
3031
.1:
3046
db '*.* - show all',0
3032
db '*.* - show all',0
3047
db 'Only supported',0
3033
db 'Only supported',0
3048
.end:
3034
.end:
3049
db 0
3035
db 0
3050
;---------------------------------------------------------------------
3036
;---------------------------------------------------------------------
3051
 
3037
 
3052
align 4
3038
align 4
3053
scroll_bar_data_vertical:
3039
scroll_bar_data_vertical:
3054
.x:
3040
.x:
3055
.size_x 	dw 15 ;+0
3041
.size_x 	dw 15 ;+0
3056
.start_x	dw 500 ;+2
3042
.start_x	dw 500 ;+2
3057
.y:
3043
.y:
3058
.size_y 	dw 300 ;+4
3044
.size_y 	dw 300 ;+4
3059
.start_y	dw 45 ;+6
3045
.start_y	dw 45 ;+6
3060
.btn_high	dd 15 ;+8
3046
.btn_high	dd 15 ;+8
3061
.type		dd 2  ;+12
3047
.type		dd 2  ;+12
3062
.max_area	dd 10  ;+16
3048
.max_area	dd 10  ;+16
3063
.cur_area	dd 2  ;+20
3049
.cur_area	dd 2  ;+20
3064
.position	dd 0  ;+24
3050
.position	dd 0  ;+24
3065
.bckg_col	dd 0xeeeeee ;+28
3051
.bckg_col	dd 0xeeeeee ;+28
3066
.frnt_col	dd 0xbbddff ;+32 ;0x8aeaa0
3052
.frnt_col	dd 0xbbddff ;+32 ;0x8aeaa0
3067
.line_col	dd 0  ;+36
3053
.line_col	dd 0  ;+36
3068
.redraw 	dd 0  ;+40
3054
.redraw 	dd 0  ;+40
3069
.delta		dw 0  ;+44
3055
.delta		dw 0  ;+44
3070
.delta2 	dw 0  ;+46
3056
.delta2 	dw 0  ;+46
3071
.run_x:
3057
.run_x:
3072
.r_size_x	dw 0  ;+48
3058
.r_size_x	dw 0  ;+48
3073
.r_start_x	dw 0  ;+50
3059
.r_start_x	dw 0  ;+50
3074
.run_y:
3060
.run_y:
3075
.r_size_y	dw 0 ;+52
3061
.r_size_y	dw 0 ;+52
3076
.r_start_y	dw 0 ;+54
3062
.r_start_y	dw 0 ;+54
3077
.m_pos		dd 0 ;+56
3063
.m_pos		dd 0 ;+56
3078
.m_pos_2	dd 0 ;+60
3064
.m_pos_2	dd 0 ;+60
3079
.m_keys 	dd 0 ;+64
3065
.m_keys 	dd 0 ;+64
3080
.run_size	dd 0 ;+68
3066
.run_size	dd 0 ;+68
3081
.position2	dd 0 ;+72
3067
.position2	dd 0 ;+72
3082
.work_size	dd 0 ;+76
3068
.work_size	dd 0 ;+76
3083
.all_redraw	dd 0 ;+80
3069
.all_redraw	dd 0 ;+80
3084
.ar_offset	dd 1 ;+84
3070
.ar_offset	dd 1 ;+84
3085
;---------------------------------------------------------------------
3071
;---------------------------------------------------------------------
3086
align 4
3072
align 4
3087
file_browser_data_1:
3073
file_browser_data_1:
3088
.type				dd 0 ;+0
3074
.type				dd 0 ;+0
3089
.x:
3075
.x:
3090
.size_x 			dw 400 ;+4
3076
.size_x 			dw 400 ;+4
3091
.start_x			dw 10 ;+6
3077
.start_x			dw 10 ;+6
3092
.y:
3078
.y:
3093
.size_y 			dw 550 ;+8
3079
.size_y 			dw 550 ;+8
3094
.start_y			dw 45 ;+10
3080
.start_y			dw 45 ;+10
3095
.icon_size_y			dw 16 ; +12
3081
.icon_size_y			dw 16 ; +12
3096
.icon_size_x			dw 16 ; +14
3082
.icon_size_x			dw 16 ; +14
3097
.line_size_x			dw 0 ; +16
3083
.line_size_x			dw 0 ; +16
3098
.line_size_y			dw 18 ; +18
3084
.line_size_y			dw 18 ; +18
3099
.type_size_x			dw 0 ; +20
3085
.type_size_x			dw 0 ; +20
3100
.size_size_x			dw 0 ; +22
3086
.size_size_x			dw 0 ; +22
3101
.date_size_x			dw 0 ; +24
3087
.date_size_x			dw 0 ; +24
3102
.attributes_size_x		dw 0 ; +26
3088
.attributes_size_x		dw 0 ; +26
3103
.icon_assoc_area		dd 0 ; +28
3089
.icon_assoc_area		dd 0 ; +28
3104
.icon_raw_area			dd 0 ; +32
3090
.icon_raw_area			dd 0 ; +32
3105
.resolution_raw 		dd 0 ; +36
3091
.resolution_raw 		dd 0 ; +36
3106
.palette_raw			dd 0 ; +40
3092
.palette_raw			dd 0 ; +40
3107
.directory_path_area		dd 0 ; +44
3093
.directory_path_area		dd 0 ; +44
3108
.file_name_area 		dd 0 ; +48
3094
.file_name_area 		dd 0 ; +48
3109
.select_flag			dd 0 ; +52
3095
.select_flag			dd 0 ; +52
3110
.background_color		dd 0xffffff ; +56
3096
.background_color		dd 0xffffff ; +56
3111
.select_color			dd 0xbbddff ; +60
3097
.select_color			dd 0xbbddff ; +60
3112
.seclect_text_color		dd 0 ; +64
3098
.seclect_text_color		dd 0 ; +64
3113
.text_color			dd 0 ; +68
3099
.text_color			dd 0 ; +68
3114
.reduct_text_color		dd 0xff0000 ; +72
3100
.reduct_text_color		dd 0xff0000 ; +72
3115
.marked_text_color		dd 0 ; +76
3101
.marked_text_color		dd 0 ; +76
3116
.max_panel_line 		dd 0 ; +80
3102
.max_panel_line 		dd 0 ; +80
3117
.select_panel_counter		dd 1 ; +84
3103
.select_panel_counter		dd 1 ; +84
3118
.folder_block			dd 0 ; +88
3104
.folder_block			dd 0 ; +88
3119
.start_draw_line		dd 0 ; +92
3105
.start_draw_line		dd 0 ; +92
3120
.start_draw_cursor_line 	dw 0 ; +96 ; pixels
3106
.start_draw_cursor_line 	dw 0 ; +96 ; pixels
3121
.folder_data			dd 0 ; +98
3107
.folder_data			dd 0 ; +98
3122
.temp_counter			dd 0 ; +102
3108
.temp_counter			dd 0 ; +102
3123
.file_name_length		dd 0 ; +106
3109
.file_name_length		dd 0 ; +106
3124
.marked_file			dd 0 ; +110
3110
.marked_file			dd 0 ; +110
3125
.extension_size 		dd 0 ; +114
3111
.extension_size 		dd 0 ; +114
3126
.extension_start		dd 0 ; +118
3112
.extension_start		dd 0 ; +118
3127
.type_table			dd features_table ; +122
3113
.type_table			dd features_table ; +122
3128
.ini_file_start 		dd 0 ; +126
3114
.ini_file_start 		dd 0 ; +126
3129
.ini_file_end			dd 0 ; +130
3115
.ini_file_end			dd 0 ; +130
3130
.draw_scroll_bar		dd 0 ; +134
3116
.draw_scroll_bar		dd 0 ; +134
3131
.font_size_y			dw 9 ; +138
3117
.font_size_y			dw 9 ; +138
3132
.font_size_x			dw 6 ; +140
3118
.font_size_x			dw 6 ; +140
3133
.mouse_keys			dd 0 ; +142
3119
.mouse_keys			dd 0 ; +142
3134
.mouse_keys_old 		dd 0 ; +146
3120
.mouse_keys_old 		dd 0 ; +146
3135
.mouse_pos			dd 0 ; +150
3121
.mouse_pos			dd 0 ; +150
3136
.mouse_keys_delta		dd 0 ; +154
3122
.mouse_keys_delta		dd 0 ; +154
3137
.mouse_key_delay		dd 50 ; +158
3123
.mouse_key_delay		dd 50 ; +158
3138
.mouse_keys_tick		dd 0 ; +162
3124
.mouse_keys_tick		dd 0 ; +162
3139
.start_draw_cursor_line_2	dw 0 ;+166
3125
.start_draw_cursor_line_2	dw 0 ;+166
3140
.all_redraw			dd 0 ;+168
3126
.all_redraw			dd 0 ;+168
3141
.selected_BDVK_adress		dd 0 ;+172
3127
.selected_BDVK_adress		dd 0 ;+172
3142
.key_action			dw 0 ;+176
3128
.key_action			dw 0 ;+176
3143
.key_action_num 		dw 0 ;+178
3129
.key_action_num 		dw 0 ;+178
3144
.name_temp_area 		dd name_temp_area ;+180
3130
.name_temp_area 		dd name_temp_area ;+180
3145
.max_name_temp_size		dd 0 ;+184
3131
.max_name_temp_size		dd 0 ;+184
3146
.display_name_max_length	dd 0 ;+188
3132
.display_name_max_length	dd 0 ;+188
3147
.draw_panel_selection_flag	dd 0 ;+192
3133
.draw_panel_selection_flag	dd 0 ;+192
3148
.mouse_pos_old			dd 0 ;+196
3134
.mouse_pos_old			dd 0 ;+196
3149
.marked_counter 		dd 0 ;+200
3135
.marked_counter 		dd 0 ;+200
3150
.keymap_pointer 		dd keymap_area ;+204
3136
.keymap_pointer 		dd keymap_area ;+204
3151
;---------------------------------------------------------------------
3137
;---------------------------------------------------------------------
3152
PathShow_data_1:
3138
PathShow_data_1:
3153
.type			dd 0	;+0
3139
.type			dd 0	;+0
3154
.start_y		dw 11	;+4
3140
.start_y		dw 11	;+4
3155
.start_x		dw 10	;+6
3141
.start_x		dw 10	;+6
3156
.font_size_x		dw 6	;+8	; 6 - for font 0, 8 - for font 1
3142
.font_size_x		dw 6	;+8	; 6 - for font 0, 8 - for font 1
3157
.area_size_x		dw 200	;+10
3143
.area_size_x		dw 200	;+10
3158
.font_number		dd 0	;+12	; 0 - monospace, 1 - variable
3144
.font_number		dd 0	;+12	; 0 - monospace, 1 - variable
3159
.background_flag	dd 0	;+16
3145
.background_flag	dd 0	;+16
3160
.font_color		dd 0x0	;+20
3146
.font_color		dd 0x0	;+20
3161
.background_color	dd 0x0	;+24
3147
.background_color	dd 0x0	;+24
3162
.text_pointer		dd dir_path	;+28
3148
.text_pointer		dd dir_path	;+28
3163
.work_area_pointer	dd text_work_area	;+32
3149
.work_area_pointer	dd text_work_area	;+32
3164
.temp_text_length	dd 0	;+36
3150
.temp_text_length	dd 0	;+36
3165
;---------------------------------------------------------------------
3151
;---------------------------------------------------------------------
3166
; for EDITBOX
3152
; for EDITBOX
3167
align	4
3153
align	4
3168
name_editboxes:
3154
name_editboxes:
3169
edit1	edit_box 200,10,7,0xffffff,0xbbddff,0,0,0,4095,user_selected_name,mouse_dd,,0
3155
edit1	edit_box 200,10,7,0xffffff,0xbbddff,0,0,0,4095,user_selected_name,mouse_dd,,0
3170
name_editboxes_end:
3156
name_editboxes_end:
3171
 
3157
 
3172
;mouse_flag:	dd 0x0
3158
;mouse_flag:	dd 0x0
3173
 
3159
 
3174
mouse_dd rd	1
3160
mouse_dd rd	1
3175
;---------------------------------------------------------------------
3161
;---------------------------------------------------------------------
3176
window_x:
3162
window_x:
3177
.x_size 	dw 420
3163
.x_size 	dw 420
3178
.x_start	dw 10
3164
.x_start	dw 10
3179
window_y:
3165
window_y:
3180
.y_size 	dw 320
3166
.y_size 	dw 320
3181
.y_start	dw 10
3167
.y_start	dw 10
3182
;---------------------------------------------------------------------
3168
;---------------------------------------------------------------------
3183
features_table:
3169
features_table:
3184
.type_table:
3170
.type_table:
3185
	db ' '
3171
	db ' '
3186
;---------------------------------------------------------------------
3172
;---------------------------------------------------------------------
3187
.size_table:
3173
.size_table:
3188
	db '1023b '
3174
	db '1023b '
3189
;---------------------------------------------------------------------
3175
;---------------------------------------------------------------------
3190
.date_table:
3176
.date_table:
3191
	db '00.00.00 00:00 '
3177
	db '00.00.00 00:00 '
3192
;---------------------------------------------------------------------
3178
;---------------------------------------------------------------------
3193
.year_table:
3179
.year_table:
3194
	db '    '
3180
	db '    '
3195
;---------------------------------------------------------------------
3181
;---------------------------------------------------------------------
3196
example_name_temp:	
3182
example_name_temp:	
3197
	db 'temp1.asm',0
3183
	db 'temp1.asm',0
3198
;---------------------------------------------------------------------
3184
;---------------------------------------------------------------------
3199
IM_END:
3185
IM_END:
3200
;---------------------------------------------------------------------
3186
;---------------------------------------------------------------------
3201
do_not_draw_open_button_label	rb 1
3187
do_not_draw_open_button_label	rb 1
3202
;---------------------------------------------------------------------
3188
;---------------------------------------------------------------------
3203
;include_debug_strings
3189
;include_debug_strings
3204
;---------------------------------------------------------------------
3190
;---------------------------------------------------------------------
3205
align 4
3191
align 4
3206
app_colours:
3192
app_colours:
3207
 
3193
 
3208
w_frame 		rd 1
3194
w_frame 		rd 1
3209
w_grab			rd 1
3195
w_grab			rd 1
3210
w_work_dark		rd 1
3196
w_work_dark		rd 1
3211
w_work_light	rd 1
3197
w_work_light	rd 1
3212
w_grab_text		rd 1
3198
w_grab_text		rd 1
3213
w_work			rd 1
3199
w_work			rd 1
3214
w_work_button		rd 1
3200
w_work_button		rd 1
3215
w_work_button_text	rd 1
3201
w_work_button_text	rd 1
3216
w_work_text		rd 1
3202
w_work_text		rd 1
3217
w_work_graph		rd 1
3203
w_work_graph		rd 1
3218
;---------------------------------------------------------------------
3204
;---------------------------------------------------------------------
3219
open_button_coordinates rd 1
3205
open_button_coordinates rd 1
3220
;---------------------------------------------------------------------
3206
;---------------------------------------------------------------------
3221
error_handler_store_input_mode rd 1
3207
error_handler_store_input_mode rd 1
3222
;---------------------------------------------------------------------
3208
;---------------------------------------------------------------------
3223
menu_text_area_1_1:
3209
menu_text_area_1_1:
3224
rb 256
3210
rb 256
3225
;---------------------------------------------------------------------
3211
;---------------------------------------------------------------------
3226
	rb 1024
3212
	rb 1024
3227
stacktop:
3213
stacktop:
3228
;---------------------------------------------------------------------
3214
;---------------------------------------------------------------------
3229
; window error message
3215
; window error message
3230
	rb 1024
3216
	rb 1024
3231
thread_stack:
3217
thread_stack:
3232
;---------------------------------------------------------------------
3218
;---------------------------------------------------------------------
3233
retrieved_devices_table:
3219
retrieved_devices_table:
3234
	rb 200
3220
	rb 200
3235
;---------------------------------------------------------------------
3221
;---------------------------------------------------------------------
3236
keymap_area:
3222
keymap_area:
3237
	rb 128
3223
	rb 128
3238
;---------------------------------------------------------------------
3224
;---------------------------------------------------------------------
3239
name_temp_area:
3225
name_temp_area:
3240
	rb 256
3226
	rb 256
3241
;---------------------------------------------------------------------
3227
;---------------------------------------------------------------------
3242
user_selected_name:
3228
user_selected_name:
3243
	rb 256
3229
	rb 256
3244
;---------------------------------------------------------------------
3230
;---------------------------------------------------------------------
3245
param:
3231
param:
3246
	rb 256
3232
	rb 256
3247
;---------------------------------------------------------------------
3233
;---------------------------------------------------------------------
3248
path:
3234
path:
3249
	rb 4096
3235
	rb 4096
3250
;---------------------------------------------------------------------
3236
;---------------------------------------------------------------------
3251
file_name:
3237
file_name:
3252
	rb 4096
3238
	rb 4096
3253
;---------------------------------------------------------------------
3239
;---------------------------------------------------------------------
3254
previous_dir_path:
3240
previous_dir_path:
3255
	rb 4096
3241
	rb 4096
3256
;---------------------------------------------------------------------
3242
;---------------------------------------------------------------------
3257
dir_path:
3243
dir_path:
3258
	rb 4096
3244
	rb 4096
3259
;---------------------------------------------------------------------
3245
;---------------------------------------------------------------------
3260
dir_path_temp:
3246
dir_path_temp:
3261
	rb 4096
3247
	rb 4096
3262
;---------------------------------------------------------------------
3248
;---------------------------------------------------------------------
3263
text_work_area:
3249
text_work_area:
3264
	rb 1024
3250
	rb 1024
3265
;---------------------------------------------------------------------
3251
;---------------------------------------------------------------------
3266
procinfo:
3252
procinfo:
3267
process_info:
3253
process_info:
3268
	rb 1024
3254
	rb 1024
3269
;----------------------
3255
;----------------------
3270
file_info:
3256
file_info:
3271
	rb 40
3257
	rb 40
3272
I_END:
3258
I_END: