Subversion Repositories Kolibri OS

Rev

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

Rev 1837 Rev 1851
1
;**************************************************************
1
;*****************************************************************************
2
; KFM - Kolibri File Manager
2
; KFM - Kolibri File Manager
-
 
3
; Copyright (c) 2006 - 2010, Marat Zakiyanov aka Mario79, aka Mario
-
 
4
; All rights reserved.
-
 
5
;
-
 
6
; Redistribution and use in source and binary forms, with or without
-
 
7
; modification, are permitted provided that the following conditions are met:
-
 
8
;        * Redistributions of source code must retain the above copyright
-
 
9
;          notice, this list of conditions and the following disclaimer.
-
 
10
;        * Redistributions in binary form must reproduce the above copyright
-
 
11
;          notice, this list of conditions and the following disclaimer in the
-
 
12
;          documentation and/or other materials provided with the distribution.
-
 
13
;        * Neither the name of the  nor the
-
 
14
;          names of its contributors may be used to endorse or promote products
-
 
15
;          derived from this software without specific prior written permission.
-
 
16
;
-
 
17
; THIS SOFTWARE IS PROVIDED BY Marat Zakiyanov ''AS IS'' AND ANY
-
 
18
; EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-
 
19
; WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-
 
20
; DISCLAIMED. IN NO EVENT SHALL  BE LIABLE FOR ANY
-
 
21
; DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-
 
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
-
 
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
-
 
26
; SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
3
;**************************************************************
27
;*****************************************************************************
4
use32
28
use32
-
 
29
org	0x0
-
 
30
 
5
    db	  'MENUET01'
31
    db	  'MENUET01'
6
    dd	  0x01
32
    dd	  0x01
7
    dd	  START
33
    dd	  START
8
    dd	  I_END
34
    dd	  I_END
9
    dd	  mem
35
    dd	  mem
10
    dd	  stacktop
36
    dd	  stacktop
11
    dd	  0x0
37
    dd	  0x0
12
    dd	  path
38
    dd	  path
13
 
39
 
14
;include   'lang.inc'
40
;include   'lang.inc'
15
;include   'kglobals.inc'
41
;include   'kglobals.inc'
16
include   'macros.inc'
42
;include   'macros.inc'
-
 
43
include '../../../macros.inc'
-
 
44
include '../../../config.inc'		;for nightbuild
-
 
45
 
17
include   'editbox.inc'
46
include   'editbox.inc'
18
;use_edit_box
47
;use_edit_box
19
use_edit_box procinfo
48
use_edit_box procinfo
20
;include   'ASCGL.INC'
49
;include   'ASCGL.INC'
21
;---------------------------------------------------------------------
50
;---------------------------------------------------------------------
22
include   'files.inc'
51
include   'files.inc'
23
;---------------------------------------------------------------------
52
;---------------------------------------------------------------------
24
STRLEN = 1024
53
STRLEN = 1024
25
;---------------------------------------------------------------------
54
;---------------------------------------------------------------------
26
START:
55
START:
27
    mcall 9, procinfo, -1
56
    mcall 9, procinfo, -1
28
    mov   eax,[ebx+30]
57
    mov   eax,[ebx+30]
29
    mov   [PID],eax
58
    mov   [PID],eax
30
    xor   ecx,ecx
59
    xor   ecx,ecx
31
@@:
60
@@:
32
    inc   ecx
61
    inc   ecx
33
    mcall 9, procinfo
62
    mcall 9, procinfo
34
    mov   eax,[PID]
63
    mov   eax,[PID]
35
    cmp   eax,[ebx+30]
64
    cmp   eax,[ebx+30]
36
    jne   @r
65
    jne   @r
37
    mov  [active_process],ecx
66
    mov  [active_process],ecx
38
    mov   [appl_memory],mem
67
    mov   [appl_memory],mem
39
    mov   ax,[select_disk_char]
68
    mov   ax,[select_disk_char]
40
    mov   [read_folder_name],ax
69
    mov   [read_folder_name],ax
41
    mov   [read_folder_1_name],ax
70
    mov   [read_folder_1_name],ax
42
    call  load_icon_and_convert_to_img
71
    call  load_icon_and_convert_to_img
43
    call  load_buttons_and_convert_to_img
72
    call  load_buttons_and_convert_to_img
44
    call  load_initiation_file
73
    call  load_initiation_file
45
    call  add_memory_for_folders
74
    call  add_memory_for_folders
46
    call  device_detect
75
    call  device_detect
47
    call  device_detect_f70
76
    call  device_detect_f70
48
    mcall 66, 1, 1
77
    mcall 66, 1, 1
49
;    call  draw_window
78
;    call  draw_window
50
;    xor   eax,eax
79
;    xor   eax,eax
51
    mov   eax,1
80
    mov   eax,1
52
    mov   [left_sort_flag],eax
81
    mov   [left_sort_flag],eax
53
    mov   [right_sort_flag],eax
82
    mov   [right_sort_flag],eax
54
 
83
 
55
    call  proc_read_left_folder
84
    call  proc_read_left_folder
56
    test  eax,eax
85
    test  eax,eax
57
    jz	  @f
86
    jz	  @f
58
    cmp   eax,6
87
    cmp   eax,6
59
    jne   read_folder_error
88
    jne   read_folder_error
60
@@:
89
@@:
61
    call  proc_read_right_folder
90
    call  proc_read_right_folder
62
    test  eax,eax
91
    test  eax,eax
63
    jz	  @f
92
    jz	  @f
64
    cmp   eax,6
93
    cmp   eax,6
65
    jne   read_folder_1_error
94
    jne   read_folder_1_error
66
@@:
95
@@:
67
	mcall 40, 0x27
96
	mcall 40, 0x27
68
	jmp   red_1
97
	jmp   red_1
69
;---------------------------------------------------------------------
98
;---------------------------------------------------------------------
70
red:
99
red:
71
    call  get_window_param
100
    call  get_window_param
72
    test  [window_status],10b
101
    test  [window_status],10b
73
    jnz   red_1   ;still
102
    jnz   red_1   ;still
74
    test  [window_status],100b
103
    test  [window_status],100b
75
    jnz   red_1
104
    jnz   red_1
76
    cmp   [window_high],180
105
    cmp   [window_high],180
77
    ja	  @f
106
    ja	  @f
78
    mov   esi,180
107
    mov   esi,180
79
    mcall 67,-1,ebx,ebx
108
    mcall 67,-1,ebx,ebx
80
@@:
109
@@:
81
    cmp   [window_width],495
110
    cmp   [window_width],495
82
    ja	  red_1
111
    ja	  red_1
83
    mov   edx,495
112
    mov   edx,495
84
    mcall 67,-1,ebx, ,ebx
113
    mcall 67,-1,ebx, ,ebx
85
red_1:
114
red_1:
86
    call  draw_window
115
    call  draw_window
87
;---------------------------------------------------------------------
116
;---------------------------------------------------------------------
88
still:
117
still:
89
    mcall 10
118
    mcall 10
90
    cmp   eax,1
119
    cmp   eax,1
91
    je	  red
120
    je	  red
92
    cmp   eax,2
121
    cmp   eax,2
93
    je	  key
122
    je	  key
94
    cmp   eax,3
123
    cmp   eax,3
95
    je	  button
124
    je	  button
96
    cmp   eax,6
125
    cmp   eax,6
97
    je	  mouse
126
    je	  mouse
98
    jmp   still
127
    jmp   still
99
;---------------------------------------------------------------------
128
;---------------------------------------------------------------------
100
get_window_param:
129
get_window_param:
101
    mcall 9, procinfo, -1
130
    mcall 9, procinfo, -1
102
    mov   eax,[ebx+46]
131
    mov   eax,[ebx+46]
103
    mov   [window_high],eax
132
    mov   [window_high],eax
104
    mov   eax,[ebx+42]
133
    mov   eax,[ebx+42]
105
    mov   [window_width],eax
134
    mov   [window_width],eax
106
    mov   eax,[ebx+70]
135
    mov   eax,[ebx+70]
107
    mov   [window_status],eax
136
    mov   [window_status],eax
108
    mcall 48,4
137
    mcall 48,4
109
    mov   [skin_high],eax
138
    mov   [skin_high],eax
110
    ret
139
    ret
111
;---------------------------------------------------------------------
140
;---------------------------------------------------------------------
112
draw_window:
141
draw_window:
113
    mcall 12, 1
142
    mcall 12, 1
114
;    mcall 0, <20,620>, <20,460>, 0x03cccccc   ; 0x805080D0, 0x005080D0
143
;    mcall 0, <20,620>, <20,460>, 0x03cccccc   ; 0x805080D0, 0x005080D0
115
	xor	esi,esi
144
	xor	esi,esi
116
    mcall 0, <20,620>, <20,460>, 0x43cccccc   ; 0x805080D0, 0x005080D0
145
    mcall 0, <20,620>, <20,460>, 0x43cccccc   ; 0x805080D0, 0x005080D0
117
    call  get_window_param
146
    call  get_window_param
118
;    mov   ecx,[temp_esi]
147
;    mov   ecx,[temp_esi]
119
    test  [window_status],10b
148
    test  [window_status],10b
120
    jnz   @f
149
    jnz   @f
121
    mcall 71, 1 , header
150
    mcall 71, 1 , header_text
122
    ; create_dir_name
151
    ; create_dir_name
123
    ; start_parameter
152
    ; start_parameter
124
    ; file_name
153
    ; file_name
125
    ; [temp_edi]
154
    ; [temp_edi]
126
    ; header
155
    ; header
127
    ; delete_file_data.name
156
    ; delete_file_data.name
128
    ; start_file_data.name
157
    ; start_file_data.name
129
    ; start_parameter
158
    ; start_parameter
130
     ; start_file_data.name
159
     ; start_file_data.name
131
      ; read_icon_file.name
160
      ; read_icon_file.name
132
		; read_file_features.name ;path ;header
161
		; read_file_features.name ;path ;header
133
 
162
 
134
    cmp   [window_high],180
163
    cmp   [window_high],180
135
    jb	  @f
164
    jb	  @f
136
    cmp   [window_width],495
165
    cmp   [window_width],495
137
    jb	  @f
166
    jb	  @f
138
 
167
 
139
;    pusha
168
;    pusha
140
;    mcall 4,<15,25>,0,read_folder.name,100
169
;    mcall 4,<15,25>,0,read_folder.name,100
141
;    popa
170
;    popa
142
    call  draw_fbutton
171
    call  draw_fbutton
143
 
172
 
144
;    mov   [left_panel_clear_all],1
173
;    mov   [left_panel_clear_all],1
145
 
174
 
146
    call  draw_left_panel
175
    call  draw_left_panel
147
 
176
 
148
;    mov   [right_panel_clear_all],1
177
;    mov   [right_panel_clear_all],1
149
 
178
 
150
    call  draw_right_panel
179
    call  draw_right_panel
151
    call  draw_device_button
180
    call  draw_device_button
152
    call  draw_left_select_disk_button
181
    call  draw_left_select_disk_button
153
    call  draw_left_sort_button
182
    call  draw_left_sort_button
154
    call  draw_right_select_disk_button
183
    call  draw_right_select_disk_button
155
    call  draw_right_sort_button
184
    call  draw_right_sort_button
156
    call  draw_menu_bar
185
    call  draw_menu_bar
157
    call  draw_buttons_panel
186
    call  draw_buttons_panel
158
    call  draw_ATAPI_tray_control
187
    call  draw_ATAPI_tray_control
159
    
188
    
160
;    mcall 47,0x80000,[left_scroll_compens],<300, 5>,0xffffff
189
;    mcall 47,0x80000,[left_scroll_compens],<300, 5>,0xffffff
161
;    call  mouse.draw_data
190
;    call  mouse.draw_data
162
;    mcall 18, 7
191
;    mcall 18, 7
163
;    mov   [temp_eax],eax
192
;    mov   [temp_eax],eax
164
;    mcall 47,0x80000,[active_process],<300, 5>,0xffffff
193
;    mcall 47,0x80000,[active_process],<300, 5>,0xffffff
165
;    mcall 47,0x80000,[left_marked_counter],<300, 5>,0xffffff
194
;    mcall 47,0x80000,[left_marked_counter],<300, 5>,0xffffff
166
;    mcall 47,0x80000,[right_marked_counter],<400, 5>,0xffffff
195
;    mcall 47,0x80000,[right_marked_counter],<400, 5>,0xffffff
167
;    mcall 47,0x80000,[sorting_low_limit],<100, 5>,0xffffff
196
;    mcall 47,0x80000,[sorting_low_limit],<100, 5>,0xffffff
168
;    mcall 47,0x80000,[sort_counter],<200, 5>,0xffffff
197
;    mcall 47,0x80000,[sort_counter],<200, 5>,0xffffff
169
;    mcall 47,0x80000,[sorting_high_limit],<300, 5>,0xffffff
198
;    mcall 47,0x80000,[sorting_high_limit],<300, 5>,0xffffff
170
;    mcall 47,0x80000,[dir_temp_counter],<400, 5>,0xffffff
199
;    mcall 47,0x80000,[dir_temp_counter],<400, 5>,0xffffff
171
 
200
 
172
;    mcall 47,0x80000,[timer_tick],<500, 5>,0xffffff
201
;    mcall 47,0x80000,[timer_tick],<500, 5>,0xffffff
173
;    mcall 47,0x80000,[temp_eax],<400, 5>,0xffffff
202
;    mcall 47,0x80000,[temp_eax],<400, 5>,0xffffff
174
;    mcall 47,0x80000,[temp_ebx],<400, 5>,0xffffff
203
;    mcall 47,0x80000,[temp_ebx],<400, 5>,0xffffff
175
;    mcall 47,0x80000,[temp_ecx],<500, 5>,0xffffff
204
;    mcall 47,0x80000,[temp_ecx],<500, 5>,0xffffff
176
;    mcall 47,0x80000,[temp_ebx],<500, 5>,0xffffff
205
;    mcall 47,0x80000,[temp_ebx],<500, 5>,0xffffff
177
;    mcall 47,0x80000,[ini_file_start],<100, 5>,0xffffff
206
;    mcall 47,0x80000,[ini_file_start],<100, 5>,0xffffff
178
;    mcall 47,0x80000,[left_folder_data],<200, 5>,0xffffff
207
;    mcall 47,0x80000,[left_folder_data],<200, 5>,0xffffff
179
;    mcall 47,0x80000,[right_folder_data],<300, 5>,0xffffff
208
;    mcall 47,0x80000,[right_folder_data],<300, 5>,0xffffff
180
;    mcall 47,0x80000,[appl_memory],<500, 5>,0xffffff
209
;    mcall 47,0x80000,[appl_memory],<500, 5>,0xffffff
181
;    mcall 47,0x80000,[temp_znak],<500, 5>,0xffffff
210
;    mcall 47,0x80000,[temp_znak],<500, 5>,0xffffff
182
 
211
 
183
;    mcall 47,0x80000,[sort_counter],<200, 5>,0xffffff
212
;    mcall 47,0x80000,[sort_counter],<200, 5>,0xffffff
184
;    mcall 47,0x80000,[temp_edi],<250, 5>,0xffffff
213
;    mcall 47,0x80000,[temp_edi],<250, 5>,0xffffff
185
;    mcall 47,0x80000,[temp_esi],<300, 5>,0xffffff
214
;    mcall 47,0x80000,[temp_esi],<300, 5>,0xffffff
186
;    mcall 47,0x80000,[temp_ecx],<350, 5>,0xffffff
215
;    mcall 47,0x80000,[temp_ecx],<350, 5>,0xffffff
187
;    mcall 47,0x80000,[temp_znak],<400, 5>,0xffffff
216
;    mcall 47,0x80000,[temp_znak],<400, 5>,0xffffff
188
 
217
 
189
;    movzx ecx,[left_start_draw_cursor_line]
218
;    movzx ecx,[left_start_draw_cursor_line]
190
;    mcall 47,0x40000, ,<300, 5>,0xffffff
219
;    mcall 47,0x40000, ,<300, 5>,0xffffff
191
;    mcall 47,0x40000,[left_start_draw_line],<400, 5>,0xffffff
220
;    mcall 47,0x40000,[left_start_draw_line],<400, 5>,0xffffff
192
 
221
 
193
;    mcall 47,0x40000,[window_width],<100, 5>,0xffffff
222
;    mcall 47,0x40000,[window_width],<100, 5>,0xffffff
194
;    mcall 47,0x40000,[window_high],<130, 5>,0xffffff
223
;    mcall 47,0x40000,[window_high],<130, 5>,0xffffff
195
 
224
 
196
;    mcall 47,0x80100,[left_panel_x],<200, 5>,0xffffff
225
;    mcall 47,0x80100,[left_panel_x],<200, 5>,0xffffff
197
;    mcall 47,0x80100,[left_panel_y],<250, 5>,0xffffff
226
;    mcall 47,0x80100,[left_panel_y],<250, 5>,0xffffff
198
;    mov   edx,[temp_counter_dword_1]
227
;    mov   edx,[temp_counter_dword_1]
199
;    mcall 4,<150,3>,0x80000000
228
;    mcall 4,<150,3>,0x80000000
200
;    mov   edx,[temp_counter_dword]
229
;    mov   edx,[temp_counter_dword]
201
;    mcall 4,<5,3>,0x80000000
230
;    mcall 4,<5,3>,0x80000000
202
@@:
231
@@:
203
    mcall 12, 2
232
    mcall 12, 2
204
    ret
233
    ret
205
;temp_eax dd 0
234
;temp_eax dd 0
206
;temp_ebx dd 0
235
;temp_ebx dd 0
207
;temp_ecx dd 0
236
;temp_ecx dd 0
208
;temp_edx dd 0
237
;temp_edx dd 0
209
;temp_esi dd 0
238
;temp_esi dd 0
210
;temp_edi dd 0
239
;temp_edi dd 0
211
;temp_ebp dd 0
240
;temp_ebp dd 0
212
;temp_esp dd 0
241
;temp_esp dd 0
213
;temp_znak dd 0
242
;temp_znak dd 0
214
;temp_counter_dword_1 dd 0
243
;temp_counter_dword_1 dd 0
215
;extension_size_1 dd 0
244
;extension_size_1 dd 0
216
;timer_tick dd 0
245
;timer_tick dd 0
217
;---------------------------------------------------------------------
246
;---------------------------------------------------------------------
218
prepare_load_data:
247
prepare_load_data:
219
    mov   esi,path
248
    mov   esi,path
220
    mov   edi,file_name
249
    mov   edi,file_name
221
    call  copy_path
250
    call  copy_path
222
    call  get_file_size
251
    call  get_file_size
223
    test  eax,eax
252
    test  eax,eax
224
    ret
253
    ret
225
;---------------------------------------------------------------------
254
;---------------------------------------------------------------------
226
prepare_load_data_1:
255
prepare_load_data_1:
227
    mov   [read_file.return],eax
256
    mov   [read_file.return],eax
228
    mov   ebp,eax
257
    mov   ebp,eax
229
prepare_load_data_4:
258
prepare_load_data_4:
230
    call  load_file
259
    call  load_file
231
    test  eax,eax
260
    test  eax,eax
232
    ret
261
    ret
233
;---------------------------------------------------------------------
262
;---------------------------------------------------------------------
234
prepare_load_data_2:
263
prepare_load_data_2:
235
    call  add_application_memory
264
    call  add_application_memory
236
prepare_load_data_3:
265
prepare_load_data_3:
237
    call  add_application_memory
266
    call  add_application_memory
238
    mov   eax,[file_features_temp_area+32]
267
    mov   eax,[file_features_temp_area+32]
239
    mov   [read_file.size],eax
268
    mov   [read_file.size],eax
240
    ret
269
    ret
241
;---------------------------------------------------------------------
270
;---------------------------------------------------------------------
242
load_icon_and_convert_to_img:
271
load_icon_and_convert_to_img:
243
    mov   ebx,icons_file_name
272
    mov   ebx,icons_file_name
244
    call  prepare_load_data
273
    call  prepare_load_data
245
    jnz   icon_error
274
    jnz   icon_error
246
    call  prepare_load_data_2
275
    call  prepare_load_data_2
247
    add   eax,mem
276
    add   eax,mem
248
    call  prepare_load_data_1
277
    call  prepare_load_data_1
249
    jnz   icon_error
278
    jnz   icon_error
250
    call  convert_bmp_to_img
279
    call  convert_bmp_to_img
251
    call  sub_application_memory
280
    call  sub_application_memory
252
    ret
281
    ret
253
;---------------------------------------------------------------------
282
;---------------------------------------------------------------------
254
load_buttons_and_convert_to_img:
283
load_buttons_and_convert_to_img:
255
    mov   ebx,buttons_file_name
284
    mov   ebx,buttons_file_name
256
    call  prepare_load_data
285
    call  prepare_load_data
257
    jnz   buttons_error
286
    jnz   buttons_error
258
    mov   eax,[appl_memory]
287
    mov   eax,[appl_memory]
259
    mov   [buttons_img_start],eax
288
    mov   [buttons_img_start],eax
260
    call  prepare_load_data_2
289
    call  prepare_load_data_2
261
    add   eax,[buttons_img_start]
290
    add   eax,[buttons_img_start]
262
    call  prepare_load_data_1
291
    call  prepare_load_data_1
263
    jnz   buttons_error
292
    jnz   buttons_error
264
    call  convert_bmp_to_img
293
    call  convert_bmp_to_img
265
    call  sub_application_memory
294
    call  sub_application_memory
266
    ret
295
    ret
267
;---------------------------------------------------------------------
296
;---------------------------------------------------------------------
268
load_initiation_file:
297
load_initiation_file:
269
    mov   ebx,ini_file_name
298
    mov   ebx,ini_file_name
270
    call  prepare_load_data
299
    call  prepare_load_data
271
    jnz   initiation_error
300
    jnz   initiation_error
272
    call  prepare_load_data_3
301
    call  prepare_load_data_3
273
    mov   eax,[appl_memory]
302
    mov   eax,[appl_memory]
274
    mov   [left_folder_data],eax
303
    mov   [left_folder_data],eax
275
    sub   eax,[read_file.size]
304
    sub   eax,[read_file.size]
276
    mov   [read_file.return],eax
305
    mov   [read_file.return],eax
277
    mov   [ini_file_start],eax
306
    mov   [ini_file_start],eax
278
    call  load_file
307
    call  load_file
279
    test  eax,eax
308
    test  eax,eax
280
    jnz   initiation_error
309
    jnz   initiation_error
281
    mov   ebp,icons_associations
310
    mov   ebp,icons_associations
282
    call  search_star_and_end_tags
311
    call  search_star_and_end_tags
283
;    cmp   ebp,-1
312
;    cmp   ebp,-1
284
;    je    .end
313
;    je    .end
285
    mov   eax,[end_tag]
314
    mov   eax,[end_tag]
286
    mov   [icons_end_tag],eax
315
    mov   [icons_end_tag],eax
287
    ret
316
    ret
288
;---------------------------------------------------------------------
317
;---------------------------------------------------------------------
289
add_memory_for_folders:
318
add_memory_for_folders:
290
    mov   ecx,[appl_memory]
319
    mov   ecx,[appl_memory]
291
    add   ecx,304*32+32
320
    add   ecx,304*32+32
292
    mov   [right_folder_data],ecx
321
    mov   [right_folder_data],ecx
293
    add   ecx,304*32+32
322
    add   ecx,304*32+32
294
    mov   [appl_memory],ecx
323
    mov   [appl_memory],ecx
295
    mcall 64,1
324
    mcall 64,1
296
    ret
325
    ret
297
;---------------------------------------------------------------------
326
;---------------------------------------------------------------------
298
copy_path:
327
copy_path:
299
    xor   eax,eax
328
    xor   eax,eax
300
@@:
329
@@:
301
    cld
330
    cld
302
    lodsb
331
    lodsb
303
    stosb
332
    stosb
304
    test  eax,eax
333
    test  eax,eax
305
    jnz   @b
334
    jnz   @b
306
    mov   esi,edi
335
    mov   esi,edi
307
;    dec   esi
336
;    dec   esi
308
@@:
337
@@:
309
    std
338
    std
310
    lodsb
339
    lodsb
311
    cmp   al,'/'
340
    cmp   al,'/'
312
    jnz   @b
341
    jnz   @b
313
    mov   edi,esi
342
    mov   edi,esi
314
    add   edi,2
343
    add   edi,2
315
    mov   esi,ebx
344
    mov   esi,ebx
316
@@:
345
@@:
317
    cld
346
    cld
318
    lodsb
347
    lodsb
319
    stosb
348
    stosb
320
    test  eax,eax
349
    test  eax,eax
321
    jnz   @b
350
    jnz   @b
322
    ret
351
    ret
323
;---------------------------------------------------------------------
352
;---------------------------------------------------------------------
324
copy_path_1:
353
copy_path_1:
325
    xor   eax,eax
354
    xor   eax,eax
326
@@:
355
@@:
327
    cld
356
    cld
328
    lodsb
357
    lodsb
329
    stosb
358
    stosb
330
    test  eax,eax
359
    test  eax,eax
331
    jnz   @b
360
    jnz   @b
332
    mov   esi,ebx
361
    mov   esi,ebx
333
    mov   [edi-1],byte '/'
362
    mov   [edi-1],byte '/'
334
@@:
363
@@:
335
    cld
364
    cld
336
    lodsb
365
    lodsb
337
    stosb
366
    stosb
338
    test  eax,eax
367
    test  eax,eax
339
    jnz   @b
368
    jnz   @b
340
    ret
369
    ret
341
;---------------------------------------------------------------------
370
;---------------------------------------------------------------------
342
add_application_memory:
371
add_application_memory:
343
    mov   ecx,[file_features_temp_area+32]
372
    mov   ecx,[file_features_temp_area+32]
344
.1:
373
.1:
345
    add   ecx,[appl_memory]
374
    add   ecx,[appl_memory]
346
    mov   [appl_memory],ecx
375
    mov   [appl_memory],ecx
347
    mcall 64,1
376
    mcall 64,1
348
    ret
377
    ret
349
;---------------------------------------------------------------------
378
;---------------------------------------------------------------------
350
sub_application_memory:
379
sub_application_memory:
351
    mov   ecx,[appl_memory]
380
    mov   ecx,[appl_memory]
352
    sub   ecx,[file_features_temp_area+32]
381
    sub   ecx,[file_features_temp_area+32]
353
.1:
382
.1:
354
    mov   [appl_memory],ecx
383
    mov   [appl_memory],ecx
355
    mcall 64,1
384
    mcall 64,1
356
    ret
385
    ret
357
;---------------------------------------------------------------------
386
;---------------------------------------------------------------------
358
include   'key.inc'
387
include   'key.inc'
359
;---------------------------------------------------------------------
388
;---------------------------------------------------------------------
360
include   'markfile.inc'
389
include   'markfile.inc'
361
;---------------------------------------------------------------------
390
;---------------------------------------------------------------------
362
include   'button.inc'
391
include   'button.inc'
363
;---------------------------------------------------------------------
392
;---------------------------------------------------------------------
364
include   'mouse.inc'
393
include   'mouse.inc'
365
;---------------------------------------------------------------------
394
;---------------------------------------------------------------------
366
include   'openfile.inc'
395
include   'openfile.inc'
367
;---------------------------------------------------------------------
396
;---------------------------------------------------------------------
368
include   'draw.inc'
397
include   'draw.inc'
369
;---------------------------------------------------------------------
398
;---------------------------------------------------------------------
370
include   'menu_bar.inc'
399
include   'menu_bar.inc'
371
;---------------------------------------------------------------------
400
;---------------------------------------------------------------------
372
include   'menu_drv.inc'
401
include   'menu_drv.inc'
373
;---------------------------------------------------------------------
402
;---------------------------------------------------------------------
374
include   'delete.inc'
403
include   'delete.inc'
375
;---------------------------------------------------------------------
404
;---------------------------------------------------------------------
376
include   'copy.inc'
405
include   'copy.inc'
377
;---------------------------------------------------------------------
406
;---------------------------------------------------------------------
378
include   'creatdir.inc'
407
include   'creatdir.inc'
379
;---------------------------------------------------------------------
408
;---------------------------------------------------------------------
380
include   'confirm.inc'
409
include   'confirm.inc'
381
;---------------------------------------------------------------------
410
;---------------------------------------------------------------------
382
include   'err_wind.inc'
411
include   'err_wind.inc'
383
;---------------------------------------------------------------------
412
;---------------------------------------------------------------------
384
include   'detect.inc'
413
include   'detect.inc'
385
;---------------------------------------------------------------------
414
;---------------------------------------------------------------------
386
include   'conv_bmp.inc'
415
include   'conv_bmp.inc'
387
;---------------------------------------------------------------------
416
;---------------------------------------------------------------------
388
include   'tran_ini.inc'
417
include   'tran_ini.inc'
389
;---------------------------------------------------------------------
418
;---------------------------------------------------------------------
390
include   'help.inc'
419
include   'help.inc'
391
;---------------------------------------------------------------------
420
;---------------------------------------------------------------------
392
include   'convchar.inc'
421
include   'convchar.inc'
393
;---------------------------------------------------------------------
422
;---------------------------------------------------------------------
394
include   'sort.inc'
423
include   'sort.inc'
395
;---------------------------------------------------------------------
424
;---------------------------------------------------------------------
396
include   'exit.inc'
425
include   'exit.inc'
397
;---------------------------------------------------------------------
426
;---------------------------------------------------------------------
398
include   'progrbar.inc'
427
include   'progrbar.inc'
399
;---------------------------------------------------------------------
428
;---------------------------------------------------------------------
400
include   'scroll.inc'
429
include   'scroll.inc'
401
;---------------------------------------------------------------------
430
;---------------------------------------------------------------------
402
include   'file_inf.inc'
431
include   'file_inf.inc'
403
;---------------------------------------------------------------------
432
;---------------------------------------------------------------------
404
include   'text.inc'
433
include   'text.inc'
405
;---------------------------------------------------------------------
434
;---------------------------------------------------------------------
406
I_END:
435
I_END:
407
;---------------------------------------------------------------------
436
;---------------------------------------------------------------------
408
include   'data.inc'
437
include   'data.inc'
409
;---------------------------------------------------------------------
438
;---------------------------------------------------------------------
410
mem:
439
mem: