diff --git a/programs/fs/kfm/trunk/confirm.inc b/programs/fs/kfm/trunk/confirm.inc
index 6750370a84..2cec975431 100644
--- a/programs/fs/kfm/trunk/confirm.inc
+++ b/programs/fs/kfm/trunk/confirm.inc
@@ -1,146 +1,171 @@
-;---------------------------------------------------------------------
+;------------------------------------------------------------------------------
confirmation_action:
- mov [work_confirmation],0
- mov [work_confirmation_yes],0
- jmp .red
+ mov [work_confirmation],0
+ mov [work_confirmation_yes],0
+ jmp .red
+;--------------------------------------
.red_1:
- call draw_window
+ call draw_window
+;--------------------------------------
.red:
- call draw_confirmation_button
- call draw_confirmation_menu
+ call draw_confirmation_button
+ call draw_confirmation_menu
+;--------------------------------------
.still:
- mcall 10
- cmp eax,1
- je .red_1
- cmp eax,2
- je key_menu_confirmation
- cmp eax,3
- jne .still
- mcall 17
- cmp ah,161
- je .no_del
- cmp ah,160
- je .del
- cmp ah,1
- jne .still
- mcall -1
+ mcall 10
+ cmp eax,1
+ je .red_1
+
+ cmp eax,2
+ je key_menu_confirmation
+
+ cmp eax,3
+ jne .still
+
+ mcall 17
+ cmp ah,161
+ je .no_del
+
+ cmp ah,160
+ je .del
+
+ cmp ah,1
+ jne .still
+
+ mcall -1
+;--------------------------------------
.del:
- mov [work_confirmation_yes],1
+ mov [work_confirmation_yes],1
+;--------------------------------------
.no_del:
- call draw_window
+ call draw_window
+;--------------------------------------
.ret:
- ret
-;---------------------------------------------------------------------
+ ret
+;------------------------------------------------------------------------------
draw_confirmation_button:
- mov ecx,[window_high]
- mov ebx,[window_width]
- shr ecx,1
- shr ebx,1
- sub ebx,45
- shl ecx,16
- shl ebx,16
- mov cx,15
- mov bx,40
- mov esi,0xffffff
- mov edx,0x40000000+160
- mov eax,8
- int 0x40
- add ebx,50 shl 16
- inc edx
- int 0x40
- ret
-;---------------------------------------------------------------------
+ mov ecx,[window_high]
+ mov ebx,[window_width]
+ shr ecx,1
+ shr ebx,1
+ sub ebx,45
+ shl ecx,16
+ shl ebx,16
+ mov cx,15
+ mov bx,40
+ mcall 8,,,0x40000000+160,0xffffff
+ add ebx,50 shl 16
+ inc edx
+ mcall
+ ret
+;------------------------------------------------------------------------------
draw_confirmation_menu:
- mov ecx,[window_high]
- mov ebx,[window_width]
- shr ecx,1
- shr ebx,1
- sub ecx,22
- sub ebx,60
- shl ecx,16
- shl ebx,16
- mov cx,44
- mov bx,120
- mcall 13, , ,0x6060ff ;0xff
- push ebx ecx
- add ebx,15 shl 16
- add ecx,22 shl 16
- mov bx,40
- mov cx,15
- mov edx,0
- push ebx ecx
- cmp [work_confirmation],0
- jne @f
- add ebx,50 shl 16
+ mov ecx,[window_high]
+ mov ebx,[window_width]
+ shr ecx,1
+ shr ebx,1
+ sub ecx,22
+ sub ebx,60
+ shl ecx,16
+ shl ebx,16
+ mov cx,44
+ mov bx,120
+ mcall 13,,,0x6060ff
+ push ebx ecx
+ add ebx,15 shl 16
+ add ecx,22 shl 16
+ mov bx,40
+ mov cx,15
+ mov edx,0
+ push ebx ecx
+ cmp [work_confirmation],0
+ jne @f
+
+ add ebx,50 shl 16
+;--------------------------------------
@@:
- int 0x40
- add ecx,1 shl 16
- add ebx,1 shl 16
- mov bx,38
- mov cx,13
- mov edx,0x6060ff
- int 0x40
- pop ecx ebx
- mov edx,0xff0000
- cmp [work_confirmation],0
- je @f
- add ebx,50 shl 16
- mov edx,0xaa00
+ mcall
+ add ecx,1 shl 16
+ add ebx,1 shl 16
+ mov bx,38
+ mov cx,13
+ mcall ,,,0x6060ff
+ pop ecx ebx
+ mov edx,0xff0000
+ cmp [work_confirmation],0
+ je @f
+
+ add ebx,50 shl 16
+ mov edx,0xaa00
+;--------------------------------------
@@:
- int 0x40
- pop ecx ebx
- shr ecx,16
- mov bx,cx
- add ebx,15 shl 16+5
- mcall 4, ,0x90ffffff,[confirmation_type]
- add ebx,7 shl 16+20
- mov edx,type_yes
- int 0x40
- add ebx,56 shl 16
- mov edx,type_no
- int 0x40
- ret
-;---------------------------------------------------------------------
+ mcall
+ pop ecx ebx
+ shr ecx,16
+ mov bx,cx
+ add ebx,15 shl 16+5
+ mcall 4,,0x90ffffff,[confirmation_type]
+ add ebx,7 shl 16+20
+ mcall ,,,type_yes
+ add ebx,56 shl 16
+ mcall ,,,type_no
+ ret
+;------------------------------------------------------------------------------
key_menu_confirmation:
- mcall 2
- cmp [extended_key],1
- je .extended_key
- test al, al
- jnz .end_1
- cmp ah, 0xE0
- jne @f
+ mcall 2
+ cmp [extended_key],1
+ je .extended_key
+
+ test al,al
+ jnz .end_1
+
+ cmp ah,0xE0
+ jne @f
+;--------------------------------------
.end_1:
- jmp confirmation_action.still
+ jmp confirmation_action.still
+;--------------------------------------
@@:
- cmp ah,75
- je confirmation_key_75.1
- cmp ah,77
- je confirmation_key_75.1
- cmp ah,28
- je confirmation_key_28.1
+ cmp ah,75
+ je confirmation_key_75.1
+
+ cmp ah,77
+ je confirmation_key_75.1
+
+ cmp ah,28
+ je confirmation_key_28.1
+;--------------------------------------
.end:
- cmp ah,1
- jne confirmation_action.still
- ret
-;---------------------------------------------------------------------
+ cmp ah,1
+ jne confirmation_action.still
+
+ ret
+;------------------------------------------------------------------------------
.extended_key:
- mov [extended_key],0
+ mov [extended_key],0
+;------------------------------------------------------------------------------
confirmation_key_75:
- cmp ah,75 ;arrow left
- je .1
- cmp ah,77 ; arrow right
- jne confirmation_key_28
+ cmp ah,75 ; arrow left
+ je .1
+
+ cmp ah,77 ; arrow right
+ jne confirmation_key_28
+;--------------------------------------
.1:
- dec [work_confirmation]
- and [work_confirmation],1
- jmp confirmation_action.red
+ dec [work_confirmation]
+ and [work_confirmation],1
+ jmp confirmation_action.red
+;------------------------------------------------------------------------------
confirmation_key_28:
- cmp ah,28 ; Enter
- jne confirmation_action.still
+ cmp ah,28 ; Enter
+ jne confirmation_action.still
+;--------------------------------------
.1:
- cmp [work_confirmation],0
- jne @f
- mov [work_confirmation_yes],1
+ cmp [work_confirmation],0
+ jne @f
+
+ mov [work_confirmation_yes],1
+;--------------------------------------
@@:
- ret
-;---------------------------------------------------------------------
\ No newline at end of file
+ ret
+;------------------------------------------------------------------------------
\ No newline at end of file
diff --git a/programs/fs/kfm/trunk/copy.inc b/programs/fs/kfm/trunk/copy.inc
index f6373cab08..34411e7b4e 100644
--- a/programs/fs/kfm/trunk/copy.inc
+++ b/programs/fs/kfm/trunk/copy.inc
@@ -97,7 +97,7 @@ editbox_copy_name:
;-------------------------------------------------------------
.button_copy:
mov eax,17
- int 0x40
+ mcall
test ah,ah
jz .still
cmp ah,160
@@ -127,7 +127,7 @@ editbox_copy_name:
;-------------------------------------------------------------
.key_copy:
mov eax,2
- int 0x40
+ mcall
cmp ah,13
je .exit_with_copy
cmp ah,27
@@ -165,10 +165,10 @@ draw_editbox_copy_name:
mov esi,0xffffff
mov edx,0x40000000+160
mov eax,8
- int 0x40
+ mcall
add ebx,50 shl 16
inc edx
- int 0x40
+ mcall
popa
push ebx ecx
@@ -182,15 +182,15 @@ draw_editbox_copy_name:
sub ebx,1 shl 16
mov bx,42
mov cx,17
- int 0x40
+ mcall
add ebx,50 shl 16
- int 0x40
+ mcall
pop ecx ebx
mov edx,0xff7700
- int 0x40
+ mcall
mov edx,0xaa00
add ebx,50 shl 16
- int 0x40
+ mcall
pop ecx ebx
shr ecx,16
@@ -206,10 +206,10 @@ draw_editbox_copy_name:
mcall 4, ,0x90ffffff
add ebx,18 shl 16+36
mov edx,type_yes
- int 0x40
+ mcall
add ebx,56 shl 16
mov edx,type_no
- int 0x40
+ mcall
ret
;-------------------------------------------------------------
copy_file_1:
diff --git a/programs/fs/kfm/trunk/creatdir.inc b/programs/fs/kfm/trunk/creatdir.inc
index 26d52db1b0..922cf71af8 100644
--- a/programs/fs/kfm/trunk/creatdir.inc
+++ b/programs/fs/kfm/trunk/creatdir.inc
@@ -25,7 +25,7 @@ default_box
;-------------------------------------------------------------
.button_create:
mov eax,17
- int 0x40
+ mcall
test ah,ah
jz .still
cmp ah,160
@@ -49,7 +49,7 @@ default_box
;-------------------------------------------------------------
.key_create:
mov eax,2
- int 0x40
+ mcall
cmp ah,13
je .exit_with_create
cmp ah,27
@@ -87,10 +87,10 @@ draw_create_dir:
mov esi,0xffffff
mov edx,0x40000000+160
mov eax,8
- int 0x40
+ mcall
add ebx,50 shl 16
inc edx
- int 0x40
+ mcall
popa
push ebx ecx
@@ -104,15 +104,15 @@ draw_create_dir:
sub ebx,1 shl 16
mov bx,42
mov cx,17
- int 0x40
+ mcall
add ebx,50 shl 16
- int 0x40
+ mcall
pop ecx ebx
mov edx,0xff7700
- int 0x40
+ mcall
mov edx,0xaa00
add ebx,50 shl 16
- int 0x40
+ mcall
pop ecx ebx
shr ecx,16
@@ -121,10 +121,10 @@ draw_create_dir:
mcall 4, ,0x90ffffff,create_dir ;[confirmation_type]
add ebx,48 shl 16+36
mov edx,type_yes
- int 0x40
+ mcall
add ebx,56 shl 16
mov edx,type_no
- int 0x40
+ mcall
ret
;-------------------------------------------------------------
create_directory_1:
diff --git a/programs/fs/kfm/trunk/data.inc b/programs/fs/kfm/trunk/data.inc
index b96be8c09c..bb61140a53 100644
--- a/programs/fs/kfm/trunk/data.inc
+++ b/programs/fs/kfm/trunk/data.inc
@@ -44,18 +44,26 @@ window_width rd 1
window_status rd 1
skin_high rd 1
fbutton_width rd 1
+
left_panel_x:
.size_x rw 1
.start_x rw 1
+
left_panel_y:
.size_y rw 1
.start_y rw 1
+
right_panel_x:
.size_x rw 1
.start_x rw 1
+
right_panel_y:
.size_y rw 1
.start_y rw 1
+
+left_panel_y_correct_size_y rw 1
+right_panel_y_correct_size_y rw 1
+
drawing_panel_folder rb 1 ; 1-left, 2 right
;---------------------------------------------------------------------
align 4
diff --git a/programs/fs/kfm/trunk/draw.inc b/programs/fs/kfm/trunk/draw.inc
index c410cb93b3..4b98082c6b 100644
--- a/programs/fs/kfm/trunk/draw.inc
+++ b/programs/fs/kfm/trunk/draw.inc
@@ -1,1025 +1,1132 @@
+;------------------------------------------------------------------------------
draw_buttons_panel:
- mov ecx,[skin_high]
- add ecx,19
- shl ecx,16
- mov cx,18
- mov ebx,[window_width]
- sub ebx,9
- add ebx,5 shl 16
- mcall 13,,,0xffffff
- mov edx,15 shl 16+20
- add edx,[skin_high]
- pusha
- call .calculate_button
- mov edx,150
- int 0x40
- popa
- mcall 7,[buttons_img_start],<16,16>
- add edx,26 shl 16
- add ebx,16*16*3
- pusha
- call .calculate_button
- mov edx,151
- int 0x40
- popa
- int 0x40
- add edx,26 shl 16
- add ebx,16*16*3
- pusha
- call .calculate_button
- mov edx,152
- int 0x40
- popa
- int 0x40
- add edx,26 shl 16
- add ebx,16*16*3
- pusha
- call .calculate_button
- mov edx,153
- int 0x40
- popa
- int 0x40
- add edx,26 shl 16
- add ebx,16*16*3
- pusha
- call .calculate_button
- mov edx,154
- int 0x40
- popa
- int 0x40
- add edx,26 shl 16
- add ebx,16*16*3
- pusha
- call .calculate_button
- mov edx,155
- int 0x40
- popa
- int 0x40
- add edx,26 shl 16
- add ebx,16*16*3
- pusha
- call .calculate_button
- mov edx,156
- int 0x40
- popa
- int 0x40
- add edx,26 shl 16
- add ebx,16*16*3
- pusha
- call .calculate_button
- mov edx,157
- int 0x40
- popa
- int 0x40
- ret
+ mov ecx,[skin_high]
+ add ecx,19
+ shl ecx,16
+ mov cx,18
+ mov ebx,[window_width]
+ sub ebx,9
+ add ebx,5 shl 16
+ mcall 13,,,0xffffff
+ mov edx,15 shl 16+20
+ add edx,[skin_high]
+ pusha
+ call .calculate_button
+ mcall ,,,150
+ popa
+ mcall 7,[buttons_img_start],<16,16>
+ add edx,26 shl 16
+ add ebx,16*16*3
+ pusha
+ call .calculate_button
+ mcall ,,,151
+ popa
+ mcall
+ add edx,26 shl 16
+ add ebx,16*16*3
+ pusha
+ call .calculate_button
+ mcall ,,,152
+ popa
+ mcall
+ add edx,26 shl 16
+ add ebx,16*16*3
+ pusha
+ call .calculate_button
+ mcall ,,,153
+ popa
+ mcall
+ add edx,26 shl 16
+ add ebx,16*16*3
+ pusha
+ call .calculate_button
+ mcall ,,,154
+ popa
+ mcall
+ add edx,26 shl 16
+ add ebx,16*16*3
+ pusha
+ call .calculate_button
+ mcall ,,,155
+ popa
+ mcall
+ add edx,26 shl 16
+ add ebx,16*16*3
+ pusha
+ call .calculate_button
+ mcall ,,,156
+ popa
+ mcall
+ add edx,26 shl 16
+ add ebx,16*16*3
+ pusha
+ call .calculate_button
+ mcall ,,,157
+ popa
+ mcall
+ ret
+;--------------------------------------
.calculate_button:
- mov esi,0xffffff
- mov ebx,edx
- mov bx,15
- mov ecx,edx
- shl ecx,16
- mov cx,bx
- mov eax,8
- ret
-;---------------------------------------------------------------------
+ mov esi,0xffffff
+ mov ebx,edx
+ mov bx,15
+ mov ecx,edx
+ shl ecx,16
+ mov cx,bx
+ mov eax,8
+ ret
+;------------------------------------------------------------------------------
draw_left_sort_button:
- mov bx,[left_panel_x.start_x]
- add bx,[left_panel_x.size_x]
- sub ebx,50+15
- mov cx,[left_panel_y.start_y]
- call calclulate_sort_button_1
- mov edx,145
+ mov bx,[left_panel_x.start_x]
+ add bx,[left_panel_x.size_x]
+ sub ebx,50+15
+ mov cx,[left_panel_y.start_y]
+ call calclulate_sort_button_1
+ mov edx,145
+;--------------------------------------
.start:
- mov esi,0xffffff
- dec ebp
- cmp [left_sort_flag],ebp
- jne @f
- mov esi,0xccccff
+ mov esi,0xffffff
+ dec ebp
+ cmp [left_sort_flag],ebp
+ jne @f
+
+ mov esi,0xccccff
+;--------------------------------------
@@:
- call calclulate_sort_button_2
- jnz .start
- ret
-;---------------------------------------------------------------------
+ call calclulate_sort_button_2
+ jnz .start
+
+ ret
+;------------------------------------------------------------------------------
calclulate_sort_button_1:
- shl ebx,16
- mov bx,50
- sub cx,14
- shl ecx,16
- mov cx,12
- mov eax,8
- mov ebp,4
- ret
-;---------------------------------------------------------------------
+ shl ebx,16
+ mov bx,50
+ sub cx,14
+ shl ecx,16
+ mov cx,12
+ mov eax,8
+ mov ebp,4
+ ret
+;------------------------------------------------------------------------------
calclulate_sort_button_2:
- inc ebp
- int 0x40
- pusha
- push ebx
- mov eax,ebx
- inc eax
- shl eax,16
- add ebx,eax
- cmp ebp,4
- jne @f
- mov bx,15
- jmp .continue
+ inc ebp
+ mcall
+ pusha
+ push ebx
+ mov eax,ebx
+ inc eax
+ shl eax,16
+ add ebx,eax
+ cmp ebp,4
+ jne @f
+
+ mov bx,15
+ jmp .continue
+;--------------------------------------
@@:
- mov bx,1
+ mov bx,1
+;--------------------------------------
.continue:
- mov edx,0xcccccc
- inc ecx
- mcall 13
- pop ebx
- cmp ebp,1
- jne @f
- mov eax,[temp_panel_end]
- shl eax,16
- add eax,[temp_panel_end]
- shr eax,16
- shr ebx,16
- sub ebx,eax
- shl ebx,16
- mov bx,ax
- rol ebx,16
- mcall 13
- mov [temp_panel_end],ebx
+ inc ecx
+ mcall 13,,,0xcccccc
+ pop ebx
+ cmp ebp,1
+ jne @f
+
+ mov eax,[temp_panel_end]
+ shl eax,16
+ add eax,[temp_panel_end]
+ shr eax,16
+ shr ebx,16
+ sub ebx,eax
+ shl ebx,16
+ mov bx,ax
+ rol ebx,16
+ mcall 13
+ mov [temp_panel_end],ebx
+;--------------------------------------
@@:
- popa
- pusha
- shr ecx,16
- mov bx,cx
- add ebx,3 shl 16+2
- mov ecx,0x10000000
- mov edx,ebp
- dec edx
- shl edx,2
- add edx,sort_button_name
- mov eax,4
- mov esi,eax
- int 0x40
- popa
- dec edx
- sub ebx,38 shl 16
- mov bx,36
- dec ebp
- ret
-;---------------------------------------------------------------------
+ popa
+ pusha
+ shr ecx,16
+ mov bx,cx
+ add ebx,3 shl 16+2
+ mov edx,ebp
+ dec edx
+ shl edx,2
+ add edx,sort_button_name
+ mov eax,4
+ mov esi,eax
+ mcall ,,0x10000000
+ popa
+ dec edx
+ sub ebx,38 shl 16
+ mov bx,36
+ dec ebp
+ ret
+;------------------------------------------------------------------------------
draw_right_sort_button:
- mov bx,[right_panel_x.start_x]
- add bx,[right_panel_x.size_x]
- sub ebx,50+15
- mov cx,[right_panel_y.start_y]
- call calclulate_sort_button_1
- mov edx,149
+ mov bx,[right_panel_x.start_x]
+ add bx,[right_panel_x.size_x]
+ sub ebx,50+15
+ mov cx,[right_panel_y.start_y]
+ call calclulate_sort_button_1
+ mov edx,149
+;--------------------------------------
.start:
- mov esi,0xffffff
- dec ebp
- cmp [right_sort_flag],ebp
- jne @f
- mov esi,0xccccff
+ mov esi,0xffffff
+ dec ebp
+ cmp [right_sort_flag],ebp
+ jne @f
+
+ mov esi,0xccccff
+;--------------------------------------
@@:
- call calclulate_sort_button_2
- jnz .start
- ret
-;---------------------------------------------------------------------
+ call calclulate_sort_button_2
+ jnz .start
+
+ ret
+;------------------------------------------------------------------------------
draw_left_select_disk_button:
- mov bx,[left_panel_x.start_x]
- mov cx,[left_panel_y.start_y]
- mov ebp,read_folder_name ;read_folder.name
- mov edx,0x40000000+140
+ mov bx,[left_panel_x.start_x]
+ mov cx,[left_panel_y.start_y]
+ mov ebp,read_folder_name ;read_folder.name
+ mov edx,0x40000000+140
+;--------------------------------------
.1:
- shl ebx,16
- mov bx,60
- sub cx,14
- shl ecx,16
- mov cx,13
- mov esi,0xffffff
- mov eax,8
- int 0x40
- mov edx,0xffffff
- mov eax,13
- int 0x40
- pusha
-; mov esi,read_folder.name+2
- mov esi,ebp
- add esi,2
+ shl ebx,16
+ mov bx,60
+ sub cx,14
+ shl ecx,16
+ mov cx,13
+ mcall 8,,,,0xffffff
+ mcall 13,,,0xffffff
+ pusha
+ mov esi,ebp
+ add esi,2
+;--------------------------------------
@@:
- inc esi
- cmp [esi],byte 0
- je @f
- cmp [esi],byte '/'
- jne @r
- add esi,2
+ inc esi
+ cmp [esi],byte 0
+ je @f
+
+ cmp [esi],byte '/'
+ jne @r
+
+ add esi,2
+;--------------------------------------
@@:
- sub esi,ebp ;read_folder.name
- add ebx,1 shl 16
- shr ecx,16
- mov bx,cx
- add ebx,3
- mov edx,ebp
- mcall 4, ,0 ;,read_folder.name
- popa
- add ebx,50 shl 16
- mov bx,10
- mov edx,0x6060ff
- int 0x40
- mov [temp_panel_end],ebx
- add ebx,1 shl 16
- shr ecx,16
- mov bx,cx
- add ebx,3
- mcall 4, ,0x80ffffff,select_disk_char
- add ebx,1 shl 16
- int 0x40
- ret
-;---------------------------------------------------------------------
+ sub esi,ebp ;read_folder.name
+ add ebx,1 shl 16
+ shr ecx,16
+ mov bx,cx
+ add ebx,3
+ mov edx,ebp
+ mcall 4,,0 ;,read_folder.name
+ popa
+ add ebx,50 shl 16
+ mov bx,10
+ mcall ,,,0x6060ff
+ mov [temp_panel_end],ebx
+ add ebx,1 shl 16
+ shr ecx,16
+ mov bx,cx
+ add ebx,3
+ mcall 4, ,0x80ffffff,select_disk_char
+ add ebx,1 shl 16
+ mcall
+ ret
+;------------------------------------------------------------------------------
draw_right_select_disk_button:
- mov bx,[right_panel_x.start_x]
- mov cx,[right_panel_y.start_y]
- mov ebp,read_folder_1_name ;read_folder_1.name
- mov edx,0x40000000+141
- jmp draw_left_select_disk_button.1
-;---------------------------------------------------------------------
+ mov bx,[right_panel_x.start_x]
+ mov cx,[right_panel_y.start_y]
+ mov ebp,read_folder_1_name ;read_folder_1.name
+ mov edx,0x40000000+141
+ jmp draw_left_select_disk_button.1
+;------------------------------------------------------------------------------
draw_device_button:
- mov edi,device_present
- mov edx,120
- mov bx,[left_panel_x.start_x]
- mov cx,[left_panel_y.start_y]
- mov eax,[left_panel_x]
- mov [temp_panel_end],eax
- mov [temp_counter],0
- call .draw
-; inc edx
- mov edx,130
- mov bx,[right_panel_x.start_x]
- mov cx,[right_panel_y.start_y]
- mov eax,[right_panel_x]
- mov [temp_panel_end],eax
- mov [temp_counter],1
+ mov edi,device_present
+ mov edx,120
+ mov bx,[left_panel_x.start_x]
+ mov cx,[left_panel_y.start_y]
+ mov eax,[left_panel_x]
+ mov [temp_panel_end],eax
+ mov [temp_counter],0
+ call .draw
+ mov edx,130
+ mov bx,[right_panel_x.start_x]
+ mov cx,[right_panel_y.start_y]
+ mov eax,[right_panel_x]
+ mov [temp_panel_end],eax
+ mov [temp_counter],1
+;--------------------------------------
.draw:
- shl ebx,16
- mov bx,25
- sub cx,30
- shl ecx,16
- mov cx,12
- mov eax,8
- mov esi,0xaa00
- cmp [edi],byte 1
- jne @f
- mov ebp,read_folder_device_name.rd
- call .draw_1
+ shl ebx,16
+ mov bx,25
+ sub cx,30
+ shl ecx,16
+ mov cx,12
+ mov eax,8
+ mov esi,0xaa00
+ cmp [edi],byte 1
+ jne @f
+
+ mov ebp,read_folder_device_name.rd
+ call .draw_1
+;--------------------------------------
@@:
- inc edx
- cmp [edi+1],byte 1
- jne @f
- mov ebp,read_folder_device_name.fd
- call .draw_1
+ inc edx
+ cmp [edi+1],byte 1
+ jne @f
+
+ mov ebp,read_folder_device_name.fd
+ call .draw_1
+;--------------------------------------
@@:
- inc edx
- cmp [edi+2],byte 1
- jne @f
- mov ebp,read_folder_device_name.hd0
- call .draw_1
+ inc edx
+ cmp [edi+2],byte 1
+ jne @f
+
+ mov ebp,read_folder_device_name.hd0
+ call .draw_1
+;--------------------------------------
@@:
- inc edx
- cmp [edi+3],byte 1
- jne @f
- mov ebp,read_folder_device_name.hd1
- call .draw_1
+ inc edx
+ cmp [edi+3],byte 1
+ jne @f
+
+ mov ebp,read_folder_device_name.hd1
+ call .draw_1
+;--------------------------------------
@@:
- inc edx
- cmp [edi+4],byte 1
- jne @f
- mov ebp,read_folder_device_name.hd2
- call .draw_1
+ inc edx
+ cmp [edi+4],byte 1
+ jne @f
+
+ mov ebp,read_folder_device_name.hd2
+ call .draw_1
+;--------------------------------------
@@:
- inc edx
- cmp [edi+5],byte 1
- jne @f
- mov ebp,read_folder_device_name.hd3
- call .draw_1
+ inc edx
+ cmp [edi+5],byte 1
+ jne @f
+
+ mov ebp,read_folder_device_name.hd3
+ call .draw_1
+;--------------------------------------
@@:
- inc edx
- cmp [edi+6],byte 1
- jne @f
- mov ebp,read_folder_device_name.cd0
- call .draw_1
+ inc edx
+ cmp [edi+6],byte 1
+ jne @f
+
+ mov ebp,read_folder_device_name.cd0
+ call .draw_1
+;--------------------------------------
@@:
- inc edx
- cmp [edi+7],byte 1
- jne @f
- mov ebp,read_folder_device_name.cd1
- call .draw_1
+ inc edx
+ cmp [edi+7],byte 1
+ jne @f
+
+ mov ebp,read_folder_device_name.cd1
+ call .draw_1
+;--------------------------------------
@@:
- inc edx
- cmp [edi+8],byte 1
- jne @f
- mov ebp,read_folder_device_name.cd2
- call .draw_1
+ inc edx
+ cmp [edi+8],byte 1
+ jne @f
+
+ mov ebp,read_folder_device_name.cd2
+ call .draw_1
+;--------------------------------------
@@:
- inc edx
- cmp [edi+9],byte 1
- jne @f
- mov ebp,read_folder_device_name.cd3
- call .draw_1
+ inc edx
+ cmp [edi+9],byte 1
+ jne @f
+
+ mov ebp,read_folder_device_name.cd3
+ call .draw_1
+;--------------------------------------
@@:
- push ebx
- mov ebx,[temp_panel_end]
- mov ax,bx
- shr ebx,16
- add eax,ebx
- pop ebx
- ror ebx,16
- sub ax,bx
- rol ebx,16
- mov bx,ax
- add ecx,1
- add ebx,1
- mcall 13,,,0xcccccc
- cmp [temp_counter],0
- je @f
- mov ax,bx
- shr ebx,16
- add bx,ax
- mov eax,[window_width]
- sub eax,4
- sub ax,bx
- cmp eax,0
- jbe @f
- shl ebx,16
- mov bx,ax
- mov ax,[right_panel_y.size_y]
- add ax,[right_panel_y.start_y]
- shr ecx,16
- sub ax,cx
- shl ecx,16
- mov cx,ax
- mov edx,0xcccccc
- mcall 13
- ret
-
+ push ebx
+ mov ebx,[temp_panel_end]
+ mov ax,bx
+ shr ebx,16
+ add eax,ebx
+ pop ebx
+ ror ebx,16
+ sub ax,bx
+ rol ebx,16
+ mov bx,ax
+ add ecx,1
+ add ebx,1
+ mcall 13,,,0xcccccc
+ cmp [temp_counter],0
+ je @f
+
+ mov ax,bx
+ shr ebx,16
+ add bx,ax
+ mov eax,[window_width]
+ sub eax,4
+ sub ax,bx
+ cmp eax,0
+ jbe @f
+
+ shl ebx,16
+ mov bx,ax
+ mov ax,[right_panel_y.size_y]
+ add ax,[right_panel_y.start_y]
+ shr ecx,16
+ sub ax,cx
+ shl ecx,16
+ mov cx,ax
+ mcall 13,,,0xcccccc
+ ret
+;--------------------------------------
.draw_1:
- int 0x40
- pusha
- mov eax,ebx
- inc eax
- shl eax,16
- add ebx,eax
- mov bx,1
- inc ecx
- mov edx,0xcccccc
- mcall 13
- popa
- pusha
- mov edx,ebp
- shr ecx,16
- mov bx,cx
- add ebx,2 shl 16 +3
- mov ecx,0x90000000
- mov eax,4
- int 0x40
- mov ecx,0x90ffffff
- sub ebx,1 shl 16 + 1
- int 0x40
- popa
- add ebx,27 shl 16
+ mcall
+ pusha
+ mov eax,ebx
+ inc eax
+ shl eax,16
+ add ebx,eax
+ mov bx,1
+ inc ecx
+ mcall 13,,,0xcccccc
+ popa
+ pusha
+ mov edx,ebp
+ shr ecx,16
+ mov bx,cx
+ add ebx,2 shl 16 +3
+ mcall 4,,0x90000000
+ sub ebx,1 shl 16 + 1
+ mcall ,,0x90ffffff
+ popa
+ add ebx,27 shl 16
+;--------------------------------------
@@:
- ret
-;---------------------------------------------------------------------
+ ret
+;------------------------------------------------------------------------------
draw_ATAPI_tray_control:
- ret
-;---------------------------------------------------------------------
+ ret
+;------------------------------------------------------------------------------
calc_max_panel_line:
- xor eax,eax
- mov ax,[left_panel_y.size_y]
- mov ebx,10
- xor edx,edx
- div ebx
- mov [max_panel_line],eax
- ret
-;---------------------------------------------------------------------
+ xor eax,eax
+ mov ax,[left_panel_y.size_y]
+ mov ebx,10
+ xor edx,edx
+ div ebx
+ mov [max_panel_line],eax
+ ret
+;------------------------------------------------------------------------------
draw_icon:
- pusha
- test [edx-40],byte 0x10
- jnz .draw_dir_pic
- call get_icon_number
- imul ebx,270
- add ebx,mem
- jmp .draw
+ pusha
+ test [edx-40],byte 0x10
+ jnz .draw_dir_pic
+
+ call get_icon_number
+ imul ebx,270
+ add ebx,mem
+ jmp .draw
+;--------------------------------------
.draw_dir_pic:
- mov ebx,mem
- cmp [edx],word '..'
- jne .draw
- add ebx,270 ;*17
+ mov ebx,mem
+ cmp [edx],word '..'
+ jne .draw
+
+ add ebx,270 ;*17
+;--------------------------------------
.draw:
- mov edx,[esp+16] ;ebx
- ror edx,16
- sub edx,12
- rol edx,16
- mcall 7, ,<10,9>
- popa
- ret
-;---------------------------------------------------------------------
+ mov edx,[esp+16] ;ebx
+ ror edx,16
+ sub edx,12
+ rol edx,16
+ mcall 7, ,<10,9>
+ popa
+ ret
+;------------------------------------------------------------------------------
; ПЕРЕВОД 10-НЫХ ЧИСЕЛ СО ЗНАКОМ В СТРОКОВЫЙ ВИД
; Вход:
; AX - число
; EBX - адрес строки
; Выход:
; строка содержит число, конец отмечен кодом 0
+;------------------------------------------------------------------------------
decimal_string_2:
- push eax ebx ecx edx
- xor ecx,ecx
- mov [ebx],byte '0'
- inc ebx
+ push eax ebx ecx edx
+ xor ecx,ecx
+ mov [ebx],byte '0'
+ inc ebx
+;--------------------------------------
.p3:
- xor edx,edx
- push ebx
- mov ebx,10
- div ebx
- pop ebx
- add edx,48
- push edx
- inc ecx
- cmp ax,0
- jne .p3
- cmp ecx,1
- jbe .p4
- mov ecx,2
- dec ebx
+ xor edx,edx
+ push ebx
+ mov ebx,10
+ div ebx
+ pop ebx
+ add edx,48
+ push edx
+ inc ecx
+ cmp ax,0
+ jne .p3
+
+ cmp ecx,1
+ jbe .p4
+
+ mov ecx,2
+ dec ebx
+;--------------------------------------
.p4:
- pop edx
- mov [ebx],dl
- inc ebx
- loop .p4
- pop edx ecx ebx eax
+ pop edx
+ mov [ebx],dl
+ inc ebx
+ loop .p4
+ pop edx ecx ebx eax
ret
-;---------------------------------------------------------------------
+;------------------------------------------------------------------------------
decimal_string_4:
- push eax ecx edx
- xor ecx,ecx
- mov [ebx],byte '0'
- inc ebx
+ push eax ecx edx
+ xor ecx,ecx
+ mov [ebx],byte '0'
+ inc ebx
+;--------------------------------------
.p3:
- xor edx,edx
- push ebx
- mov ebx,10
- div ebx
- pop ebx
- add edx,48
- push edx
- inc ecx
- cmp eax,0
- jne .p3
- cmp ecx,3
- jbe .p4
- mov ecx,4
- dec ebx
+ xor edx,edx
+ push ebx
+ mov ebx,10
+ div ebx
+ pop ebx
+ add edx,48
+ push edx
+ inc ecx
+ cmp eax,0
+ jne .p3
+
+ cmp ecx,3
+ jbe .p4
+
+ mov ecx,4
+ dec ebx
+;--------------------------------------
.p4:
- pop edx
- mov [ebx],dl
- inc ebx
- loop .p4
- pop edx ecx eax
+ pop edx
+ mov [ebx],dl
+ inc ebx
+ loop .p4
+
+ pop edx ecx eax
ret
-;---------------------------------------------------------------------
+;------------------------------------------------------------------------------
draw_type_size_date:
- pusha
- test [edx-40],byte 0x10
- jz .copy_type
- mov [type_table],dword '
'
- mov [file_name_length],0
- mov [extension_size],0
- jmp .start ;.size
+ pusha
+ test [edx-40],byte 0x10
+ jz .copy_type
+
+ mov [type_table],dword ' '
+ mov [file_name_length],0
+ mov [extension_size],0
+ jmp .start ;.size
+;--------------------------------------
.copy_type:
- mov [type_table],dword ' '
- mov [type_table+4],word ' '
+ mov [type_table],dword ' '
+ mov [type_table+4],word ' '
+;--------------------------------------
.start:
- mov esi,edx
- xor eax,eax
+ mov esi,edx
+ xor eax,eax
+;--------------------------------------
@@:
- cld
- lodsb
- test eax,eax
- jnz @b
- mov [file_name_length],esi
- sub [file_name_length],edx
- mov [temp_counter_1],esi
- test [edx-40],byte 0x10
- jnz .size
-;@@:
- dec esi
- dec edx
+ cld
+ lodsb
+ test eax,eax
+ jnz @b
+
+ mov [file_name_length],esi
+ sub [file_name_length],edx
+ mov [temp_counter_1],esi
+ test [edx-40],byte 0x10
+ jnz .size
+
+ dec esi
+ dec edx
+;--------------------------------------
@@:
- std
- lodsb
- cmp esi,edx
- je .extension_size_0 ;@f
- cmp al,'.'
- jnz @b
- add esi,2
- mov [extension_start],esi
- mov ecx,[temp_counter_1]
- sub ecx,esi
- inc ecx
- mov [extension_size],ecx
- sub [file_name_length],ecx
- cmp ecx,2
- ja @f
- inc [file_name_length]
+ std
+ lodsb
+ cmp esi,edx
+ je .extension_size_0
+
+ cmp al,'.'
+ jnz @b
+
+ add esi,2
+ mov [extension_start],esi
+ mov ecx,[temp_counter_1]
+ sub ecx,esi
+ inc ecx
+ mov [extension_size],ecx
+ sub [file_name_length],ecx
+ cmp ecx,2
+ ja @f
+
+ inc [file_name_length]
+;--------------------------------------
@@:
- sub ecx,2
- cmp ecx,4
- jbe @f
- mov ecx,4
- mov [type_table+4],word '..'
+ sub ecx,2
+ cmp ecx,4
+ jbe @f
+
+ mov ecx,4
+ mov [type_table+4],word '..'
+;--------------------------------------
@@:
- mov edi,type_table ;+1
- cld
- rep movsb
- mov [edi],byte ' '
- inc edx
- jmp .size
+ mov edi,type_table ;+1
+ cld
+ rep movsb
+ mov [edi],byte ' '
+ inc edx
+ jmp .size
+;--------------------------------------
.extension_size_0:
- inc edx
- mov [extension_size],0
+ inc edx
+ mov [extension_size],0
+;--------------------------------------
.size:
- test [edx-40],byte 0x10
- jz .copy_size
- mov [size_table],dword '----'
- mov [size_table+4],word '- '
- jmp .date
+ test [edx-40],byte 0x10
+ jz .copy_size
+
+ mov [size_table],dword '----'
+ mov [size_table+4],word '- '
+ jmp .date
+;--------------------------------------
.copy_size:
;/0x40000000 - Gb
;/0x100000 - Mb
;/0x400 Kb
- mov [size_table],dword ' '
- mov [size_table+4],word ' '
- push ebx
- push edx
- mov eax,[edx-40+32]
- mov ebx,0x40000000
- xor edx,edx
- div ebx
- cmp eax,0
- je @f
- mov ebx,size_table
- call decimal_string_4
- mov [ebx],byte 'G'
- jmp .size_convert_end
-@@:
- mov edx,[esp]
- mov eax,[edx-40+32]
- mov ebx,0x100000
- xor edx,edx
- div ebx
- cmp eax,0
- je @f
- mov ebx,size_table
- call decimal_string_4
- mov [ebx],byte 'M'
- jmp .size_convert_end
-@@:
- mov edx,[esp]
- mov eax,[edx-40+32]
- mov ebx,0x400
- xor edx,edx
- div ebx
- cmp eax,0
- je @f
- mov ebx,size_table
- call decimal_string_4
- mov [ebx],byte 'K'
- jmp .size_convert_end
-@@:
- mov edx,[esp]
- mov eax,[edx-40+32]
-;.size_convert:
- mov ebx,size_table
- call decimal_string_4
-.size_convert_end:
- cmp [size_table],byte '0'
- jne @f
- mov [size_table],byte ' '
-@@:
- cmp [size_table+4],byte ' '
- jne @f
- mov esi,size_table+3
- mov edi,esi
- inc edi
- mov ecx,5
- std
- rep movsb
- jmp @r
-@@:
- pop edx
- pop ebx
-.date:
- xor eax,eax
- mov al,[edx-40+28]
- push ebx
- mov ebx,date_table
- call decimal_string_2
- mov al,[edx-40+29]
- mov ebx,date_table+3
- call decimal_string_2
- mov ax,[edx-40+30]
- mov ebx,year_table
- call decimal_string_4
- mov ax,[year_table+2]
- mov [date_table+6],ax
- pop ebx
- ror ebx,16
- add bx,[left_panel_x.size_x]
- sub ebx,122+12+15
- rol ebx,16
- mov ecx,0
- cmp [marked_file],byte 0
- je @f
- mov ecx,0xff0000
-@@:
- mov edx,type_table
- mov esi,20
- mov eax,4
- int 0x40
- popa
- ret
-;---------------------------------------------------------------------
-draw_folder_data:
- cmp [drawing_panel_folder],1
- jne .right_panel
- mov eax,[left_folder_block]
- sub eax,[max_panel_line]
- test eax,0x8000000
- jz .ok_left
- mov [left_start_draw_line],0
- jmp @f
-.ok_left:
- cmp eax,[left_start_draw_line]
- jae @f
- mov [left_start_draw_line],eax
-@@:
- mov bx,[left_panel_x.start_x]
-; inc bx
- add bx,12
- shl ebx,16
- mov bx,[left_panel_y.start_y]
- inc bx
- mov edx,[left_start_draw_line]
- imul edx,304
- add edx,[left_folder_data]
- add edx,32+40
- mov [temp_counter],0
- jmp .type_folder
-.right_panel:
- mov eax,[right_folder_block]
- sub eax,[max_panel_line]
- test eax,0x8000000
- jz .ok_right
- mov [right_start_draw_line],0
- jmp @f
-.ok_right:
- cmp eax,[right_start_draw_line]
- jae @f
- mov [right_start_draw_line],eax
-@@:
- mov bx,[right_panel_x.start_x]
-; inc bx
- add bx,12
- shl ebx,16
- mov bx,[right_panel_y.start_y]
- inc bx
- mov edx,[right_start_draw_line]
- imul edx,304
- add edx,[right_folder_data]
- add edx,32+40
- mov [temp_counter],1
-; mov edx,retrieved_devices_table
-.type_folder:
- xor eax,eax
-.start:
- pusha
- mov eax,edx
- cmp [temp_counter],1
- je @f
- sub eax,[left_folder_data]
- sub eax,32+40
- xor edx,edx
- mov ebx,304
- div ebx
- cmp eax,[left_folder_block]
- je .end_1
- jmp .continue_1
-@@:
- sub eax,[right_folder_data]
- sub eax,32+40
- xor edx,edx
- mov ebx,304
- div ebx
- cmp eax,[right_folder_block]
- je .end_1
-.continue_1:
- popa
- cmp eax,[max_panel_line] ; 20
- je .end_2 ;.end
- mov [marked_file],0
- cmp [edx+299-40],byte 0
- je @f
- mov [marked_file],1
-@@:
- call clear_line
- call draw_type_size_date
- call draw_icon
- push eax
- xor eax,eax
- mov ax,[left_panel_x.size_x]
- push ebx edx
- mov ebx,6
- xor edx,edx
- div ebx
- pop edx ebx
- sub eax,23+2+2
- mov esi,[file_name_length]
- mov [temp_counter_1],0
- cmp esi,eax
- jbe @f
- mov esi,eax
- mov [temp_counter_1],1
-@@:
- mov ecx,0
- cmp [marked_file],byte 0
- je @f
- mov ecx,0xff0000
-@@:
- mov eax,4
- int 0x40
- cmp [temp_counter_1],0
- je .continue
- mov eax,esi ;[file_name_length]
- imul eax,6
- shl eax,16
- push ebx edx
- add ebx,eax
- mov esi,2
- mov ecx,0xff0000
- mov edx,truncated_filename_char
- mov eax,4
- int 0x40
- add ebx,1 shl 16
- int 0x40
- pop edx ebx
-.continue:
- add ebx,10
- add edx,304 ;10
- pop eax
- inc eax
- jmp .start
-.end_1:
- popa
-.end_2:
- mov ax,[left_panel_y.start_y]
- add ax,[left_panel_y.size_y]
- mov cx,bx
- dec cx
- rol ecx,16
- mov cx,ax
- mov eax,ecx
- shr eax,16
- sub cx,ax
- cmp cx,0
- jbe @f
- mov bx,[left_panel_x.size_x]
- sub ebx,12 shl 16
- mov edx,0xffffff
- mcall 13
-@@:
+ mov [size_table],dword ' '
+ mov [size_table+4],word ' '
+ push ebx
+ push edx
+ mov eax,[edx-40+32]
+ mov ebx,0x40000000
+ xor edx,edx
+ div ebx
+ cmp eax,0
+ je @f
-.end:
- cmp [drawing_panel_folder],1
- jne @f
- call draw_scroll_bar_left
- ret
+ mov ebx,size_table
+ call decimal_string_4
+ mov [ebx],byte 'G'
+ jmp .size_convert_end
+;--------------------------------------
@@:
- call draw_scroll_bar_right
- ret
-;---------------------------------------------------------------------
-clear_line:
- cmp [not_clear_lines],0
- jne .end_1
- pusha
- shl ebx,16
- shr ebx,16
- dec ebx
- cmp [drawing_panel_folder],1
- jne .right
- cmp [select_panel_counter],0
- jne .continue
- mov ax,[left_start_draw_cursor_line]
- add ax,[left_panel_y.start_y]
- cmp bx,ax
- je .end
- jmp .continue
-.right:
- cmp [select_panel_counter],0
- je .continue
- mov ax,[right_start_draw_cursor_line]
- add ax,[right_panel_y.start_y]
- cmp bx,ax
- je .end
-.continue:
- mov ebx,[esp+16]
- mov cx,bx
- dec cx
- rol ecx,16
- mov cx,10
- mov bx,[left_panel_x.size_x]
- cmp [drawing_panel_folder],1
- je @f
- dec ebx
+ mov edx,[esp]
+ mov eax,[edx-40+32]
+ mov ebx,0x100000
+ xor edx,edx
+ div ebx
+ cmp eax,0
+ je @f
+
+ mov ebx,size_table
+ call decimal_string_4
+ mov [ebx],byte 'M'
+ jmp .size_convert_end
+;--------------------------------------
@@:
- sub ebx,12 shl 16+15
- mov edx,0xffffff
- mov eax,13
- int 0x40
-.end:
- popa
-.end_1:
- ret
-;---------------------------------------------------------------------
-draw_left_panel:
- call clear_left_panel
- call calc_max_panel_line
- call draw_left_panel_selection
- mov [drawing_panel_folder],1
- call draw_folder_data
- call draw_left_panel_patch
- ret
-;---------------------------------------------------------------------
-draw_right_panel:
- call clear_right_panel
- call calc_max_panel_line
- call draw_right_panel_selection
- mov [drawing_panel_folder],2
- call draw_folder_data
- call draw_right_panel_patch
- ret
-;---------------------------------------------------------------------
-draw_left_panel_patch:
- cmp [select_panel_counter],0
- jne .end
- mov edx,read_folder_name ;read_folder.name
-.1:
- call clear_patch_area
- mov ebx,[window_high]
- sub ebx,33
- add ebx,8 shl 16
- mcall 4, ,0x80000000 ; ,read_folder.name
-.end:
- ret
-;---------------------------------------------------------------------
-draw_right_panel_patch:
- cmp [select_panel_counter],1
- jne draw_left_panel_patch.end
- mov edx,read_folder_1_name ;read_folder_1.name
- jmp draw_left_panel_patch.1
-;---------------------------------------------------------------------
-clear_patch_area:
- push edx
- mov ebx,[window_width]
- sub ebx,9
- add ebx,5 shl 16
- mov ecx,[window_high]
- sub ecx,35
- shl ecx,16
- mov cx,12
- mov edx,0xffffcc
- mov eax,13
- int 0x40
- pop edx
- ret
-;---------------------------------------------------------------------
-draw_left_panel_selection:
- cmp [select_panel_counter],0
- jne .end
- mov eax,[left_folder_block]
- sub eax,[left_start_draw_line]
- mov edx,left_start_draw_cursor_line
- mov cx,[edx]
- call for_all_panel_selection
- mov eax,[left_folder_block]
- dec eax
- imul eax,10
- cmp ax,cx
- jae @f
- mov cx,ax
+ mov edx,[esp]
+ mov eax,[edx-40+32]
+ mov ebx,0x400
+ xor edx,edx
+ div ebx
+ cmp eax,0
+ je @f
+
+ mov ebx,size_table
+ call decimal_string_4
+ mov [ebx],byte 'K'
+ jmp .size_convert_end
+;--------------------------------------
@@:
- mov [edx],cx
- mov ebx,[left_panel_x]
- add cx,[left_panel_y.start_y]
-.1:
- shl ecx,16
- mov cx,10
- mov edx,0xbbddff
- sub ebx,15
- mov eax,13
- int 0x40
-.end:
- ret
-;---------------------------------------------------------------------
-draw_right_panel_selection:
- cmp [select_panel_counter],1
- jne draw_left_panel_selection.end
- mov eax,[right_folder_block]
- sub eax,[right_start_draw_line]
- mov edx,right_start_draw_cursor_line
- mov cx,[edx]
- call for_all_panel_selection
- mov eax,[right_folder_block]
- dec eax
- imul eax,10
- cmp ax,cx
- jae @f
- mov cx,ax
+ mov edx,[esp]
+ mov eax,[edx-40+32]
+;.size_convert:
+ mov ebx,size_table
+ call decimal_string_4
+;--------------------------------------
+.size_convert_end:
+ cmp [size_table],byte '0'
+ jne @f
+
+ mov [size_table],byte ' '
+;--------------------------------------
@@:
- mov [edx],cx
- mov ebx,[right_panel_x]
- add cx,[right_panel_y.start_y]
- jmp draw_left_panel_selection.1
-;---------------------------------------------------------------------
-for_all_panel_selection:
-; dec eax
- imul eax,10
- cmp ax,cx
- jae @f
- mov cx,ax
+ cmp [size_table+4],byte ' '
+ jne @f
+
+ mov esi,size_table+3
+ mov edi,esi
+ inc edi
+ mov ecx,5
+ std
+ rep movsb
+ jmp @r
+;--------------------------------------
@@:
- mov eax,[max_panel_line]
- dec eax
- imul eax,10
- cmp ax,cx
- jae @f
- mov cx,ax
+ pop edx
+ pop ebx
+;--------------------------------------
+.date:
+ xor eax,eax
+ mov al,[edx-40+28]
+ push ebx
+ mov ebx,date_table
+ call decimal_string_2
+ mov al,[edx-40+29]
+ mov ebx,date_table+3
+ call decimal_string_2
+ mov ax,[edx-40+30]
+ mov ebx,year_table
+ call decimal_string_4
+ mov ax,[year_table+2]
+ mov [date_table+6],ax
+ pop ebx
+ ror ebx,16
+ add bx,[left_panel_x.size_x]
+ sub ebx,122+12+15
+ rol ebx,16
+ mov ecx,0
+ cmp [marked_file],byte 0
+ je @f
+
+ mov ecx,0xff0000
+;--------------------------------------
@@:
- ret
-;---------------------------------------------------------------------
-clear_left_panel:
- mov ebx,7 shl 16
- add ebx,[window_width]
- shr bx,1
- sub ebx,6+1
- mov [left_panel_x],ebx
- call calculate_panel_1
- mov [left_panel_y],ecx
-; cmp [left_panel_clear_all],0
-; je @f
-; call calculate_panel_2
-; mov [left_panel_clear_all],0
-;@@:
- ret
-;---------------------------------------------------------------------
-calculate_panel_1:
- mov ecx,[skin_high]
- add ecx,70
- shl ecx,16
- add ecx,[window_high]
- sub ecx,130
- ret
-;---------------------------------------------------------------------
-;calculate_panel_2:
-; sub ebx,15
-; mov edx,0xffffff
-; mov eax,13
-; int 0x40
-; ret
-;---------------------------------------------------------------------
-clear_right_panel:
- mov ebx,[window_width]
- shr ebx,1
- add ebx,3
- shl ebx,16
- add ebx,[window_width]
- shr bx,1
- sub bx,2+6
- mov [right_panel_x],ebx
- call calculate_panel_1
- mov [right_panel_y],ecx
-; cmp [right_panel_clear_all],0
-; je @f
-; call calculate_panel_2
-; mov [right_panel_clear_all],0
-;@@:
- ret
-;---------------------------------------------------------------------
-erase_fbutton:
- mov edx,0x80000065
- mov eax,8
- mov ebp,12
+ mcall 4,,,type_table,20
+ popa
+ ret
+;------------------------------------------------------------------------------
+draw_folder_data:
+ cmp [drawing_panel_folder],1
+ jne .right_panel
+
+ mov eax,[left_folder_block]
+ sub eax,[max_panel_line]
+ test eax,0x8000000
+ jz .ok_left
+
+ mov [left_start_draw_line],0
+ jmp @f
+;--------------------------------------
+.ok_left:
+ cmp eax,[left_start_draw_line]
+ jae @f
+
+ mov [left_start_draw_line],eax
+;--------------------------------------
+@@:
+ mov bx,[left_panel_x.start_x]
+ add bx,12
+ shl ebx,16
+ mov bx,[left_panel_y.start_y]
+ inc bx
+ mov edx,[left_start_draw_line]
+ imul edx,304
+ add edx,[left_folder_data]
+ add edx,32+40
+ mov [temp_counter],0
+ jmp .type_folder
+;--------------------------------------
+.right_panel:
+ mov eax,[right_folder_block]
+ sub eax,[max_panel_line]
+ test eax,0x8000000
+ jz .ok_right
+
+ mov [right_start_draw_line],0
+ jmp @f
+;--------------------------------------
+.ok_right:
+ cmp eax,[right_start_draw_line]
+ jae @f
+
+ mov [right_start_draw_line],eax
+;--------------------------------------
+@@:
+ mov bx,[right_panel_x.start_x]
+ add bx,12
+ shl ebx,16
+ mov bx,[right_panel_y.start_y]
+ inc bx
+ mov edx,[right_start_draw_line]
+ imul edx,304
+ add edx,[right_folder_data]
+ add edx,32+40
+ mov [temp_counter],1
+;--------------------------------------
+.type_folder:
+ xor eax,eax
+;--------------------------------------
.start:
- int 0x40
- dec ebp
- jnz .start
- ret
-;---------------------------------------------------------------------
+ pusha
+ mov eax,edx
+ cmp [temp_counter],1
+ je @f
+
+ sub eax,[left_folder_data]
+ sub eax,32+40
+ xor edx,edx
+ mov ebx,304
+ div ebx
+ cmp eax,[left_folder_block]
+ je .end_1
+
+ jmp .continue_1
+;--------------------------------------
+@@:
+ sub eax,[right_folder_data]
+ sub eax,32+40
+ xor edx,edx
+ mov ebx,304
+ div ebx
+ cmp eax,[right_folder_block]
+ je .end_1
+;--------------------------------------
+.continue_1:
+ popa
+ cmp eax,[max_panel_line] ; 20
+ je .end_2
+
+ mov [marked_file],0
+ cmp [edx+299-40],byte 0
+ je @f
+
+ mov [marked_file],1
+;--------------------------------------
+@@:
+ call clear_line
+ call draw_type_size_date
+ call draw_icon
+ push eax
+ xor eax,eax
+ mov ax,[left_panel_x.size_x]
+ push ebx edx
+ mov ebx,6
+ xor edx,edx
+ div ebx
+ pop edx ebx
+ sub eax,23+2+2
+ mov esi,[file_name_length]
+ mov [temp_counter_1],0
+ cmp esi,eax
+ jbe @f
+
+ mov esi,eax
+ mov [temp_counter_1],1
+;--------------------------------------
+@@:
+ mov ecx,0
+ cmp [marked_file],byte 0
+ je @f
+
+ mov ecx,0xff0000
+;--------------------------------------
+@@:
+ mcall 4
+ cmp [temp_counter_1],0
+ je .continue
+
+ mov eax,esi ;[file_name_length]
+ imul eax,6
+ shl eax,16
+ push ebx edx
+ add ebx,eax
+ mcall 4,,0xff0000,truncated_filename_char,2
+ add ebx,1 shl 16
+ mcall
+ pop edx ebx
+;--------------------------------------
+.continue:
+ add ebx,10
+ add edx,304 ;10
+ pop eax
+ inc eax
+ jmp .start
+;--------------------------------------
+.end_1:
+ popa
+;--------------------------------------
+.end_2:
+ mov ax,[left_panel_y.start_y]
+ add ax,[left_panel_y.size_y]
+ mov cx,bx
+ dec cx
+ rol ecx,16
+ mov cx,ax
+ mov eax,ecx
+ shr eax,16
+ sub cx,ax
+ cmp cx,0
+ jbe @f
+
+ mov bx,[left_panel_x.size_x]
+ sub ebx,12 shl 16
+ mcall 13,,,0xffffff
+;--------------------------------------
+@@:
+.end:
+ cmp [drawing_panel_folder],1
+ jne @f
+
+ call draw_scroll_bar_left
+ ret
+;--------------------------------------
+@@:
+ call draw_scroll_bar_right
+ ret
+;------------------------------------------------------------------------------
+clear_line:
+ cmp [not_clear_lines],0
+ jne .end_1
+
+ pusha
+ shl ebx,16
+ shr ebx,16
+ dec ebx
+ cmp [drawing_panel_folder],1
+ jne .right
+
+ cmp [select_panel_counter],0
+ jne .continue
+
+ mov ax,[left_start_draw_cursor_line]
+ add ax,[left_panel_y.start_y]
+ cmp bx,ax
+ je .end
+
+ jmp .continue
+;--------------------------------------
+.right:
+ cmp [select_panel_counter],0
+ je .continue
+
+ mov ax,[right_start_draw_cursor_line]
+ add ax,[right_panel_y.start_y]
+ cmp bx,ax
+ je .end
+;--------------------------------------
+.continue:
+ mov ebx,[esp+16]
+ mov cx,bx
+ dec cx
+ rol ecx,16
+ mov cx,10
+ mov bx,[left_panel_x.size_x]
+ cmp [drawing_panel_folder],1
+ je @f
+
+ dec ebx
+;--------------------------------------
+@@:
+ sub ebx,12 shl 16+15
+ mcall 13,,,0xffffff
+;--------------------------------------
+.end:
+ popa
+;--------------------------------------
+.end_1:
+ ret
+;------------------------------------------------------------------------------
+draw_left_panel:
+ call clear_left_panel
+ call calc_max_panel_line
+ call draw_left_panel_selection
+ mov [drawing_panel_folder],1
+ call draw_folder_data
+ call draw_left_panel_patch
+ ret
+;------------------------------------------------------------------------------
+draw_right_panel:
+ call clear_right_panel
+ call calc_max_panel_line
+ call draw_right_panel_selection
+ mov [drawing_panel_folder],2
+ call draw_folder_data
+ call draw_right_panel_patch
+ ret
+;------------------------------------------------------------------------------
+draw_left_panel_patch:
+ cmp [select_panel_counter],0
+ jne .end
+
+ mov edx,read_folder_name ;read_folder.name
+;--------------------------------------
+.1:
+ call clear_patch_area
+ mov ebx,[window_high]
+ sub ebx,33
+ add ebx,8 shl 16
+ mcall 4,,0x80000000 ; ,read_folder.name
+;--------------------------------------
+.end:
+ ret
+;------------------------------------------------------------------------------
+draw_right_panel_patch:
+ cmp [select_panel_counter],1
+ jne draw_left_panel_patch.end
+
+ mov edx,read_folder_1_name ;read_folder_1.name
+ jmp draw_left_panel_patch.1
+;------------------------------------------------------------------------------
+clear_patch_area:
+ push edx
+ mov ebx,[window_width]
+ sub ebx,9
+ add ebx,5 shl 16
+ mov ecx,[window_high]
+ sub ecx,35
+ shl ecx,16
+ mov cx,12
+ mcall 13,,,0xffffcc
+ pop edx
+ ret
+;------------------------------------------------------------------------------
+draw_left_panel_selection:
+ cmp [select_panel_counter],0
+ jne .end
+
+ mov eax,[left_folder_block]
+ sub eax,[left_start_draw_line]
+ mov edx,left_start_draw_cursor_line
+ mov cx,[edx]
+ call for_all_panel_selection
+ mov eax,[left_folder_block]
+ dec eax
+ imul eax,10
+ cmp ax,cx
+ jae @f
+
+ mov cx,ax
+;--------------------------------------
+@@:
+ mov [edx],cx
+ mov ebx,[left_panel_x]
+ add cx,[left_panel_y.start_y]
+;--------------------------------------
+.1:
+ shl ecx,16
+ mov cx,10
+ sub ebx,15
+ mcall 13,,,0xbbddff
+;--------------------------------------
+.end:
+ ret
+;------------------------------------------------------------------------------
+draw_right_panel_selection:
+ cmp [select_panel_counter],1
+ jne draw_left_panel_selection.end
+
+ mov eax,[right_folder_block]
+ sub eax,[right_start_draw_line]
+ mov edx,right_start_draw_cursor_line
+ mov cx,[edx]
+ call for_all_panel_selection
+ mov eax,[right_folder_block]
+ dec eax
+ imul eax,10
+ cmp ax,cx
+ jae @f
+
+ mov cx,ax
+;--------------------------------------
+@@:
+ mov [edx],cx
+ mov ebx,[right_panel_x]
+ add cx,[right_panel_y.start_y]
+ jmp draw_left_panel_selection.1
+;------------------------------------------------------------------------------
+for_all_panel_selection:
+ imul eax,10
+ cmp ax,cx
+ jae @f
+
+ mov cx,ax
+;--------------------------------------
+@@:
+ mov eax,[max_panel_line]
+ dec eax
+ imul eax,10
+ cmp ax,cx
+ jae @f
+
+ mov cx,ax
+;--------------------------------------
+@@:
+ ret
+;------------------------------------------------------------------------------
+clear_left_panel:
+ mov ebx,7 shl 16
+ add ebx,[window_width]
+ shr bx,1
+ sub ebx,6+1
+ mov [left_panel_x],ebx
+ call calculate_panel_1
+ mov [left_panel_y],ecx
+ xor eax,eax
+ mov ax,cx
+ xor edx,edx
+ mov ebx,10
+ div ebx
+; умножение на 10
+ shl eax,1 ; умножение на 2
+ lea eax,[eax+eax*4] ; умножение на 5
+ mov [left_panel_y_correct_size_y],ax
+ ret
+;------------------------------------------------------------------------------
+calculate_panel_1:
+ mov ecx,[skin_high]
+ add ecx,70
+ shl ecx,16
+ add ecx,[window_high]
+ sub ecx,129
+ ret
+;------------------------------------------------------------------------------
+clear_right_panel:
+ mov ebx,[window_width]
+ shr ebx,1
+ add ebx,3
+ shl ebx,16
+ add ebx,[window_width]
+ shr bx,1
+ sub bx,2+6
+ mov [right_panel_x],ebx
+ call calculate_panel_1
+ mov [right_panel_y],ecx
+ xor eax,eax
+ mov ax,cx
+ xor edx,edx
+ mov ebx,10
+ div ebx
+; умножение на 10
+ shl eax,1 ; умножение на 2
+ lea eax,[eax+eax*4] ; умножение на 5
+ mov [right_panel_y_correct_size_y],ax
+ ret
+;------------------------------------------------------------------------------
+erase_fbutton:
+ mov edx,0x80000065
+ mov eax,8
+ mov ebp,12
+;--------------------------------------
+.start:
+ mcall
+ dec ebp
+ jnz .start
+
+ ret
+;------------------------------------------------------------------------------
draw_fbutton:
test [window_status],100b ; window is rolled up
jnz .exit
@@ -1027,191 +1134,208 @@ draw_fbutton:
test [window_status],10b ; window is minimized to panel
jnz .exit
- mov ecx,[window_high]
- sub ecx,20
- shl ecx,16
- add ecx,15
- mov eax,[window_width]
-; sub eax,8
- mov ebx,12
- xor edx,edx
- div ebx
- mov [fbutton_width],eax
- mov ebx,5 shl 16
- add ebx,eax
- sub ebx,2
- mov esi,0xaa00
- mov edx,101
- mov eax,8
- mov ebp,12
+ mov ecx,[window_high]
+ sub ecx,20
+ shl ecx,16
+ add ecx,15
+ mov eax,[window_width]
+ mov ebx,12
+ xor edx,edx
+ div ebx
+ mov [fbutton_width],eax
+ mov ebx,5 shl 16
+ add ebx,eax
+ sub ebx,2
+ mov esi,0xaa00
+ mov edx,101
+ mov eax,8
+ mov ebp,12
+;--------------------------------------
.start:
- cmp ebp,1
- jne @f
- mov eax,ebx
- shr eax,16
- mov bx,ax
- mov eax,[window_width]
- sub ax,bx
- sub ax,5
- mov bx,ax
- mov eax,8
+ cmp ebp,1
+ jne @f
+
+ mov eax,ebx
+ shr eax,16
+ mov bx,ax
+ mov eax,[window_width]
+ sub ax,bx
+ sub ax,5
+ mov bx,ax
+ mov eax,8
+;--------------------------------------
@@:
- mcall
- push eax ebx edx
- mov edx,0x6060ff
- mov bx,10
- cmp ebp,4
- jae @f
- mov bx,18
+ mcall
+ push eax ebx edx
+ mov edx,0x6060ff
+ mov bx,10
+ cmp ebp,4
+ jae @f
+
+ mov bx,18
+;--------------------------------------
@@:
- mcall 13
- cmp ebp,1
- je @f
- ror ebx,16
- add ebx,[fbutton_width]
- dec ebx
- rol ebx,16
- mov bx,1
- mov edx,0xcccccc
- inc ecx
- mcall
- dec ecx
+ mcall 13
+ cmp ebp,1
+ je @f
+
+ ror ebx,16
+ add ebx,[fbutton_width]
+ dec ebx
+ rol ebx,16
+ mov bx,1
+ inc ecx
+ mcall ,,,0xcccccc
+ dec ecx
+;--------------------------------------
@@:
- pop edx ebx eax
- call .rol_ror
- inc edx
- dec ebp
- jnz .start
- call draw_fbutton_name
- ret
+ pop edx ebx eax
+ call .rol_ror
+ inc edx
+ dec ebp
+ jnz .start
+
+ call draw_fbutton_name
+ ret
+;--------------------------------------
.rol_ror:
- rol ebx,16
- add ebx,[fbutton_width]
- ror ebx,16
+ rol ebx,16
+ add ebx,[fbutton_width]
+ ror ebx,16
+;--------------------------------------
.exit:
- ret
-;---------------------------------------------------------------------
+ ret
+;------------------------------------------------------------------------------
draw_fbutton_name:
- mov ebx, 7 shl 16
- add ebx,[window_high]
- sub ebx,15
- mov eax,4
- mov ecx,0x90000000
- push ebx
- call .type_1
- pop ebx
- mov ecx,0x90ffffff
- sub ebx,1 shl 16 + 1
+ mov ebx, 7 shl 16
+ add ebx,[window_high]
+ sub ebx,15
+ mov eax,4
+ mov ecx,0x90000000
+ push ebx
+ call .type_1
+ pop ebx
+ mov ecx,0x90ffffff
+ sub ebx,1 shl 16 + 1
+;--------------------------------------
.type_1:
- cmp [shift_flag],1
- je .type_shift
- cmp [ctrl_flag],1
- je .type_ctrl
- cmp [alt_flag],1
- je .type_alt
+ cmp [shift_flag],1
+ je .type_shift
+
+ cmp [ctrl_flag],1
+ je .type_ctrl
+
+ cmp [alt_flag],1
+ je .type_alt
+;--------------------------------------
.type:
- mov edx,fbutton_name.f1
- call .type_all
- mov edx,fbutton_name.f2
- call .type_all
- mov edx,fbutton_name.f3
- call .type_all
- mov edx,fbutton_name.f4
- call .type_all
- mov edx,fbutton_name.f5
- call .type_all
- mov edx,fbutton_name.f6
- call .type_all
- mov edx,fbutton_name.f7
- call .type_all
- mov edx,fbutton_name.f8
- call .type_all
- mov edx,fbutton_name.f9
- call .type_all
- mov edx,fbutton_name.f10
- call .type_all
- mov edx,fbutton_name.f11
- call .type_all
- mov edx,fbutton_name.f12
- int 0x40
- ret
+ mov edx,fbutton_name.f1
+ call .type_all
+ mov edx,fbutton_name.f2
+ call .type_all
+ mov edx,fbutton_name.f3
+ call .type_all
+ mov edx,fbutton_name.f4
+ call .type_all
+ mov edx,fbutton_name.f5
+ call .type_all
+ mov edx,fbutton_name.f6
+ call .type_all
+ mov edx,fbutton_name.f7
+ call .type_all
+ mov edx,fbutton_name.f8
+ call .type_all
+ mov edx,fbutton_name.f9
+ call .type_all
+ mov edx,fbutton_name.f10
+ call .type_all
+ mov edx,fbutton_name.f11
+ call .type_all
+ mov edx,fbutton_name.f12
+ mcall
+ ret
+;--------------------------------------
.type_shift:
- mov edx,fbutton_name_shift.f1
- call .type_all
- mov edx,fbutton_name_shift.f2
- call .type_all
- mov edx,fbutton_name_shift.f3
- call .type_all
- mov edx,fbutton_name_shift.f4
- call .type_all
- mov edx,fbutton_name_shift.f5
- call .type_all
- mov edx,fbutton_name_shift.f6
- call .type_all
- mov edx,fbutton_name_shift.f7
- call .type_all
- mov edx,fbutton_name_shift.f8
- call .type_all
- mov edx,fbutton_name_shift.f9
- call .type_all
- mov edx,fbutton_name_shift.f10
- call .type_all
- mov edx,fbutton_name_shift.f11
- call .type_all
- mov edx,fbutton_name_shift.f12
- int 0x40
- ret
+ mov edx,fbutton_name_shift.f1
+ call .type_all
+ mov edx,fbutton_name_shift.f2
+ call .type_all
+ mov edx,fbutton_name_shift.f3
+ call .type_all
+ mov edx,fbutton_name_shift.f4
+ call .type_all
+ mov edx,fbutton_name_shift.f5
+ call .type_all
+ mov edx,fbutton_name_shift.f6
+ call .type_all
+ mov edx,fbutton_name_shift.f7
+ call .type_all
+ mov edx,fbutton_name_shift.f8
+ call .type_all
+ mov edx,fbutton_name_shift.f9
+ call .type_all
+ mov edx,fbutton_name_shift.f10
+ call .type_all
+ mov edx,fbutton_name_shift.f11
+ call .type_all
+ mov edx,fbutton_name_shift.f12
+ mcall
+ ret
+;--------------------------------------
.type_ctrl:
- mov edx,fbutton_name_ctrl.f1
- call .type_all
- mov edx,fbutton_name_ctrl.f2
- call .type_all
- mov edx,fbutton_name_ctrl.f3
- call .type_all
- mov edx,fbutton_name_ctrl.f4
- call .type_all
- mov edx,fbutton_name_ctrl.f5
- call .type_all
- mov edx,fbutton_name_ctrl.f6
- call .type_all
- mov edx,fbutton_name_ctrl.f7
- call .type_all
- mov edx,fbutton_name_ctrl.f8
- call .type_all
- mov edx,fbutton_name_ctrl.f9
- call .type_all
- mov edx,fbutton_name_ctrl.f10
- call .type_all
- mov edx,fbutton_name_ctrl.f11
- call .type_all
- mov edx,fbutton_name_ctrl.f12
- int 0x40
- ret
+ mov edx,fbutton_name_ctrl.f1
+ call .type_all
+ mov edx,fbutton_name_ctrl.f2
+ call .type_all
+ mov edx,fbutton_name_ctrl.f3
+ call .type_all
+ mov edx,fbutton_name_ctrl.f4
+ call .type_all
+ mov edx,fbutton_name_ctrl.f5
+ call .type_all
+ mov edx,fbutton_name_ctrl.f6
+ call .type_all
+ mov edx,fbutton_name_ctrl.f7
+ call .type_all
+ mov edx,fbutton_name_ctrl.f8
+ call .type_all
+ mov edx,fbutton_name_ctrl.f9
+ call .type_all
+ mov edx,fbutton_name_ctrl.f10
+ call .type_all
+ mov edx,fbutton_name_ctrl.f11
+ call .type_all
+ mov edx,fbutton_name_ctrl.f12
+ mcall
+ ret
+;--------------------------------------
.type_alt:
- mov edx,fbutton_name_alt.f1
- call .type_all
- mov edx,fbutton_name_alt.f2
- call .type_all
- mov edx,fbutton_name_alt.f3
- call .type_all
- mov edx,fbutton_name_alt.f4
- call .type_all
- mov edx,fbutton_name_alt.f5
- call .type_all
- mov edx,fbutton_name_alt.f6
- call .type_all
- mov edx,fbutton_name_alt.f7
- call .type_all
- mov edx,fbutton_name_alt.f8
- call .type_all
- mov edx,fbutton_name_alt.f9
- call .type_all
- mov edx,fbutton_name_alt.f10
- call .type_all
- mov edx,fbutton_name_alt.f11
- call .type_all
- mov edx,fbutton_name_alt.f12
+ mov edx,fbutton_name_alt.f1
+ call .type_all
+ mov edx,fbutton_name_alt.f2
+ call .type_all
+ mov edx,fbutton_name_alt.f3
+ call .type_all
+ mov edx,fbutton_name_alt.f4
+ call .type_all
+ mov edx,fbutton_name_alt.f5
+ call .type_all
+ mov edx,fbutton_name_alt.f6
+ call .type_all
+ mov edx,fbutton_name_alt.f7
+ call .type_all
+ mov edx,fbutton_name_alt.f8
+ call .type_all
+ mov edx,fbutton_name_alt.f9
+ call .type_all
+ mov edx,fbutton_name_alt.f10
+ call .type_all
+ mov edx,fbutton_name_alt.f11
+ call .type_all
+ mov edx,fbutton_name_alt.f12
+;--------------------------------------
.type_all:
- int 0x40
- call draw_fbutton.rol_ror
- ret
+ mcall
+ call draw_fbutton.rol_ror
+ ret
+;------------------------------------------------------------------------------
diff --git a/programs/fs/kfm/trunk/key.inc b/programs/fs/kfm/trunk/key.inc
index c591dc1598..c26a84dc1f 100644
--- a/programs/fs/kfm/trunk/key.inc
+++ b/programs/fs/kfm/trunk/key.inc
@@ -88,7 +88,7 @@ key_80:
jbe .marked_action ;still
mov ax,[left_start_draw_cursor_line]
add ax,10
- cmp ax,[left_panel_y.size_y]
+ cmp ax,[left_panel_y_correct_size_y]
jae @f
.add_1:
add [left_start_draw_cursor_line],10
@@ -97,7 +97,7 @@ key_80:
.all:
sub ecx,10 shl 16
mov edx,0xffffff
- int 0x40
+ mcall
mov [not_clear_lines],1
call draw_folder_data
mov [not_clear_lines],0
@@ -138,7 +138,7 @@ key_80:
jbe .marked_action_1 ;still
mov ax,[right_start_draw_cursor_line]
add ax,10
- cmp ax,[right_panel_y.size_y]
+ cmp ax,[right_panel_y_correct_size_y]
jae @f
.add_2:
add [right_start_draw_cursor_line],10
@@ -178,7 +178,7 @@ key_72:
.all:
add ecx,10 shl 16
mov edx,0xffffff
- int 0x40
+ mcall
mov [not_clear_lines],1
call draw_folder_data
mov [not_clear_lines],0
diff --git a/programs/fs/kfm/trunk/kfm.asm b/programs/fs/kfm/trunk/kfm.asm
index e7e5cfc7df..549fd729fa 100644
--- a/programs/fs/kfm/trunk/kfm.asm
+++ b/programs/fs/kfm/trunk/kfm.asm
@@ -25,7 +25,7 @@
; (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
; SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
;*****************************************************************************
-; KFM v0.47g 24/07/2013
+; KFM v0.47h 28/07/2013
;---------------------------------------------------------------------
use32
org 0x0
@@ -44,6 +44,7 @@ org 0x0
;include 'macros.inc'
include '../../../macros.inc'
include '../../../config.inc' ;for nightbuild
+;include '../../../debug.inc' ;for nightbuild
include 'editbox.inc'
;use_edit_box
diff --git a/programs/fs/kfm/trunk/menu_drv.inc b/programs/fs/kfm/trunk/menu_drv.inc
index 4f100ab6a3..59f387b7b3 100644
--- a/programs/fs/kfm/trunk/menu_drv.inc
+++ b/programs/fs/kfm/trunk/menu_drv.inc
@@ -280,7 +280,7 @@ draw_left_menu:
imul cx,10
mov edx,0xffffcc
mov eax,13
- int 0x40
+ mcall
call draw_menu_Selection
call draw_menu_data
ret
@@ -294,7 +294,7 @@ draw_right_menu:
imul cx,10
mov edx,0xffffcc
mov eax,13
- int 0x40
+ mcall
call draw_menu_Selection
call draw_menu_data
ret
@@ -322,7 +322,7 @@ draw_menu_Selection:
mov cx,10
mov edx,0xbbffbb
mov eax,13
- int 0x40
+ mcall
pop ecx ebx
ret
;---------------------------------------------------------------------
diff --git a/programs/fs/kfm/trunk/progrbar.inc b/programs/fs/kfm/trunk/progrbar.inc
index 0f620b8f46..3dd2494846 100644
--- a/programs/fs/kfm/trunk/progrbar.inc
+++ b/programs/fs/kfm/trunk/progrbar.inc
@@ -22,7 +22,7 @@ progress_bar_delete:
je .end
sub ebx,13
mov edx,delete_type
- int 0x40
+ mcall
.end:
popa
mov [draw_all_progressbar],0
@@ -53,7 +53,7 @@ progress_bar_copy:
@@:
mov edx,0xff0000
.continue_1:
- int 0x40
+ mcall
call calculate_progress_data_2
shr ecx,16
mov bx,cx
@@ -74,7 +74,7 @@ progress_bar_copy:
mov edx,move_type_1
.continue:
- int 0x40
+ mcall
.end:
popa
mov [draw_all_progressbar],0
@@ -92,7 +92,7 @@ clear_text_area_1:
mov bx,ax
mov eax,13
mov edx, 0x6060ff
- int 0x40
+ mcall
pop ebx
@@:
ret
@@ -124,7 +124,7 @@ calculate_progress_data_2:
sub si,bx
mov bx,si
mov edx,0xffffff
- int 0x40
+ mcall
pop ebx
@@:
ret
@@ -135,7 +135,7 @@ calculate_progress_data_3:
cmp [draw_all_progressbar],0
je @f
mov edx, 0x6060ff
- int 0x40
+ mcall
@@:
add ebx,10 shl 16
sub ebx,20
@@ -164,7 +164,7 @@ calculate_progress_data_6:
mov ebp,[current_progress_value]
call calculate_progress_data_1
mov bx,[temp_progress_value]
- int 0x40
+ mcall
call calculate_progress_data_2
ret
;---------------------------------------------------------------------
\ No newline at end of file
diff --git a/programs/fs/kfm/trunk/scroll.inc b/programs/fs/kfm/trunk/scroll.inc
index df9e1500ca..fb73aff73a 100644
--- a/programs/fs/kfm/trunk/scroll.inc
+++ b/programs/fs/kfm/trunk/scroll.inc
@@ -343,15 +343,15 @@ calculate_for_draw_scroll_bar:
mov bx,14
add ecx,16 shl 16
sub cx,31
- int 0x40
+ mcall
popa
xor edx,edx
push ebx
mov bx,1
- int 0x40
+ mcall
push ecx
add ebx,15 shl 16
- int 0x40
+ mcall
pop ecx
pop ebx
mov [draw_scroll_character],1
@@ -419,14 +419,14 @@ draw_scroll_bar_srectangle:
mov cx,1
cmp [draw_scroll_character],2
je .draw_center
- int 0x40
+ mcall
pusha
add ecx,1 shl 16
add ebx,1 shl 16
mov cx,14
mov bx,14
mov edx,0xbbddff
- int 0x40
+ mcall
xor edx,edx
cmp [draw_scroll_character],1
jne .draw_down
@@ -434,42 +434,42 @@ draw_scroll_bar_srectangle:
mov bx,7
add ecx,8 shl 16
mov cx,1
- int 0x40
+ mcall
sub ecx,1 shl 16
add ebx,1 shl 16
mov bx,5
- int 0x40
+ mcall
sub ecx,1 shl 16
add ebx,1 shl 16
mov bx,3
- int 0x40
+ mcall
sub ecx,1 shl 16
add ebx,1 shl 16
mov bx,1
- int 0x40
+ mcall
jmp .continue
.draw_down:
add ebx,3 shl 16
mov bx,7
add ecx,5 shl 16
mov cx,1
- int 0x40
+ mcall
add ecx,1 shl 16
add ebx,1 shl 16
mov bx,5
- int 0x40
+ mcall
add ecx,1 shl 16
add ebx,1 shl 16
mov bx,3
- int 0x40
+ mcall
add ecx,1 shl 16
add ebx,1 shl 16
mov bx,1
- int 0x40
+ mcall
.continue:
popa
add ecx,15 shl 16
- int 0x40
+ mcall
pop ecx
ret
@@ -497,11 +497,11 @@ draw_scroll_bar_srectangle:
.draw_center_continue:
mov bx,14
mov edx,0xbbddff
- int 0x40
+ mcall
xor edx,edx
mov cx,1
sub ecx,1 shl 16
- int 0x40
+ mcall
pop ecx
cmp [scroll_pointer_1],1
jne .right_1
@@ -517,15 +517,15 @@ draw_scroll_bar_srectangle:
mov bx,10
add ecx,4 shl 16
mov cx,1
- int 0x40
+ mcall
add ecx,3 shl 16
sub ebx,1 shl 16
mov bx,12
- int 0x40
+ mcall
add ebx,1 shl 16
mov bx,10
add ecx,3 shl 16
- int 0x40
+ mcall
.continue_1:
popa
ror ecx,16
@@ -537,7 +537,7 @@ draw_scroll_bar_srectangle:
add ecx,[right_scroll_compens]
.draw_center_continue_2:
rol ecx,16
- int 0x40
+ mcall
pop ecx
ret
;---------------------------------------------------------------------
\ No newline at end of file
diff --git a/programs/fs/kfm/trunk/sort.inc b/programs/fs/kfm/trunk/sort.inc
index a71a136899..f7e194adda 100644
--- a/programs/fs/kfm/trunk/sort.inc
+++ b/programs/fs/kfm/trunk/sort.inc
@@ -19,6 +19,7 @@ left_sort_files:
sub ecx,[left_folder_data]
mov ebx,[appl_memory]
add ecx,ebx
+ add ecx,4 ; для страховки
push ebx
mov [appl_memory],ecx
mcall 64,1
@@ -46,6 +47,7 @@ left_sort_files:
rep movsd
; sub memory for sorting
pop ecx
+ add ecx,4 ; для страховки
mov [appl_memory],ecx
mcall 64,1
cmp [exit_to_dir],0
@@ -138,6 +140,12 @@ left_type_sort_1:
je .1
ja .add_counter
.no_add_counter:
+; pushad
+; pushfd
+; dps 'left_type_sort'
+; newline
+; popfd
+; popad
call move_area_for_bdvk
pop edi esi
jmp .end
@@ -579,9 +587,29 @@ move_area_for_bdvk:
sub ecx,ebx
sub ecx,eax
shr ecx,2
+; pushad
+; pushfd
+; dph [appl_memory]
+; newline
+; dps 'ECX:'
+; dpd ecx
+; newline
+; dps 'ESI:'
+; dpd esi
+; newline
+; dps 'EDI:'
+; dpd edi
+; newline
+; popfd
+; popad
std
rep movsd
-
+; pushad
+; pushfd
+; dps 'move_area_for_bdvk END'
+; newline
+; popfd
+; popad
; mov eax,ecx
; mov ebx,304
; mov edx,0
@@ -654,6 +682,7 @@ right_sort_files:
push ecx
sub ecx,[right_folder_data]
add ecx,[esp]
+ add ecx,4 ; для страховки
mov [appl_memory],ecx
mcall 64,1
mov edi,[esp]
@@ -680,6 +709,7 @@ right_sort_files:
rep movsd
; sub memory for sorting
pop ecx
+ add ecx,4 ; для страховки
mov [appl_memory],ecx
mcall 64,1
cmp [exit_to_dir],0
@@ -766,6 +796,12 @@ right_type_sort_1:
je .1
ja .add_counter
.no_add_counter:
+; pushad
+; pushfd
+; dps 'left_type_sort'
+; newline
+; popfd
+; popad
call move_area_for_bdvk
pop edi esi
jmp .end
diff --git a/programs/fs/kfm/trunk/text.inc b/programs/fs/kfm/trunk/text.inc
index 0ac1202e31..c2c08c6af9 100644
--- a/programs/fs/kfm/trunk/text.inc
+++ b/programs/fs/kfm/trunk/text.inc
@@ -1,4 +1,4 @@
-header_text db 'Kolibri File Manager v0.47g 24/07/2013',0
+header_text db 'Kolibri File Manager v0.47h 28/07/2013',0
;---------------------------------------------------------------------
fbutton_name:
.f1 db '1 Help',0