Subversion Repositories Kolibri OS

Rev

Rev 9121 | Only display areas with differences | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 9121 Rev 9749
1
key:
1
key:
2
    mcall 2
2
    mcall 2
3
    cmp   [extended_key],1
3
    cmp   [extended_key],1
4
    je    .extended_key
4
    je    .extended_key
5
    test  al, al
5
    test  al, al
6
    jnz   still
6
    jnz   still
7
    cmp   ah, 0xE0
7
    cmp   ah, 0xE0
8
    jne   @f
8
    jne   @f
9
    mov   [extended_key],1
9
    mov   [extended_key],1
10
    jmp   still
10
    jmp   still
11
@@:
11
@@:
12
    cmp   ah,15
12
    cmp   ah,15
13
    jne   .no_tab
13
    jne   .no_tab
14
    inc   [select_panel_counter]
14
    inc   [select_panel_counter]
15
    and   [select_panel_counter],1b
15
    and   [select_panel_counter],1b
16
    call  draw_left_panel
16
    call  draw_left_panel
17
    call  draw_right_panel
17
    call  draw_right_panel
18
    jmp   still
18
    jmp   still
19
.no_tab:
19
.no_tab:
20
    cmp   ah,72   ; arrow up
20
    cmp   ah,72   ; arrow up
21
    je    key_72.1
21
    je    key_72.1
22
    cmp   ah,80   ; arrow down
22
    cmp   ah,80   ; arrow down
23
    je    key_80.1
23
    je    key_80.1
24
    cmp   ah,28   ; Enter
24
    cmp   ah,28   ; Enter
25
    je    key_28.1
25
    je    key_28.1
26
    cmp   ah,17   ; W
26
    cmp   ah,17   ; W
27
    je    set_background
27
    je    set_background
28
    cmp   ah,19   ; R
28
    cmp   ah,19   ; R
29
    je    reload_dir_1
29
    je    reload_dir_1
30
    cmp   ah,42
30
    cmp   ah,42
31
    je    key_shift_up
31
    je    key_shift_up
32
    cmp   ah,54
32
    cmp   ah,54
33
    je    key_shift_up
33
    je    key_shift_up
34
    cmp   ah,142
34
    cmp   ah,142
35
    je    exit_dir_1    ; BackSpace Up
35
    je    exit_dir_1    ; BackSpace Up
36
    cmp   ah,170
36
    cmp   ah,170
37
    je    key_shift_down
37
    je    key_shift_down
38
    cmp   ah,182
38
    cmp   ah,182
39
    je    key_shift_down
39
    je    key_shift_down
40
    cmp   ah,29
40
    cmp   ah,29
41
    je    key_ctrl_up.1
41
    je    key_ctrl_up.1
42
    cmp   ah,157
42
    cmp   ah,157
43
    je    key_ctrl_down.1
43
    je    key_ctrl_down.1
44
    cmp   ah,56
44
    cmp   ah,56
45
    je    key_alt_up.1
45
    je    key_alt_up.1
46
    cmp   ah,184
46
    cmp   ah,184
47
    je    key_alt_down.1
47
    je    key_alt_down.1
48
    cmp   ah,206 ; NumPad+ Up
48
    cmp   ah,206 ; NumPad+ Up
49
    je    NumPad_plus_Up
49
    je    NumPad_plus_Up
50
    cmp   ah,202 ; NumPad- Up
50
    cmp   ah,202 ; NumPad- Up
51
    je    NumPad_minus_Up
51
    je    NumPad_minus_Up
52
    cmp   ah,183 ; NumPad* Up
52
    cmp   ah,183 ; NumPad* Up
53
    je    NumPad_sneg_Up
53
    je    NumPad_sneg_Up
54
    cmp   ah,158
54
    cmp   ah,158
55
    je    symbol_a_up
55
    je    symbol_a_up
56
    cmp   ah,59    ; down F1
56
    cmp   ah,59    ; down F1
57
    je    f_key_f1
57
    je    f_key_f1
58
    cmp   ah,60    ; down F2
58
    cmp   ah,60    ; down F2
59
    je    f_key_f2
59
    je    f_key_f2
60
    cmp   ah,61    ; down F3
60
    cmp   ah,61    ; down F3
61
    je    f_key_f3 ;sort_name
61
    je    f_key_f3 ;sort_name
62
    cmp   ah,62    ; down F4
62
    cmp   ah,62    ; down F4
63
    je    f_key_f4 ;sort_type
63
    je    f_key_f4 ;sort_type
64
    cmp   ah,63    ; down F5
64
    cmp   ah,63    ; down F5
65
    je    f_key_f5 ;sort_size
65
    je    f_key_f5 ;sort_size
66
    cmp   ah,64    ; down F6
66
    cmp   ah,64    ; down F6
67
    je    f_key_f6 ; sort_date
67
    je    f_key_f6 ; sort_date
68
    cmp   ah,65    ; down F7
68
    cmp   ah,65    ; down F7
69
    je    f_key_f7 ;
69
    je    f_key_f7 ;
70
    cmp   ah,66    ; down F8
70
    cmp   ah,66    ; down F8
71
    je    f_key_f8 ; delete_file
71
    je    f_key_f8 ; delete_file
72
    cmp   ah,67
72
    cmp   ah,67
73
    je    f_key_f9
73
    je    f_key_f9
74
    cmp   ah,88    ; down F12
74
    cmp   ah,88    ; down F12
75
    je    f_key_f12
75
    je    f_key_f12
76
    jmp  still
76
    jmp  still
77
;-------------------------------------------------------------
77
;-------------------------------------------------------------
78
.extended_key:
78
.extended_key:
79
    mov  [extended_key],0
79
    mov  [extended_key],0
80
key_80:
80
key_80:
81
    cmp  ah,80  ; arrow down
81
    cmp  ah,80  ; arrow down
82
    jne  key_72
82
    jne  key_72
83
.1:
83
.1:
84
    cmp  [select_panel_counter],0
84
    cmp  [select_panel_counter],0
85
    jne  .right_1
85
    jne  .right_1
86
    mov  eax,[left_folder_block]
86
    mov  eax,[left_folder_block]
87
    dec  eax
87
    dec  eax
88
    imul eax,10
88
    imul eax,10
89
    cmp  ax,[left_start_draw_cursor_line]
89
    cmp  ax,[left_start_draw_cursor_line]
90
    jbe  .marked_action   ;still
90
    jbe  .marked_action   ;still
91
    mov  ax,[left_start_draw_cursor_line]
91
    mov  ax,[left_start_draw_cursor_line]
92
    add  ax,10
92
    add  ax,10
93
    cmp  ax,[left_panel_y_correct_size_y]
93
    cmp  ax,[left_panel_y_correct_size_y]
94
    jae  @f
94
    jae  @f
95
.add_1:
95
.add_1:
96
    add  [left_start_draw_cursor_line],10
96
    add  [left_start_draw_cursor_line],10
97
    call draw_left_panel
97
    call draw_left_panel
98
    mov  [drawing_panel_folder],1
98
    mov  [drawing_panel_folder],1
99
        jmp  still
99
        jmp  still
100
.all:
100
.all:
101
    sub  ecx,10 shl 16
101
    sub  ecx,10 shl 16
102
    mov  edx,0xffffff
102
    mov  edx,0xffffff
103
        mcall
103
        mcall
104
    mov  [not_clear_lines],1
104
    mov  [not_clear_lines],1
105
    call draw_folder_data
105
    call draw_folder_data
106
    mov  [not_clear_lines],0
106
    mov  [not_clear_lines],0
107
    jmp  still
107
    jmp  still
108
.marked_action:
108
.marked_action:
109
    cmp  [marked_action],0
109
    cmp  [marked_action],0
110
    je   still
110
    je   still
111
    mov  [marked_action],0
111
    mov  [marked_action],0
112
    call draw_left_panel
112
    call draw_left_panel
113
    jmp  still
113
    jmp  still
114
.marked_action_1:
114
.marked_action_1:
115
    cmp  [marked_action],0
115
    cmp  [marked_action],0
116
    je   still
116
    je   still
117
    mov  [marked_action],0
117
    mov  [marked_action],0
118
    call draw_right_panel
118
    call draw_right_panel
119
    jmp  still
119
    jmp  still
120
@@:
120
@@:
121
    mov  eax,[left_folder_block]
121
    mov  eax,[left_folder_block]
122
    sub  eax,[max_panel_line]
122
    sub  eax,[max_panel_line]
123
    test eax,0x80000000
123
    test eax,0x80000000
124
    jz   @f
124
    jz   @f
125
    xor  eax,eax
125
    xor  eax,eax
126
@@:
126
@@:
127
    cmp  [marked_action],0
127
    cmp  [marked_action],0
128
    jne   @f
128
    jne   @f
129
    cmp  [left_start_draw_line],eax
129
    cmp  [left_start_draw_line],eax
130
    je   still
130
    je   still
131
@@:
131
@@:
132
    mov  [marked_action],0
132
    mov  [marked_action],0
133
    inc  [left_start_draw_line]
133
    inc  [left_start_draw_line]
134
    call draw_left_panel
134
    call draw_left_panel
135
    jmp  still
135
    jmp  still
136
.right_1:
136
.right_1:
137
    mov  eax,[right_folder_block]
137
    mov  eax,[right_folder_block]
138
    dec  eax
138
    dec  eax
139
    imul eax,10
139
    imul eax,10
140
    cmp  ax,[right_start_draw_cursor_line]
140
    cmp  ax,[right_start_draw_cursor_line]
141
    jbe  .marked_action_1   ;still
141
    jbe  .marked_action_1   ;still
142
    mov  ax,[right_start_draw_cursor_line]
142
    mov  ax,[right_start_draw_cursor_line]
143
    add  ax,10
143
    add  ax,10
144
    cmp  ax,[right_panel_y_correct_size_y]
144
    cmp  ax,[right_panel_y_correct_size_y]
145
    jae  @f
145
    jae  @f
146
.add_2:
146
.add_2:
147
    add  [right_start_draw_cursor_line],10
147
    add  [right_start_draw_cursor_line],10
148
    call draw_right_panel
148
    call draw_right_panel
149
    mov  [drawing_panel_folder],2
149
    mov  [drawing_panel_folder],2
150
    jmp  still
150
    jmp  still
151
@@:
151
@@:
152
    mov  eax,[right_folder_block]
152
    mov  eax,[right_folder_block]
153
    sub  eax,[max_panel_line]
153
    sub  eax,[max_panel_line]
154
    test eax,0x80000000
154
    test eax,0x80000000
155
    jz   @f
155
    jz   @f
156
    xor  eax,eax
156
    xor  eax,eax
157
@@:
157
@@:
158
    cmp  [marked_action],0
158
    cmp  [marked_action],0
159
    jne  @f
159
    jne  @f
160
    cmp  [right_start_draw_line],eax
160
    cmp  [right_start_draw_line],eax
161
    je   still
161
    je   still
162
@@:
162
@@:
163
    mov  [marked_action],0
163
    mov  [marked_action],0
164
    inc  [right_start_draw_line]
164
    inc  [right_start_draw_line]
165
    call draw_right_panel
165
    call draw_right_panel
166
    jmp  still
166
    jmp  still
167
;-------------------------------------------------------------
167
;-------------------------------------------------------------
168
key_72:
168
key_72:
169
    cmp  ah,72  ;arrow up
169
    cmp  ah,72  ;arrow up
170
    jne  key_81
170
    jne  key_81
171
.1:
171
.1:
172
    cmp  [select_panel_counter],0
172
    cmp  [select_panel_counter],0
173
    jne  .right_1
173
    jne  .right_1
174
    mov  ax,[left_start_draw_cursor_line]
174
    mov  ax,[left_start_draw_cursor_line]
175
    add  ax,[left_panel_y.start_y]
175
    add  ax,[left_panel_y.start_y]
176
    cmp  [left_panel_y.start_y],ax
176
    cmp  [left_panel_y.start_y],ax
177
    je   @f
177
    je   @f
178
    sub  [left_start_draw_cursor_line],10
178
    sub  [left_start_draw_cursor_line],10
179
    call draw_left_panel
179
    call draw_left_panel
180
    mov  [drawing_panel_folder],1
180
    mov  [drawing_panel_folder],1
181
        jmp  still
181
        jmp  still
182
.all:    
182
.all:    
183
    add  ecx,10 shl 16
183
    add  ecx,10 shl 16
184
    mov  edx,0xffffff
184
    mov  edx,0xffffff
185
        mcall
185
        mcall
186
    mov  [not_clear_lines],1
186
    mov  [not_clear_lines],1
187
    call draw_folder_data
187
    call draw_folder_data
188
    mov  [not_clear_lines],0
188
    mov  [not_clear_lines],0
189
    jmp  still
189
    jmp  still
190
@@:
190
@@:
191
    cmp  [left_start_draw_line],0
191
    cmp  [left_start_draw_line],0
192
    je   still
192
    je   still
193
    dec  [left_start_draw_line]
193
    dec  [left_start_draw_line]
194
    call draw_left_panel
194
    call draw_left_panel
195
    jmp  still
195
    jmp  still
196
.right_1:
196
.right_1:
197
    mov  ax,[right_start_draw_cursor_line]
197
    mov  ax,[right_start_draw_cursor_line]
198
    add  ax,[right_panel_y.start_y]
198
    add  ax,[right_panel_y.start_y]
199
    cmp  [right_panel_y.start_y],ax
199
    cmp  [right_panel_y.start_y],ax
200
    je   @f
200
    je   @f
201
    sub  [right_start_draw_cursor_line],10
201
    sub  [right_start_draw_cursor_line],10
202
    call draw_right_panel
202
    call draw_right_panel
203
    mov  [drawing_panel_folder],2
203
    mov  [drawing_panel_folder],2
204
    jmp  still
204
    jmp  still
205
@@:
205
@@:
206
    cmp  [right_start_draw_line],0
206
    cmp  [right_start_draw_line],0
207
    je   still
207
    je   still
208
    dec  [right_start_draw_line]
208
    dec  [right_start_draw_line]
209
    call draw_right_panel
209
    call draw_right_panel
210
    jmp  still
210
    jmp  still
211
;-------------------------------------------------------------
211
;-------------------------------------------------------------
212
key_81:
212
key_81:
213
    cmp  ah,81 ; PageDown
213
    cmp  ah,81 ; PageDown
214
    jne  key_73
214
    jne  key_73
215
    mov  eax,[max_panel_line]
215
    mov  eax,[max_panel_line]
216
    cmp  [select_panel_counter],0
216
    cmp  [select_panel_counter],0
217
    jne  .right_1
217
    jne  .right_1
218
    mov  ebx,[left_folder_block]
218
    mov  ebx,[left_folder_block]
219
    sub  ebx,eax
219
    sub  ebx,eax
220
    test ebx,0x80000000
220
    test ebx,0x80000000
221
    jnz  .left_2
221
    jnz  .left_2
222
    sub  ebx,[left_start_draw_line]
222
    sub  ebx,[left_start_draw_line]
223
    cmp  ebx,eax
223
    cmp  ebx,eax
224
    ja  .ok_1
224
    ja  .ok_1
225
    mov  ebx,[left_folder_block]
225
    mov  ebx,[left_folder_block]
226
    sub  ebx,eax
226
    sub  ebx,eax
227
    call prepare_data_left_down
227
    call prepare_data_left_down
228
    ja   @f
228
    ja   @f
229
    cmp  ebx,[left_start_draw_line]
229
    cmp  ebx,[left_start_draw_line]
230
    je   still
230
    je   still
231
@@:
231
@@:
232
    mov  [left_start_draw_line],ebx
232
    mov  [left_start_draw_line],ebx
233
.left_3:
233
.left_3:
234
    dec  eax
234
    dec  eax
235
    imul eax,10
235
    imul eax,10
236
.left_1:
236
.left_1:
237
    mov  [left_start_draw_cursor_line],ax
237
    mov  [left_start_draw_cursor_line],ax
238
    call draw_left_panel
238
    call draw_left_panel
239
    jmp  still
239
    jmp  still
240
.left_2:
240
.left_2:
241
    mov  eax,[left_folder_block]
241
    mov  eax,[left_folder_block]
242
    sub  eax,[left_start_draw_line]
242
    sub  eax,[left_start_draw_line]
243
    dec  eax
243
    dec  eax
244
    imul eax,10
244
    imul eax,10
245
    cmp  ax,[left_start_draw_cursor_line]
245
    cmp  ax,[left_start_draw_cursor_line]
246
    jbe  still
246
    jbe  still
247
    jmp  .left_1
247
    jmp  .left_1
248
.ok_1:
248
.ok_1:
249
    add  [left_start_draw_line],eax
249
    add  [left_start_draw_line],eax
250
    call draw_left_panel
250
    call draw_left_panel
251
    jmp  still
251
    jmp  still
252
.right_1:
252
.right_1:
253
    mov  ebx,[right_folder_block]
253
    mov  ebx,[right_folder_block]
254
    sub  ebx,eax
254
    sub  ebx,eax
255
    test ebx,0x80000000
255
    test ebx,0x80000000
256
    jnz  .right_3
256
    jnz  .right_3
257
    sub  ebx,[right_start_draw_line]
257
    sub  ebx,[right_start_draw_line]
258
    cmp  ebx,eax
258
    cmp  ebx,eax
259
    jae  .ok_2
259
    jae  .ok_2
260
    mov  ebx,[right_folder_block]
260
    mov  ebx,[right_folder_block]
261
    sub  ebx,eax
261
    sub  ebx,eax
262
    call prepare_data_right_down
262
    call prepare_data_right_down
263
    ja   @f
263
    ja   @f
264
    cmp  ebx,[right_start_draw_line]
264
    cmp  ebx,[right_start_draw_line]
265
    je   still
265
    je   still
266
@@:
266
@@:
267
    mov  [right_start_draw_line],ebx
267
    mov  [right_start_draw_line],ebx
268
.right_4:
268
.right_4:
269
    dec  eax
269
    dec  eax
270
    imul eax,10
270
    imul eax,10
271
.right_2:
271
.right_2:
272
    mov  [right_start_draw_cursor_line],ax
272
    mov  [right_start_draw_cursor_line],ax
273
    call draw_right_panel
273
    call draw_right_panel
274
    jmp  still
274
    jmp  still
275
.right_3:
275
.right_3:
276
    mov  eax,[right_folder_block]
276
    mov  eax,[right_folder_block]
277
    sub  eax,[right_start_draw_line]
277
    sub  eax,[right_start_draw_line]
278
    dec  eax
278
    dec  eax
279
    imul eax,10
279
    imul eax,10
280
    cmp  ax,[right_start_draw_cursor_line]
280
    cmp  ax,[right_start_draw_cursor_line]
281
    jbe  still
281
    jbe  still
282
    jmp  .right_2
282
    jmp  .right_2
283
.ok_2:
283
.ok_2:
284
    add  [right_start_draw_line],eax
284
    add  [right_start_draw_line],eax
285
    call draw_right_panel
285
    call draw_right_panel
286
    jmp  still
286
    jmp  still
287
;-------------------------------------------------------------    
287
;-------------------------------------------------------------    
288
prepare_data_right_down:
288
prepare_data_right_down:
289
    mov  ecx,[right_folder_block]
289
    mov  ecx,[right_folder_block]
290
    sub  ecx,[right_start_draw_line]
290
    sub  ecx,[right_start_draw_line]
291
    dec  ecx
291
    dec  ecx
292
    imul ecx,10
292
    imul ecx,10
293
    cmp  cx,[right_start_draw_cursor_line]
293
    cmp  cx,[right_start_draw_cursor_line]
294
    ret
294
    ret
295
;-------------------------------------------------------------    
295
;-------------------------------------------------------------    
296
prepare_data_left_down:
296
prepare_data_left_down:
297
    mov  ecx,[left_folder_block]
297
    mov  ecx,[left_folder_block]
298
    sub  ecx,[left_start_draw_line]
298
    sub  ecx,[left_start_draw_line]
299
    dec  ecx
299
    dec  ecx
300
    imul ecx,10
300
    imul ecx,10
301
    cmp  cx,[left_start_draw_cursor_line]
301
    cmp  cx,[left_start_draw_cursor_line]
302
    ret
302
    ret
303
;-------------------------------------------------------------
303
;-------------------------------------------------------------
304
key_73:
304
key_73:
305
    cmp  ah,73 ; PageUp
305
    cmp  ah,73 ; PageUp
306
    jne  key_71
306
    jne  key_71
307
    mov  eax,[max_panel_line]
307
    mov  eax,[max_panel_line]
308
    cmp  [select_panel_counter],0
308
    cmp  [select_panel_counter],0
309
    jne  .right_1
309
    jne  .right_1
310
    mov  ebx,[left_start_draw_line]
310
    mov  ebx,[left_start_draw_line]
311
    sub  ebx,eax
311
    sub  ebx,eax
312
    test ebx,0x8000000
312
    test ebx,0x8000000
313
    jz   @f
313
    jz   @f
314
    cmp  [left_start_draw_line],0
314
    cmp  [left_start_draw_line],0
315
    jne  .draw_line_1
315
    jne  .draw_line_1
316
    cmp  [left_start_draw_cursor_line],0
316
    cmp  [left_start_draw_cursor_line],0
317
    je   still
317
    je   still
318
    mov  [left_start_draw_cursor_line],0
318
    mov  [left_start_draw_cursor_line],0
319
.draw_line_1:
319
.draw_line_1:
320
    mov  [left_start_draw_line],0
320
    mov  [left_start_draw_line],0
321
    call draw_left_panel
321
    call draw_left_panel
322
    jmp  still
322
    jmp  still
323
@@:
323
@@:
324
    sub  [left_start_draw_line],eax
324
    sub  [left_start_draw_line],eax
325
    call draw_left_panel
325
    call draw_left_panel
326
    jmp  still
326
    jmp  still
327
.right_1:
327
.right_1:
328
    mov  ebx,[right_start_draw_line]
328
    mov  ebx,[right_start_draw_line]
329
    sub  ebx,eax
329
    sub  ebx,eax
330
    test ebx,0x80000000
330
    test ebx,0x80000000
331
    jz   @f
331
    jz   @f
332
    cmp  [right_start_draw_line],0
332
    cmp  [right_start_draw_line],0
333
    jne  .draw_line_2
333
    jne  .draw_line_2
334
    cmp  [right_start_draw_cursor_line],0
334
    cmp  [right_start_draw_cursor_line],0
335
    je   still
335
    je   still
336
    mov  [right_start_draw_cursor_line],0
336
    mov  [right_start_draw_cursor_line],0
337
.draw_line_2:
337
.draw_line_2:
338
    mov  [right_start_draw_line],0
338
    mov  [right_start_draw_line],0
339
    call draw_right_panel
339
    call draw_right_panel
340
    jmp  still
340
    jmp  still
341
@@:
341
@@:
342
    sub  [right_start_draw_line],eax
342
    sub  [right_start_draw_line],eax
343
    call draw_right_panel
343
    call draw_right_panel
344
    jmp  still
344
    jmp  still
345
;-------------------------------------------------------------
345
;-------------------------------------------------------------
346
key_71:
346
key_71:
347
    cmp  ah,71 ; Home
347
    cmp  ah,71 ; Home
348
    jne  key_79
348
    jne  key_79
349
    cmp  [select_panel_counter],0
349
    cmp  [select_panel_counter],0
350
    jne  .right_1
350
    jne  .right_1
351
    cmp  [left_start_draw_line],0
351
    cmp  [left_start_draw_line],0
352
    jne   .draw_left_panel
352
    jne   .draw_left_panel
353
    cmp  [left_start_draw_cursor_line],0
353
    cmp  [left_start_draw_cursor_line],0
354
    je   still
354
    je   still
355
.draw_left_panel:
355
.draw_left_panel:
356
    mov  [left_start_draw_line],0
356
    mov  [left_start_draw_line],0
357
    mov  [left_start_draw_cursor_line],0
357
    mov  [left_start_draw_cursor_line],0
358
    call draw_left_panel
358
    call draw_left_panel
359
    jmp  still
359
    jmp  still
360
.right_1:
360
.right_1:
361
    cmp  [right_start_draw_line],0
361
    cmp  [right_start_draw_line],0
362
    jne   .draw_right_panel
362
    jne   .draw_right_panel
363
    cmp  [right_start_draw_cursor_line],0
363
    cmp  [right_start_draw_cursor_line],0
364
    je   still
364
    je   still
365
.draw_right_panel:
365
.draw_right_panel:
366
    mov  [right_start_draw_line],0
366
    mov  [right_start_draw_line],0
367
    mov  [right_start_draw_cursor_line],0
367
    mov  [right_start_draw_cursor_line],0
368
    call draw_right_panel
368
    call draw_right_panel
369
    jmp  still
369
    jmp  still
370
;-------------------------------------------------------------
370
;-------------------------------------------------------------
371
key_79:
371
key_79:
372
    cmp  ah,79 ; End
372
    cmp  ah,79 ; End
373
    jne  key_28
373
    jne  key_28
374
    cmp  [select_panel_counter],0
374
    cmp  [select_panel_counter],0
375
    jne  .right_1
375
    jne  .right_1
376
    mov  eax,[left_folder_block]
376
    mov  eax,[left_folder_block]
377
    sub  eax,[max_panel_line]
377
    sub  eax,[max_panel_line]
378
    test eax,0x80000000
378
    test eax,0x80000000
379
    jnz  key_81.left_2
379
    jnz  key_81.left_2
380
    call prepare_data_left_down
380
    call prepare_data_left_down
381
    ja   @f
381
    ja   @f
382
    cmp  eax,[left_start_draw_line]
382
    cmp  eax,[left_start_draw_line]
383
    je   still
383
    je   still
384
@@:
384
@@:
385
    mov  [left_start_draw_line],eax
385
    mov  [left_start_draw_line],eax
386
    mov  eax,[max_panel_line]
386
    mov  eax,[max_panel_line]
387
    jmp  key_81.left_3
387
    jmp  key_81.left_3
388
.right_1:
388
.right_1:
389
    mov  eax,[right_folder_block]
389
    mov  eax,[right_folder_block]
390
    sub  eax,[max_panel_line]
390
    sub  eax,[max_panel_line]
391
    test eax,0x80000000
391
    test eax,0x80000000
392
    jnz  key_81.right_3
392
    jnz  key_81.right_3
393
    call prepare_data_right_down
393
    call prepare_data_right_down
394
    ja   @f
394
    ja   @f
395
    cmp  eax,[right_start_draw_line]
395
    cmp  eax,[right_start_draw_line]
396
    je   still
396
    je   still
397
@@:
397
@@:
398
    mov  [right_start_draw_line],eax
398
    mov  [right_start_draw_line],eax
399
    mov  eax,[max_panel_line]
399
    mov  eax,[max_panel_line]
400
    jmp  key_81.right_4    
400
    jmp  key_81.right_4    
401
;-------------------------------------------------------------
401
;-------------------------------------------------------------
402
key_28:
402
key_28:
403
    cmp  ah,28 ; Enter
403
    cmp  ah,28 ; Enter
404
    jne  key_ctrl_up
404
    jne  key_ctrl_up
405
.1:
405
.1:
406
    cmp  [shift_flag],1
406
    cmp  [shift_flag],1
407
    je   still
407
    je   still
408
    cmp  [ctrl_flag],1
408
    cmp  [ctrl_flag],1
409
    je   still
409
    je   still
410
    cmp  [alt_flag],1
410
    cmp  [alt_flag],1
411
    je   files_information
411
    je   files_information
412
    
412
    
413
    mov  [open_param],0
413
    mov  [open_param],0
414
.2:
414
.2:
415
    cmp  [select_panel_counter],0
415
    cmp  [select_panel_counter],0
416
    jne  .right_1
416
    jne  .right_1
417
    mov  ebp,read_folder_name    ;read_folder.name
417
    mov  ebp,read_folder_name    ;read_folder.name
418
    call  calculate_left_data_1
418
    call  calculate_left_data_1
419
    add  esi,32
419
    add  esi,32
420
    cmp  [exit_dir],1
420
    cmp  [exit_dir],1
421
    je   .up_patch
421
    je   .up_patch
422
    test [esi],byte 0x10
422
    test [esi],byte 0x10
423
    jz   file_no_folder
423
    jz   file_no_folder
424
    cmp  [open_param],0
424
    cmp  [open_param],0
425
    jne  still
425
    jne  still
426
    cmp  [esi+40],word 2Eh
426
    cmp  [esi+40],word 2Eh
427
    je   still
427
    je   still
428
    cmp  [esi+40],word '..'
428
    cmp  [esi+40],word '..'
-
 
429
    jne  @f
-
 
430
    cmp  [esi+40+2],byte 0
429
    je   .up_patch
431
    je   .up_patch
-
 
432
@@:
430
    call calculate_key_28_1
433
    call calculate_key_28_1
431
    mov  [left_start_draw_cursor_line],0
434
    mov  [left_start_draw_cursor_line],0
432
    mov  [left_start_draw_line],0
435
    mov  [left_start_draw_line],0
433
    jmp  proc_read_folder
436
    jmp  proc_read_folder
434
.up_patch:
437
.up_patch:
435
    call calculate_key_28_2
438
    call calculate_key_28_2
436
    jmp  proc_read_folder
439
    jmp  proc_read_folder
437
.right_1:
440
.right_1:
438
    mov  ebp,read_folder_1_name   ;read_folder_1.name
441
    mov  ebp,read_folder_1_name   ;read_folder_1.name
439
    call calculate_right_data_1
442
    call calculate_right_data_1
440
    add  esi,32
443
    add  esi,32
441
    cmp  [exit_dir],1
444
    cmp  [exit_dir],1
442
    je   .up_patch_1
445
    je   .up_patch_1
443
    test [esi],byte 0x10
446
    test [esi],byte 0x10
444
    jz   file_no_folder
447
    jz   file_no_folder
445
    cmp  [esi+40],word 2Eh
448
    cmp  [esi+40],word 2Eh
446
    je   still
449
    je   still
447
    cmp  [esi+40],word '..'
450
    cmp  [esi+40],word '..'
-
 
451
    jne  @f
-
 
452
    cmp  [esi+40+2],byte 0
448
    je   .up_patch_1
453
    je   .up_patch_1
-
 
454
@@:
449
    call calculate_key_28_1
455
    call calculate_key_28_1
450
    mov  [right_start_draw_cursor_line],0
456
    mov  [right_start_draw_cursor_line],0
451
    mov  [right_start_draw_line],0
457
    mov  [right_start_draw_line],0
452
    jmp  proc_read_folder_1
458
    jmp  proc_read_folder_1
453
.up_patch_1:
459
.up_patch_1:
454
    call calculate_key_28_2
460
    call calculate_key_28_2
455
    jmp  proc_read_folder_1
461
    jmp  proc_read_folder_1
456
;---------------------------------------------------------------------
462
;---------------------------------------------------------------------
457
calculate_key_28_1:    
463
calculate_key_28_1:    
458
;    mov  edi,read_folder.name-1
464
;    mov  edi,read_folder.name-1
459
    mov  edi,ebp
465
    mov  edi,ebp
460
    dec  edi
466
    dec  edi
461
    inc  ebp
467
    inc  ebp
462
@@:
468
@@:
463
    inc  edi
469
    inc  edi
464
    cmp  [edi],byte 0
470
    cmp  [edi],byte 0
465
    jne  @r
471
    jne  @r
466
    cmp  edi,ebp ;read_folder.name+1
472
    cmp  edi,ebp ;read_folder.name+1
467
    je   @f
473
    je   @f
468
    mov  al,'/'
474
    mov  al,'/'
469
    mov [edi],al
475
    mov [edi],al
470
    inc  edi
476
    inc  edi
471
@@:
477
@@:
472
    add  esi,40
478
    add  esi,40
473
@@:
479
@@:
474
    cld
480
    cld
475
    lodsb
481
    lodsb
476
    stosb
482
    stosb
477
    cmp al,0
483
    cmp al,0
478
    jnz   @r
484
    jnz   @r
479
    ret
485
    ret
480
;---------------------------------------------------------------------
486
;---------------------------------------------------------------------
481
calculate_key_28_2:
487
calculate_key_28_2:
482
    mov  [exit_dir],0
488
    mov  [exit_dir],0
483
    mov  edi,ebp ;read_folder.name
489
    mov  edi,ebp ;read_folder.name
484
@@:
490
@@:
485
    inc  edi
491
    inc  edi
486
    cmp  [edi],byte 0
492
    cmp  [edi],byte 0
487
    jne  @r
493
    jne  @r
488
    mov  [extension_size],edi
494
    mov  [extension_size],edi
489
    dec  edi
495
    dec  edi
490
@@:
496
@@:
491
    dec  edi
497
    dec  edi
492
    cmp  [edi],byte '/'
498
    cmp  [edi],byte '/'
493
    jne  @r
499
    jne  @r
494
    mov  eax,ebp ;read_folder.name
500
    mov  eax,ebp ;read_folder.name
495
    cmp  edi,eax
501
    cmp  edi,eax
496
    jbe  @f
502
    jbe  @f
497
    mov  [edi],byte 0
503
    mov  [edi],byte 0
498
@@:
504
@@:
499
    inc  edi
505
    inc  edi
500
    mov  [temp_counter_dword],edi
506
    mov  [temp_counter_dword],edi
501
    dec  edi
507
    dec  edi
502
    sub  [extension_size],edi
508
    sub  [extension_size],edi
503
    mov  [search_pre_folder],1
509
    mov  [search_pre_folder],1
504
    ret
510
    ret
505
;---------------------------------------------------------------------
511
;---------------------------------------------------------------------
506
set_background:
512
set_background:
507
    cmp  [shift_flag],1
513
    cmp  [shift_flag],1
508
    je   .shift
514
    je   .shift
509
    cmp  [ctrl_flag],1
515
    cmp  [ctrl_flag],1
510
    jne  still
516
    jne  still
511
    mov  [open_param],background_stretch
517
    mov  [open_param],background_stretch
512
    jmp  key_28.2
518
    jmp  key_28.2
513
.shift:
519
.shift:
514
    mov  [open_param],background_tile
520
    mov  [open_param],background_tile
515
    jmp  key_28.2    
521
    jmp  key_28.2    
516
;---------------------------------------------------------------------    
522
;---------------------------------------------------------------------    
517
reload_dir_1:
523
reload_dir_1:
518
    cmp  [ctrl_flag],0
524
    cmp  [ctrl_flag],0
519
    je   still
525
    je   still
520
    jmp  reload_dir
526
    jmp  reload_dir
521
;---------------------------------------------------------------------
527
;---------------------------------------------------------------------
522
symbol_a_up:
528
symbol_a_up:
523
    cmp  [shift_flag],1
529
    cmp  [shift_flag],1
524
    je   still
530
    je   still
525
    cmp  [ctrl_flag],1
531
    cmp  [ctrl_flag],1
526
    je   .ctrl
532
    je   .ctrl
527
    cmp  [alt_flag],1
533
    cmp  [alt_flag],1
528
    je   still
534
    je   still
529
    jmp  still
535
    jmp  still
530
.ctrl:
536
.ctrl:
531
    mov  [mark_action_counter],0
537
    mov  [mark_action_counter],0
532
    jmp  mark_all_file
538
    jmp  mark_all_file
533
;---------------------------------------------------------------------
539
;---------------------------------------------------------------------
534
NumPad_plus_Up:
540
NumPad_plus_Up:
535
    cmp  [shift_flag],1
541
    cmp  [shift_flag],1
536
    je   still
542
    je   still
537
    cmp  [ctrl_flag],1
543
    cmp  [ctrl_flag],1
538
    je   .ctrl
544
    je   .ctrl
539
    cmp  [alt_flag],1
545
    cmp  [alt_flag],1
540
    je   still
546
    je   still
541
    jmp  still
547
    jmp  still
542
.ctrl:
548
.ctrl:
543
    mov  [mark_action_counter],0
549
    mov  [mark_action_counter],0
544
    jmp  mark_all_file
550
    jmp  mark_all_file
545
;---------------------------------------------------------------------
551
;---------------------------------------------------------------------
546
NumPad_minus_Up:
552
NumPad_minus_Up:
547
    cmp  [shift_flag],1
553
    cmp  [shift_flag],1
548
    je   still
554
    je   still
549
    cmp  [ctrl_flag],1
555
    cmp  [ctrl_flag],1
550
    je   .ctrl
556
    je   .ctrl
551
    cmp  [alt_flag],1
557
    cmp  [alt_flag],1
552
    je   still
558
    je   still
553
    jmp  still
559
    jmp  still
554
.ctrl:
560
.ctrl:
555
    mov  [mark_action_counter],1
561
    mov  [mark_action_counter],1
556
    jmp  mark_all_file
562
    jmp  mark_all_file
557
;---------------------------------------------------------------------
563
;---------------------------------------------------------------------
558
NumPad_sneg_Up:
564
NumPad_sneg_Up:
559
    cmp  [shift_flag],1
565
    cmp  [shift_flag],1
560
    je   still
566
    je   still
561
    cmp  [ctrl_flag],1
567
    cmp  [ctrl_flag],1
562
    je   .ctrl
568
    je   .ctrl
563
    cmp  [alt_flag],1
569
    cmp  [alt_flag],1
564
    je   still
570
    je   still
565
    jmp  still
571
    jmp  still
566
.ctrl:
572
.ctrl:
567
    mov  [mark_action_counter],2
573
    mov  [mark_action_counter],2
568
    jmp  mark_all_file
574
    jmp  mark_all_file
569
;---------------------------------------------------------------------
575
;---------------------------------------------------------------------
570
f_key_f1:
576
f_key_f1:
571
;sort_name:
577
;sort_name:
572
    cmp  [shift_flag],1
578
    cmp  [shift_flag],1
573
    je   still
579
    je   still
574
    cmp  [ctrl_flag],1
580
    cmp  [ctrl_flag],1
575
    je   still
581
    je   still
576
    cmp  [alt_flag],1
582
    cmp  [alt_flag],1
577
    je   draw_left_select_disk_menu
583
    je   draw_left_select_disk_menu
578
    jmp  help_start
584
    jmp  help_start
579
;---------------------------------------------------------------------
585
;---------------------------------------------------------------------
580
f_key_f2:
586
f_key_f2:
581
;sort_name:
587
;sort_name:
582
    cmp  [shift_flag],1
588
    cmp  [shift_flag],1
583
    je   still
589
    je   still
584
    cmp  [ctrl_flag],1
590
    cmp  [ctrl_flag],1
585
    je   still
591
    je   still
586
    cmp  [alt_flag],1
592
    cmp  [alt_flag],1
587
    je   draw_right_select_disk_menu
593
    je   draw_right_select_disk_menu
588
    jmp  still
594
    jmp  still
589
;---------------------------------------------------------------------
595
;---------------------------------------------------------------------
590
f_key_f3:
596
f_key_f3:
591
;sort_name:
597
;sort_name:
592
    cmp  [shift_flag],1
598
    cmp  [shift_flag],1
593
    je   still
599
    je   still
594
    cmp  [ctrl_flag],1
600
    cmp  [ctrl_flag],1
595
    je   .ctrl
601
    je   .ctrl
596
    cmp  [alt_flag],1
602
    cmp  [alt_flag],1
597
    je   still
603
    je   still
598
    jmp  still
604
    jmp  still
599
.ctrl:
605
.ctrl:
600
    cmp  [select_panel_counter],1
606
    cmp  [select_panel_counter],1
601
    je   right_sort_name
607
    je   right_sort_name
602
    jmp  left_sort_name
608
    jmp  left_sort_name
603
;---------------------------------------------------------------------
609
;---------------------------------------------------------------------
604
f_key_f4:
610
f_key_f4:
605
;sort_type:
611
;sort_type:
606
    cmp  [shift_flag],1
612
    cmp  [shift_flag],1
607
    je   still
613
    je   still
608
    cmp  [ctrl_flag],1
614
    cmp  [ctrl_flag],1
609
    je   .ctrl
615
    je   .ctrl
610
    cmp  [alt_flag],1
616
    cmp  [alt_flag],1
611
    je   still
617
    je   still
612
    jmp  open_file_f4
618
    jmp  open_file_f4
613
.ctrl:
619
.ctrl:
614
    cmp  [select_panel_counter],1
620
    cmp  [select_panel_counter],1
615
    je   right_sort_type
621
    je   right_sort_type
616
    jmp  left_sort_type
622
    jmp  left_sort_type
617
;---------------------------------------------------------------------
623
;---------------------------------------------------------------------
618
f_key_f5:
624
f_key_f5:
619
;sort_size:
625
;sort_size:
620
    cmp  [shift_flag],1
626
    cmp  [shift_flag],1
621
    je   still
627
    je   still
622
    cmp  [ctrl_flag],1
628
    cmp  [ctrl_flag],1
623
    je   .ctrl
629
    je   .ctrl
624
    cmp  [alt_flag],1
630
    cmp  [alt_flag],1
625
    je   still
631
    je   still
626
    jmp  copy_file_f5
632
    jmp  copy_file_f5
627
.ctrl:
633
.ctrl:
628
    cmp  [select_panel_counter],1
634
    cmp  [select_panel_counter],1
629
    je   right_sort_size
635
    je   right_sort_size
630
    jmp  left_sort_size
636
    jmp  left_sort_size
631
;---------------------------------------------------------------------
637
;---------------------------------------------------------------------
632
f_key_f6:
638
f_key_f6:
633
;sort_date:
639
;sort_date:
634
    cmp  [shift_flag],1
640
    cmp  [shift_flag],1
635
    je   .shift
641
    je   .shift
636
    cmp  [ctrl_flag],1
642
    cmp  [ctrl_flag],1
637
    je   .ctrl
643
    je   .ctrl
638
    cmp  [alt_flag],1
644
    cmp  [alt_flag],1
639
    je   still
645
    je   still
640
    jmp  move_file_f6
646
    jmp  move_file_f6
641
.shift:
647
.shift:
642
    jmp  still
648
    jmp  still
643
.ctrl:
649
.ctrl:
644
    cmp  [select_panel_counter],1
650
    cmp  [select_panel_counter],1
645
    je   right_sort_date
651
    je   right_sort_date
646
    jmp  left_sort_date
652
    jmp  left_sort_date
647
;---------------------------------------------------------------------
653
;---------------------------------------------------------------------
648
f_key_f7:
654
f_key_f7:
649
    cmp  [shift_flag],1
655
    cmp  [shift_flag],1
650
    je   still
656
    je   still
651
    cmp  [ctrl_flag],1
657
    cmp  [ctrl_flag],1
652
    je   still
658
    je   still
653
    cmp  [alt_flag],1
659
    cmp  [alt_flag],1
654
    je   still
660
    je   still
655
    jmp  create_directory
661
    jmp  create_directory
656
;---------------------------------------------------------------------
662
;---------------------------------------------------------------------
657
f_key_f8:
663
f_key_f8:
658
    cmp  [shift_flag],1
664
    cmp  [shift_flag],1
659
    je   still
665
    je   still
660
    cmp  [ctrl_flag],1
666
    cmp  [ctrl_flag],1
661
    je   still
667
    je   still
662
    cmp  [alt_flag],1
668
    cmp  [alt_flag],1
663
    je   still
669
    je   still
664
    jmp  delete_file
670
    jmp  delete_file
665
;---------------------------------------------------------------------
671
;---------------------------------------------------------------------
666
f_key_f9:
672
f_key_f9:
667
    cmp  [shift_flag],1
673
    cmp  [shift_flag],1
668
    je   still
674
    je   still
669
    cmp  [ctrl_flag],1
675
    cmp  [ctrl_flag],1
670
    je   still
676
    je   still
671
    cmp  [alt_flag],1
677
    cmp  [alt_flag],1
672
    je   still
678
    je   still
673
    jmp  create_new_file; create_directory;
679
    jmp  create_new_file; create_directory;
674
;---------------------------------------------------------------------
680
;---------------------------------------------------------------------
675
f_key_f12:
681
f_key_f12:
676
    cmp  [shift_flag],1
682
    cmp  [shift_flag],1
677
    je   still
683
    je   still
678
    cmp  [ctrl_flag],1
684
    cmp  [ctrl_flag],1
679
    je   still
685
    je   still
680
    cmp  [alt_flag],1
686
    cmp  [alt_flag],1
681
    je   still
687
    je   still
682
    jmp  exit_apl
688
    jmp  exit_apl
683
;---------------------------------------------------------------------
689
;---------------------------------------------------------------------
684
key_shift_up:
690
key_shift_up:
685
    cmp  [shift_flag],1
691
    cmp  [shift_flag],1
686
    je   still
692
    je   still
687
    mov  [shift_flag],1
693
    mov  [shift_flag],1
688
    jmp  key_alt_down.for_all
694
    jmp  key_alt_down.for_all
689
;---------------------------------------------------------------------
695
;---------------------------------------------------------------------
690
key_shift_down:
696
key_shift_down:
691
    mov  [shift_flag],0
697
    mov  [shift_flag],0
692
    jmp  key_alt_down.for_all
698
    jmp  key_alt_down.for_all
693
;---------------------------------------------------------------------
699
;---------------------------------------------------------------------
694
key_ctrl_up:
700
key_ctrl_up:
695
    cmp   ah,29
701
    cmp   ah,29
696
    jne   key_ctrl_down
702
    jne   key_ctrl_down
697
.1:
703
.1:
698
    cmp  [ctrl_flag],1
704
    cmp  [ctrl_flag],1
699
    je   still
705
    je   still
700
    mov  [ctrl_flag],1
706
    mov  [ctrl_flag],1
701
    jmp  key_alt_down.for_all
707
    jmp  key_alt_down.for_all
702
;---------------------------------------------------------------------
708
;---------------------------------------------------------------------
703
key_ctrl_down:
709
key_ctrl_down:
704
    cmp   ah,157
710
    cmp   ah,157
705
    jne   key_alt_up
711
    jne   key_alt_up
706
.1:
712
.1:
707
    mov  [ctrl_flag],0
713
    mov  [ctrl_flag],0
708
    jmp  key_alt_down.for_all
714
    jmp  key_alt_down.for_all
709
;---------------------------------------------------------------------
715
;---------------------------------------------------------------------
710
key_alt_up:
716
key_alt_up:
711
    cmp   ah,56
717
    cmp   ah,56
712
    jne   key_alt_down
718
    jne   key_alt_down
713
.1:
719
.1:
714
    cmp  [alt_flag],1
720
    cmp  [alt_flag],1
715
    je   still
721
    je   still
716
    mov  [alt_flag],1
722
    mov  [alt_flag],1
717
    jmp  key_alt_down.for_all
723
    jmp  key_alt_down.for_all
718
;---------------------------------------------------------------------
724
;---------------------------------------------------------------------
719
key_alt_down:
725
key_alt_down:
720
    cmp   ah,184
726
    cmp   ah,184
721
    jne   key_insert
727
    jne   key_insert
722
.1:
728
.1:
723
    mov  [alt_flag],0
729
    mov  [alt_flag],0
724
.for_all:
730
.for_all:
725
    call erase_fbutton
731
    call erase_fbutton
726
    call draw_fbutton
732
    call draw_fbutton
727
    jmp  still
733
    jmp  still
728
;---------------------------------------------------------------------
734
;---------------------------------------------------------------------
729
key_insert:
735
key_insert:
730
    cmp   ah,82   ; Insert
736
    cmp   ah,82   ; Insert
731
    je    mark_file
737
    je    mark_file
732
    cmp   ah,83
738
    cmp   ah,83
733
    je    f_key_f8      ;delete_file
739
    je    f_key_f8      ;delete_file
734
key_end:
740
key_end:
735
    jmp  still
741
    jmp  still
736
;---------------------------------------------------------------------
742
;---------------------------------------------------------------------