diff --git a/programs/fs/kfm/trunk/button.inc b/programs/fs/kfm/trunk/button.inc index 0d52ff6047..5525ce0300 100644 --- a/programs/fs/kfm/trunk/button.inc +++ b/programs/fs/kfm/trunk/button.inc @@ -1,199 +1,202 @@ ;------------------------------------------------------------------------------ button: - mcall 17 + mcall 17 ;-------------------------------------- .1: - cmp ah,101 - je f_key_f1 + cmp ah,101 + je f_key_f1 - cmp ah,102 - je f_key_f2 + cmp ah,102 + je f_key_f2 - cmp ah,103 - je f_key_f3 ;sort_name + cmp ah,103 + je f_key_f3 ;sort_name - cmp ah,104 - je f_key_f4 ;sort_type + cmp ah,104 + je f_key_f4 ;sort_type - cmp ah,105 - je f_key_f5 ;sort_size + cmp ah,105 + je f_key_f5 ;sort_size - cmp ah,106 - je f_key_f6 ;sort_date + cmp ah,106 + je f_key_f6 ;sort_date - cmp ah,107 - je f_key_f7 ;create di + cmp ah,107 + je f_key_f7 ;create dir - cmp ah,108 - je f_key_f8 ;delete_file + cmp ah,108 + je f_key_f8 ;delete_file - cmp ah,112 - je f_key_f12 + cmp ah,109 + je f_key_f9 ;create file + + cmp ah,112 + je f_key_f12 ;-------------------------------------- .120: - cmp ah,120 - jb .140 - - cmp ah,139 - ja .140 - - sub ah,120 - movzx eax,ah - imul eax,10 - add eax,retrieved_devices_table+1 - mov esi,eax ; selected path + cmp ah,120 + jb .140 + + cmp ah,139 + ja .140 + + sub ah,120 + movzx eax,ah + imul eax,10 + add eax,retrieved_devices_table+1 + mov esi,eax ; selected path - cmp [select_panel_counter],0 - jne @f + cmp [select_panel_counter],0 + jne @f - call copy_folder_name - jmp left_panel_read_folder + call copy_folder_name + jmp left_panel_read_folder ;-------------------------------------- @@: - call copy_folder_name_1 - jmp right_panel_read_folder + call copy_folder_name_1 + jmp right_panel_read_folder ;-------------------------------------- .140: - cmp ah,140 - je draw_left_select_disk_menu + cmp ah,140 + je draw_left_select_disk_menu - cmp ah,141 - je draw_right_select_disk_menu + cmp ah,141 + je draw_right_select_disk_menu - cmp ah,142 - je left_sort_name + cmp ah,142 + je left_sort_name - cmp ah,143 - je left_sort_type + cmp ah,143 + je left_sort_type - cmp ah,144 - je left_sort_size + cmp ah,144 + je left_sort_size - cmp ah,145 - je left_sort_date + cmp ah,145 + je left_sort_date - cmp ah,146 - je right_sort_name + cmp ah,146 + je right_sort_name - cmp ah,147 - je right_sort_type + cmp ah,147 + je right_sort_type - cmp ah,148 - je right_sort_size + cmp ah,148 + je right_sort_size - cmp ah,149 - je right_sort_date + cmp ah,149 + je right_sort_date - cmp ah,150 - je exit_dir_1 + cmp ah,150 + je exit_dir_1 - cmp ah,151 - je reload_dir + cmp ah,151 + je reload_dir - cmp ah,152 - je create_directory + cmp ah,152 + je create_directory - cmp ah,153 - je copy_file_f5 + cmp ah,153 + je copy_file_f5 - cmp ah,154 - je move_file_f6 + cmp ah,154 + je move_file_f6 - cmp ah,157 - je delete_file + cmp ah,157 + je delete_file - cmp ah, 1 - jne still + cmp ah, 1 + jne still ;-------------------------------------- .exit: - mcall -1 + mcall -1 ;--------------------------------------------------------------------- reload_dir: - cmp [select_panel_counter],0 - jne @f - call proc_read_left_folder -; mov [left_panel_clear_all],1 - call draw_left_panel - jmp still + cmp [select_panel_counter],0 + jne @f + call proc_read_left_folder +; mov [left_panel_clear_all],1 + call draw_left_panel + jmp still @@: - call proc_read_right_folder -; mov [right_panel_clear_all],1 - call draw_right_panel - jmp still + call proc_read_right_folder +; mov [right_panel_clear_all],1 + call draw_right_panel + jmp still ;--------------------------------------------------------------------- reload_dir_all: - call proc_read_left_folder - call proc_read_right_folder - jmp red + call proc_read_left_folder + call proc_read_right_folder + jmp red ;--------------------------------------------------------------------- exit_dir_1: - mov [exit_dir],1 - jmp key_28.1 + mov [exit_dir],1 + jmp key_28.1 ;--------------------------------------------------------------------- left_panel_read_folder: - mov [left_start_draw_cursor_line],0 - jmp proc_read_folder + mov [left_start_draw_cursor_line],0 + jmp proc_read_folder ;--------------------------------------------------------------------- right_panel_read_folder: - mov [right_start_draw_cursor_line],0 - jmp proc_read_folder_1 + mov [right_start_draw_cursor_line],0 + jmp proc_read_folder_1 ;--------------------------------------------------------------------- left_sort_name: - xor eax,eax - cmp [left_sort_flag],eax - je still - mov [left_sort_flag],eax - jmp left_sort_date.1 + xor eax,eax + cmp [left_sort_flag],eax + je still + mov [left_sort_flag],eax + jmp left_sort_date.1 ;--------------------------------------------------------------------- left_sort_type: - cmp [left_sort_flag],1 - je still - mov [left_sort_flag],1 - jmp left_sort_date.1 + cmp [left_sort_flag],1 + je still + mov [left_sort_flag],1 + jmp left_sort_date.1 ;--------------------------------------------------------------------- left_sort_size: - cmp [left_sort_flag],2 - je still - mov [left_sort_flag],2 - jmp left_sort_date.1 + cmp [left_sort_flag],2 + je still + mov [left_sort_flag],2 + jmp left_sort_date.1 ;--------------------------------------------------------------------- left_sort_date: - cmp [left_sort_flag],3 - je still - mov [left_sort_flag],3 + cmp [left_sort_flag],3 + je still + mov [left_sort_flag],3 .1: - call draw_left_sort_button - call left_sort_files -; mov [left_panel_clear_all],1 - call draw_left_panel - jmp still + call draw_left_sort_button + call left_sort_files +; mov [left_panel_clear_all],1 + call draw_left_panel + jmp still ;--------------------------------------------------------------------- right_sort_name: - xor eax,eax - cmp [right_sort_flag],eax - je still - mov [right_sort_flag],eax - jmp right_sort_date.1 + xor eax,eax + cmp [right_sort_flag],eax + je still + mov [right_sort_flag],eax + jmp right_sort_date.1 ;--------------------------------------------------------------------- right_sort_type: - cmp [right_sort_flag],1 - je still - mov [right_sort_flag],1 - jmp right_sort_date.1 + cmp [right_sort_flag],1 + je still + mov [right_sort_flag],1 + jmp right_sort_date.1 ;--------------------------------------------------------------------- right_sort_size: - cmp [right_sort_flag],2 - je still - mov [right_sort_flag],2 - jmp right_sort_date.1 + cmp [right_sort_flag],2 + je still + mov [right_sort_flag],2 + jmp right_sort_date.1 ;--------------------------------------------------------------------- right_sort_date: - cmp [right_sort_flag],3 - je still - mov [right_sort_flag],3 + cmp [right_sort_flag],3 + je still + mov [right_sort_flag],3 .1: - call draw_right_sort_button - call right_sort_files - call draw_right_panel - jmp still + call draw_right_sort_button + call right_sort_files + call draw_right_panel + jmp still ;--------------------------------------------------------------------- \ No newline at end of file diff --git a/programs/fs/kfm/trunk/key.inc b/programs/fs/kfm/trunk/key.inc index aa08ef957d..83c6e4b390 100644 --- a/programs/fs/kfm/trunk/key.inc +++ b/programs/fs/kfm/trunk/key.inc @@ -1,7 +1,7 @@ key: mcall 2 cmp [extended_key],1 - je .extended_key + je .extended_key test al, al jnz still cmp ah, 0xE0 @@ -18,33 +18,33 @@ key: jmp still .no_tab: cmp ah,72 ; arrow up - je key_72.1 + je key_72.1 cmp ah,80 ; arrow down - je key_80.1 + je key_80.1 cmp ah,28 ; Enter - je key_28.1 + je key_28.1 cmp ah,17 ; W je set_background cmp ah,19 ; R - je reload_dir_1 + je reload_dir_1 cmp ah,42 - je key_shift_up + je key_shift_up cmp ah,54 - je key_shift_up + je key_shift_up cmp ah,142 - je exit_dir_1 ; BackSpace Up + je exit_dir_1 ; BackSpace Up cmp ah,170 - je key_shift_down + je key_shift_down cmp ah,182 - je key_shift_down + je key_shift_down cmp ah,29 - je key_ctrl_up.1 + je key_ctrl_up.1 cmp ah,157 - je key_ctrl_down.1 + je key_ctrl_down.1 cmp ah,56 - je key_alt_up.1 + je key_alt_up.1 cmp ah,184 - je key_alt_down.1 + je key_alt_down.1 cmp ah,206 ; NumPad+ Up je NumPad_plus_Up cmp ah,202 ; NumPad- Up @@ -54,29 +54,31 @@ key: cmp ah,158 je symbol_a_up cmp ah,59 ; down F1 - je f_key_f1 + je f_key_f1 cmp ah,60 ; down F2 - je f_key_f2 + je f_key_f2 cmp ah,61 ; down F3 - je f_key_f3 ;sort_name + je f_key_f3 ;sort_name cmp ah,62 ; down F4 - je f_key_f4 ;sort_type + je f_key_f4 ;sort_type cmp ah,63 ; down F5 - je f_key_f5 ;sort_size + je f_key_f5 ;sort_size cmp ah,64 ; down F6 - je f_key_f6 ; sort_date + je f_key_f6 ; sort_date cmp ah,65 ; down F7 - je f_key_f7 ; + je f_key_f7 ; cmp ah,66 ; down F8 - je f_key_f8 ; delete_file + je f_key_f8 ; delete_file + cmp ah,67 + je f_key_f9 cmp ah,88 ; down F12 - je f_key_f12 + je f_key_f12 jmp still ;------------------------------------------------------------- .extended_key: mov [extended_key],0 key_80: - cmp ah,80 ; arrow down + cmp ah,80 ; arrow down jne key_72 .1: cmp [select_panel_counter],0 @@ -94,11 +96,11 @@ key_80: add [left_start_draw_cursor_line],10 call draw_left_panel mov [drawing_panel_folder],1 - jmp still + jmp still .all: sub ecx,10 shl 16 mov edx,0xffffff - mcall + mcall mov [not_clear_lines],1 call draw_folder_data mov [not_clear_lines],0 @@ -119,13 +121,13 @@ key_80: mov eax,[left_folder_block] sub eax,[max_panel_line] test eax,0x80000000 - jz @f + jz @f xor eax,eax @@: cmp [marked_action],0 jne @f cmp [left_start_draw_line],eax - je still + je still @@: mov [marked_action],0 inc [left_start_draw_line] @@ -150,13 +152,13 @@ key_80: mov eax,[right_folder_block] sub eax,[max_panel_line] test eax,0x80000000 - jz @f + jz @f xor eax,eax @@: cmp [marked_action],0 jne @f cmp [right_start_draw_line],eax - je still + je still @@: mov [marked_action],0 inc [right_start_draw_line] @@ -164,7 +166,7 @@ key_80: jmp still ;------------------------------------------------------------- key_72: - cmp ah,72 ;arrow up + cmp ah,72 ;arrow up jne key_81 .1: cmp [select_panel_counter],0 @@ -172,22 +174,22 @@ key_72: mov ax,[left_start_draw_cursor_line] add ax,[left_panel_y.start_y] cmp [left_panel_y.start_y],ax - je @f + je @f sub [left_start_draw_cursor_line],10 call draw_left_panel mov [drawing_panel_folder],1 - jmp still + jmp still .all: add ecx,10 shl 16 mov edx,0xffffff - mcall + mcall mov [not_clear_lines],1 call draw_folder_data mov [not_clear_lines],0 jmp still @@: cmp [left_start_draw_line],0 - je still + je still dec [left_start_draw_line] call draw_left_panel jmp still @@ -195,14 +197,14 @@ key_72: mov ax,[right_start_draw_cursor_line] add ax,[right_panel_y.start_y] cmp [right_panel_y.start_y],ax - je @f + je @f sub [right_start_draw_cursor_line],10 call draw_right_panel mov [drawing_panel_folder],2 jmp still @@: cmp [right_start_draw_line],0 - je still + je still dec [right_start_draw_line] call draw_right_panel jmp still @@ -308,11 +310,11 @@ key_73: mov ebx,[left_start_draw_line] sub ebx,eax test ebx,0x8000000 - jz @f + jz @f cmp [left_start_draw_line],0 jne .draw_line_1 cmp [left_start_draw_cursor_line],0 - je still + je still mov [left_start_draw_cursor_line],0 .draw_line_1: mov [left_start_draw_line],0 @@ -326,11 +328,11 @@ key_73: mov ebx,[right_start_draw_line] sub ebx,eax test ebx,0x80000000 - jz @f + jz @f cmp [right_start_draw_line],0 jne .draw_line_2 cmp [right_start_draw_cursor_line],0 - je still + je still mov [right_start_draw_cursor_line],0 .draw_line_2: mov [right_start_draw_line],0 @@ -349,7 +351,7 @@ key_71: cmp [left_start_draw_line],0 jne .draw_left_panel cmp [left_start_draw_cursor_line],0 - je still + je still .draw_left_panel: mov [left_start_draw_line],0 mov [left_start_draw_cursor_line],0 @@ -359,7 +361,7 @@ key_71: cmp [right_start_draw_line],0 jne .draw_right_panel cmp [right_start_draw_cursor_line],0 - je still + je still .draw_right_panel: mov [right_start_draw_line],0 mov [right_start_draw_cursor_line],0 @@ -402,11 +404,11 @@ key_28: jne key_ctrl_up .1: cmp [shift_flag],1 - je still + je still cmp [ctrl_flag],1 - je still + je still cmp [alt_flag],1 - je files_information + je files_information mov [open_param],0 .2: @@ -416,15 +418,15 @@ key_28: call calculate_left_data_1 add esi,32 cmp [exit_dir],1 - je .up_patch + je .up_patch test [esi],byte 0x10 - jz file_no_folder + jz file_no_folder cmp [open_param],0 jne still cmp [esi+40],word 2Eh - je still + je still cmp [esi+40],word '..' - je .up_patch + je .up_patch call calculate_key_28_1 mov [left_start_draw_cursor_line],0 mov [left_start_draw_line],0 @@ -437,13 +439,13 @@ key_28: call calculate_right_data_1 add esi,32 cmp [exit_dir],1 - je .up_patch_1 + je .up_patch_1 test [esi],byte 0x10 - jz file_no_folder + jz file_no_folder cmp [esi+40],word 2Eh - je still + je still cmp [esi+40],word '..' - je .up_patch_1 + je .up_patch_1 call calculate_key_28_1 mov [right_start_draw_cursor_line],0 mov [right_start_draw_line],0 @@ -462,7 +464,7 @@ calculate_key_28_1: cmp [edi],byte 0 jne @r cmp edi,ebp ;read_folder.name+1 - je @f + je @f mov al,'/' mov [edi],al inc edi @@ -514,16 +516,16 @@ set_background: ;--------------------------------------------------------------------- reload_dir_1: cmp [ctrl_flag],0 - je still + je still jmp reload_dir ;--------------------------------------------------------------------- symbol_a_up: cmp [shift_flag],1 - je still + je still cmp [ctrl_flag],1 - je .ctrl + je .ctrl cmp [alt_flag],1 - je still + je still jmp still .ctrl: mov [mark_action_counter],0 @@ -531,11 +533,11 @@ symbol_a_up: ;--------------------------------------------------------------------- NumPad_plus_Up: cmp [shift_flag],1 - je still + je still cmp [ctrl_flag],1 - je .ctrl + je .ctrl cmp [alt_flag],1 - je still + je still jmp still .ctrl: mov [mark_action_counter],0 @@ -543,11 +545,11 @@ NumPad_plus_Up: ;--------------------------------------------------------------------- NumPad_minus_Up: cmp [shift_flag],1 - je still + je still cmp [ctrl_flag],1 - je .ctrl + je .ctrl cmp [alt_flag],1 - je still + je still jmp still .ctrl: mov [mark_action_counter],1 @@ -555,11 +557,11 @@ NumPad_minus_Up: ;--------------------------------------------------------------------- NumPad_sneg_Up: cmp [shift_flag],1 - je still + je still cmp [ctrl_flag],1 - je .ctrl + je .ctrl cmp [alt_flag],1 - je still + je still jmp still .ctrl: mov [mark_action_counter],2 @@ -568,109 +570,118 @@ NumPad_sneg_Up: f_key_f1: ;sort_name: cmp [shift_flag],1 - je still + je still cmp [ctrl_flag],1 - je still + je still cmp [alt_flag],1 - je draw_left_select_disk_menu + je draw_left_select_disk_menu jmp help_start ;--------------------------------------------------------------------- f_key_f2: ;sort_name: cmp [shift_flag],1 - je still + je still cmp [ctrl_flag],1 - je still + je still cmp [alt_flag],1 - je draw_right_select_disk_menu + je draw_right_select_disk_menu jmp still ;--------------------------------------------------------------------- f_key_f3: ;sort_name: cmp [shift_flag],1 - je still + je still cmp [ctrl_flag],1 - je .ctrl + je .ctrl cmp [alt_flag],1 - je still + je still jmp still .ctrl: cmp [select_panel_counter],1 - je right_sort_name + je right_sort_name jmp left_sort_name ;--------------------------------------------------------------------- f_key_f4: ;sort_type: cmp [shift_flag],1 - je still + je still cmp [ctrl_flag],1 - je .ctrl + je .ctrl cmp [alt_flag],1 - je still + je still jmp open_file_f4 .ctrl: cmp [select_panel_counter],1 - je right_sort_type + je right_sort_type jmp left_sort_type ;--------------------------------------------------------------------- f_key_f5: ;sort_size: cmp [shift_flag],1 - je still + je still cmp [ctrl_flag],1 - je .ctrl + je .ctrl cmp [alt_flag],1 - je still + je still jmp copy_file_f5 .ctrl: cmp [select_panel_counter],1 - je right_sort_size + je right_sort_size jmp left_sort_size ;--------------------------------------------------------------------- f_key_f6: ;sort_date: cmp [shift_flag],1 - je still + je still cmp [ctrl_flag],1 - je .ctrl + je .ctrl cmp [alt_flag],1 - je still + je still jmp move_file_f6 .ctrl: cmp [select_panel_counter],1 - je right_sort_date + je right_sort_date jmp left_sort_date ;--------------------------------------------------------------------- f_key_f7: cmp [shift_flag],1 - je still + je still cmp [ctrl_flag],1 - je still + je still cmp [alt_flag],1 - je still + je still jmp create_directory ;--------------------------------------------------------------------- f_key_f8: cmp [shift_flag],1 - je still + je still cmp [ctrl_flag],1 - je still + je still cmp [alt_flag],1 - je still + je still jmp delete_file ;--------------------------------------------------------------------- +f_key_f9: + cmp [shift_flag],1 + je still + cmp [ctrl_flag],1 + je still + cmp [alt_flag],1 + je still + jmp create_directory;create_file +;--------------------------------------------------------------------- f_key_f12: cmp [shift_flag],1 - je still + je still cmp [ctrl_flag],1 - je still + je still cmp [alt_flag],1 - je still + je still jmp exit_apl ;--------------------------------------------------------------------- key_shift_up: cmp [shift_flag],1 - je still + je still mov [shift_flag],1 jmp key_alt_down.for_all ;--------------------------------------------------------------------- @@ -683,7 +694,7 @@ key_ctrl_up: jne key_ctrl_down .1: cmp [ctrl_flag],1 - je still + je still mov [ctrl_flag],1 jmp key_alt_down.for_all ;--------------------------------------------------------------------- @@ -699,7 +710,7 @@ key_alt_up: jne key_alt_down .1: cmp [alt_flag],1 - je still + je still mov [alt_flag],1 jmp key_alt_down.for_all ;--------------------------------------------------------------------- @@ -715,9 +726,9 @@ key_alt_down: ;--------------------------------------------------------------------- key_insert: cmp ah,82 ; Insert - je mark_file + je mark_file cmp ah,83 - je f_key_f8 ;delete_file + je f_key_f8 ;delete_file key_end: jmp still ;--------------------------------------------------------------------- \ No newline at end of file diff --git a/programs/fs/kfm/trunk/text.inc b/programs/fs/kfm/trunk/text.inc index 86fd5a0dd8..a4ae414089 100644 --- a/programs/fs/kfm/trunk/text.inc +++ b/programs/fs/kfm/trunk/text.inc @@ -100,9 +100,18 @@ move_type: move_type_1: db 'Move file',0 ;--------------------------------------------------------------------- +rename_type: + db ' Rename files',0 +;--------------------------------------------------------------------- +rename_type_1: + db 'Rename file',0 +;--------------------------------------------------------------------- create_dir: db 'Create directory',0 ;--------------------------------------------------------------------- +create_file: + db 'Create file',0 +;--------------------------------------------------------------------- exit_type: db ' Exit?',0 ;---------------------------------------------------------------------