Subversion Repositories Kolibri OS

Rev

Blame | Last modification | View Log | Download | RSS feed

  1. ;---------------------------------------------------------------------
  2. mark_file:
  3.     mov  [marked_action],1
  4.     cmp  [select_panel_counter],0
  5.     jne  .right_1
  6.     call  calculate_left_data_1
  7.     jmp  .for_all
  8. .right_1:
  9.     call  calculate_right_data_1
  10. .for_all:
  11.     add  esi,32+299
  12.     mov  al,[esi]
  13.     and  al,1
  14.     cmp  [select_panel_counter],0
  15.     jne  .right_2    
  16.     test al,al
  17.     jnz  @f
  18.     inc  [left_marked_counter]
  19.     jmp  .for_all_1
  20. @@:
  21.     dec  [left_marked_counter]
  22. .for_all_1:
  23.     mov  al,[esi]
  24.     inc  al
  25.     and  al,1
  26.     mov  [esi],al
  27.     jmp   key_80.1
  28. .right_2:
  29.     test al,al
  30.     jnz  @f
  31.     inc  [right_marked_counter]
  32.     jmp  .for_all_1
  33. @@:
  34.     dec  [right_marked_counter]
  35.     jmp  .for_all_1
  36. ;---------------------------------------------------------------------
  37. calculate_left_data_1:
  38.     xor  eax,eax
  39.     mov  ax,[left_start_draw_cursor_line]
  40.     xor  edx,edx
  41.     mov  ebx,10
  42.     div  ebx
  43.     mov  esi,[left_start_draw_line]
  44.     add  esi,eax
  45.     imul esi,304
  46.     add  esi,[left_folder_data]
  47.     ret
  48. ;---------------------------------------------------------------------
  49. calculate_right_data_1:
  50.     xor  eax,eax
  51.     mov  ax,[right_start_draw_cursor_line]
  52.     xor  edx,edx
  53.     mov  ebx,10
  54.     div  ebx
  55.     mov  esi,[right_start_draw_line]
  56.     add  esi,eax
  57.     imul esi,304
  58.     add  esi,[right_folder_data]
  59.     ret
  60. ;---------------------------------------------------------------------
  61. mark_all_file:
  62.     cmp  [select_panel_counter],0
  63.     jne  .right_1
  64.     mov  ebp,[left_folder_block]
  65. .start:
  66.     mov  ebx,ebp
  67.     dec  ebx
  68.     imul ebx,304
  69.     add  ebx,[left_folder_data]
  70.     add  ebx,32+40
  71.     cmp  [ebx],word '..'
  72.     jne  .continue
  73.     cmp  [ebx+2],byte 0
  74.     je   .continue_1
  75. .continue:
  76.     call  select_mark_action
  77. .continue_1:
  78. @@:
  79.     dec  ebp
  80.     jnz  .start
  81.     call  draw_left_panel
  82.     cmp  [mark_action_counter],0
  83.     jne  @f
  84.     mov  eax,[left_folder_block]
  85. ;    dec  eax
  86. ;    mov  [left_marked_counter],eax
  87. ;    jmp  still
  88.     jmp   .end
  89. @@:
  90.     cmp  [mark_action_counter],1
  91.     jne  @f
  92.     mov  [left_marked_counter],0
  93.     jmp  still
  94. @@:
  95.     mov  eax,[left_folder_block]
  96.     sub  eax,[left_marked_counter]
  97. .end:
  98.     dec  eax
  99.     mov  [left_marked_counter],eax
  100.     jmp  still
  101. .right_1:
  102.     mov  ebp,[right_folder_block]
  103. .start_1:
  104.     mov  ebx,ebp
  105.     dec  ebx
  106.     imul ebx,304
  107.     add  ebx,[right_folder_data]
  108.     add  ebx,32+40
  109.     cmp  [ebx],word '..'
  110.     jne  .continue_2
  111.     cmp  [ebx+2],byte 0
  112.     je   .continue_3
  113. .continue_2:
  114.     call  select_mark_action
  115. .continue_3:
  116. @@:
  117.     dec  ebp
  118.     jnz  .start_1
  119.     call  draw_right_panel
  120.     cmp  [mark_action_counter],0
  121.     jne  @f
  122.     mov  eax,[right_folder_block]
  123. ;    dec  eax
  124. ;    mov  [right_marked_counter],eax
  125. ;    jmp  still
  126.     jmp   .end_1
  127. @@:
  128.     cmp  [mark_action_counter],1
  129.     jne  @f
  130.     mov  [right_marked_counter],0
  131.     jmp  still
  132. @@:
  133.     mov  eax,[right_folder_block]
  134.     sub  eax,[right_marked_counter]
  135. .end_1:
  136.     dec  eax
  137.     mov  [right_marked_counter],eax    
  138.     jmp  still
  139. ;---------------------------------------------------------------------
  140. select_mark_action:
  141.     add  ebx,299-40
  142.     cmp  [mark_action_counter],0
  143.     jne  @f
  144.     mov  [ebx],byte 1
  145.     jmp  .continue
  146. @@:
  147.     cmp  [mark_action_counter],1
  148.     jne  @f
  149.     mov  [ebx],byte 0
  150.     jmp  .continue
  151. @@:
  152.     mov  al,[ebx]
  153.     inc  al
  154.     and  al,1
  155.     mov  [ebx],al
  156. .continue:
  157.     ret
  158. ;---------------------------------------------------------------------