Subversion Repositories Kolibri OS

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
1792 yogev_ezra 1
;---------------------------------------------------------------------
2
open_file_f4:
3
    cmp  [select_panel_counter],0
4
    jne  .right_1
5
.left_1:
6
    xor  eax,eax
7
    mov  ax,[left_start_draw_cursor_line]
8
    xor  edx,edx
9
    mov  ebx,10
10
    div  ebx
11
    mov  esi,[left_start_draw_line]
12
    add  esi,eax
13
    imul esi,304
14
    add  esi,[left_folder_data]
15
    add  esi,32
16
    test [esi],byte 0x10
17
    jz	 file_no_folder_1
18
    jmp  still
19
.right_1:
20
    xor  eax,eax
21
    mov  ax,[right_start_draw_cursor_line]
22
    xor  edx,edx
23
    mov  ebx,10
24
    div  ebx
25
    mov  esi,[right_start_draw_line]
26
    add  esi,eax
27
    imul esi,304
28
    add  esi,[right_folder_data]
29
    add  esi,32
30
    test [esi],byte 0x10
31
    jz	 file_no_folder_1
32
    jmp  still
33
;---------------------------------------------------------------------
34
file_no_folder_1:
35
    call  calculate_file_no_folder_1
36
@@:
37
    std
38
    lodsb
39
    cmp   esi,edx
40
    je	  still
41
    cmp   al,'.'
42
    jnz   @b
43
    call  calculate_file_no_folder_2
44
    call  open_file_with_appl_1
45
    jmp  still
46
;---------------------------------------------------------------------
47
calculate_file_no_folder_1:
48
    add   esi,40
49
    mov   edx,esi
50
    xor   eax,eax
51
@@:
52
    cld
53
    lodsb
54
    test  eax,eax
55
    jnz   @b
56
    mov   [temp_counter_1],esi
57
    dec   esi
58
    dec   edx
59
    ret
60
;---------------------------------------------------------------------
61
calculate_file_no_folder_2:
62
    add   esi,2
63
    mov   ecx,[temp_counter_1]
64
    sub   ecx,esi
65
    dec   ecx
66
    mov   [extension_size],ecx
67
    inc   edx
68
    ret
69
;---------------------------------------------------------------------
70
file_no_folder:
71
    call  calculate_file_no_folder_1
72
@@:
73
    std
74
    lodsb
75
    cmp   esi,edx
76
    je	  start_file
77
    cmp   al,'.'
78
    jnz   @b
79
    call  calculate_file_no_folder_2
80
    call  open_file_with_appl
81
    cmp   eax,1
82
    je	  start_file.1
83
    jmp  still
84
;---------------------------------------------------------------------
85
start_file:
86
    inc   edx
87
.1:
88
    cmp   [select_panel_counter],0
89
    jne   @f
90
    mov   esi,read_folder_name    ;read_folder.name
91
    jmp   .start
92
@@:
93
    mov   esi,read_folder_1_name   ;read_folder_1.name
94
.start:
95
    mov   edi,file_name  ;start_file_data.name
96
    xor   eax,eax
97
@@:
98
    cld
99
    lodsb
100
    stosb
101
    test  eax,eax
102
    jnz   @b
103
    mov   [edi-1], byte '/'
104
    mov   esi,edx
105
    mov   [error_pointer], edx	;start_file_data.name
106
@@:
107
    cld
108
    lodsb
109
    stosb
110
    test  eax,eax
111
    jnz   @b
112
    mov   [start_file_data.param],eax
113
    call  start_appl
114
    cmp   eax,0
115
    jge    @f
116
    mov  ebx,0
117
    sub  ebx,eax
118
    mov  eax,ebx
119
    call start_error_window_thread
120
@@:
121
    jmp  still
122
;---------------------------------------------------------------------