Subversion Repositories Kolibri OS

Rev

Rev 183 | Rev 314 | Go to most recent revision | Only display areas with differences | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 183 Rev 205
1
use32
1
use32
2
        db      'MENUET01'
2
        db      'MENUET01'
3
        dd      1
3
        dd      1
4
        dd      start
4
        dd      start
5
        dd      i_end
5
        dd      i_end
6
memsize dd      mem
6
memsize dd      mem
7
        dd      stacktop
7
        dd      stacktop
8
        dd      0, 0
8
        dd      0, 0
9
 
9
 
10
include 'lang.inc'
10
include 'lang.inc'
11
include 'font.inc'
11
include 'font.inc'
12
include 'sort.inc'
12
include 'sort.inc'
13
include 'kglobals.inc'
13
include 'kglobals.inc'
14
include 'memalloc.inc'
14
include 'memalloc.inc'
15
include 'dialogs.inc'
15
include 'dialogs.inc'
16
include 'viewer.inc'
16
include 'viewer.inc'
17
 
17
 
18
start:
18
start:
19
        mov     eax, mem
19
        mov     eax, mem
20
        call    mf_init
20
        call    mf_init
21
        call    draw_window
21
        call    draw_window
22
        push    66
22
        push    66
23
        pop     eax
23
        pop     eax
24
        push    1
24
        push    1
25
        pop     ebx
25
        pop     ebx
26
        mov     ecx, ebx
26
        mov     ecx, ebx
27
        int     40h     ; set keyboard mode to scancodes
27
        int     40h     ; set keyboard mode to scancodes
28
        call    init_console
28
        call    init_console
29
        mov     esi, def_left_dir
29
        mov     esi, def_left_dir
30
        mov     edi, panel1_dir
30
        mov     edi, panel1_dir
31
@@:
31
@@:
32
        lodsb
32
        lodsb
33
        stosb
33
        stosb
34
        test    al, al
34
        test    al, al
35
        jnz     @b
35
        jnz     @b
36
@@:
36
@@:
37
        mov     esi, def_right_dir
37
        mov     esi, def_right_dir
38
        mov     edi, panel2_dir
38
        mov     edi, panel2_dir
39
@@:
39
@@:
40
        lodsb
40
        lodsb
41
        stosb
41
        stosb
42
        test    al, al
42
        test    al, al
43
        jnz     @b
43
        jnz     @b
44
        mov     eax, 304
44
        mov     eax, 304
45
        mov     [panel1_nfa], eax
45
        mov     [panel1_nfa], eax
46
        mov     [panel2_nfa], eax
46
        mov     [panel2_nfa], eax
47
        mov     [panel1_files], buf1
47
        mov     [panel1_files], buf1
48
        mov     [panel2_files], buf2
48
        mov     [panel2_files], buf2
49
        mov     [panel1_sortmode], 0    ; sort by name
49
        mov     [panel1_sortmode], 0    ; sort by name
50
        mov     [panel2_sortmode], 0
50
        mov     [panel2_sortmode], 0
51
        mov     [num_screens], 1
51
        mov     [num_screens], 1
52
        mov     eax, 8
52
        mov     eax, 8
53
        call    mf_alloc
53
        call    mf_alloc
54
        mov     [screens], eax
54
        mov     [screens], eax
55
        mov     ecx, panels_vtable
55
        mov     ecx, panels_vtable
56
        mov     [eax], ecx
56
        mov     [eax], ecx
57
        mov     [active_screen_vtable], ecx
57
        mov     [active_screen_vtable], ecx
58
        call    draw_keybar
58
        call    draw_keybar
59
        call    draw_cmdbar
59
        call    draw_cmdbar
60
        mov     ebp, panel1_data
60
        mov     ebp, panel1_data
61
        call    read_folder
61
        call    read_folder
62
        call    draw_panel
62
        call    draw_panel
63
        mov     ebp, panel2_data
63
        mov     ebp, panel2_data
64
        call    read_folder
64
        call    read_folder
65
        call    draw_panel
65
        call    draw_panel
66
event:
66
event:
67
        push    10
67
        push    10
68
        pop     eax
68
        pop     eax
69
        int     40h
69
        int     40h
70
        dec     eax
70
        dec     eax
71
        jz      redraw
71
        jz      redraw
72
        dec     eax
72
        dec     eax
73
        jz      key
73
        jz      key
74
; button - we have only one button, close
74
; button - we have only one button, close
75
exit:
75
exit:
76
        or      eax, -1
76
        or      eax, -1
77
        int     40h
77
        int     40h
78
redraw:
78
redraw:
79
        mov     al, 9
79
        mov     al, 9
80
        mov     ebx, procinfo
80
        mov     ebx, procinfo
81
        or      ecx, -1
81
        or      ecx, -1
82
        int     40h
82
        int     40h
83
; test if rolled up
83
; test if rolled up
84
; height of rolled up window is [skinh]+3
84
; height of rolled up window is [skinh]+3
85
        mov     eax, [ebx+46]
85
        mov     eax, [ebx+46]
86
        sub     eax, [skinh]
86
        sub     eax, [skinh]
87
        cmp     eax, 5
87
        cmp     eax, 5
88
        ja      @f
88
        ja      @f
89
        mov     al, 12
89
        mov     al, 12
90
        push    1
90
        push    1
91
        pop     ebx
91
        pop     ebx
92
        int     0x40
92
        int     0x40
93
        xor     eax, eax
93
        xor     eax, eax
94
; ebx, ecx, edi are ignored by function 0 after first redraw
94
; ebx, ecx, edi are ignored by function 0 after first redraw
95
        mov     edx, 0x13000000
95
        mov     edx, 0x13000000
96
        int     0x40
96
        int     0x40
97
        mov     al, 12
97
        mov     al, 12
98
        inc     ebx
98
        inc     ebx
99
        int     0x40
99
        int     0x40
100
        jmp     event
100
        jmp     event
101
@@:
101
@@:
102
        xor     ecx, ecx
102
        xor     ecx, ecx
103
        mov     eax, [ebx+42]
103
        mov     eax, [ebx+42]
104
        sub     eax, 5*2
104
        sub     eax, 5*2
105
        jae     @f
105
        jae     @f
106
        xor     eax, eax
106
        xor     eax, eax
107
@@:
107
@@:
108
        cdq
108
        cdq
109
        mov     esi, font_width
109
        mov     esi, font_width
110
        div     esi
110
        div     esi
111
        cmp     eax, 54
111
        cmp     eax, 54
112
        jae     @f
112
        jae     @f
113
        mov     al, 54
113
        mov     al, 54
114
        mov     ch, 1
114
        mov     ch, 1
115
@@:
115
@@:
116
        cmp     eax, 255
116
        cmp     eax, 255
117
        jbe     @f
117
        jbe     @f
118
        mov     eax, 255
118
        mov     eax, 255
119
        mov     ch, 1
119
        mov     ch, 1
120
@@:
120
@@:
121
        cmp     eax, [cur_width]
121
        cmp     eax, [cur_width]
122
        mov     [cur_width], eax
122
        mov     [cur_width], eax
123
        setnz   cl
123
        setnz   cl
124
        or      cl, ch
124
        or      cl, ch
125
        test    edx, edx
125
        test    edx, edx
126
        setnz   ch
126
        setnz   ch
127
        or      cl, ch
127
        or      cl, ch
128
        mov     eax, [ebx+46]
128
        mov     eax, [ebx+46]
129
        sub     eax, [skinh]
129
        sub     eax, [skinh]
130
        sub     eax, 5
130
        sub     eax, 5
131
        jns     @f
131
        jns     @f
132
        xor     eax, eax
132
        xor     eax, eax
133
@@:
133
@@:
134
        cdq
134
        cdq
135
        mov     esi, font_height
135
        mov     esi, font_height
136
        div     esi
136
        div     esi
137
        cmp     eax, 8
137
        cmp     eax, 8
138
        jae     @f
138
        jae     @f
139
        mov     al, 8
139
        mov     al, 8
140
        mov     cl, 1
140
        mov     cl, 1
141
@@:
141
@@:
142
        cmp     eax, 255
142
        cmp     eax, 255
143
        jbe     @f
143
        jbe     @f
144
        mov     eax, 255
144
        mov     eax, 255
145
        mov     cl, 1
145
        mov     cl, 1
146
@@:
146
@@:
147
        cmp     eax, [cur_height]
147
        cmp     eax, [cur_height]
148
        mov     [cur_height], eax
148
        mov     [cur_height], eax
149
        setnz   ch
149
        setnz   ch
150
        or      cl, ch
150
        or      cl, ch
151
        test    edx, edx
151
        test    edx, edx
152
        setnz   ch
152
        setnz   ch
153
        test    cx, cx
153
        test    cx, cx
154
        jz      @f
154
        jz      @f
155
        mov     eax, [MemForImage]
155
        mov     eax, [MemForImage]
156
        call    mf_free
156
        call    mf_free
157
        and     [MemForImage], 0
157
        and     [MemForImage], 0
158
        call    init_console
158
        call    init_console
159
        push    67
159
        push    67
160
        pop     eax
160
        pop     eax
161
        or      ebx, -1
161
        or      ebx, -1
162
        or      ecx, -1
162
        or      ecx, -1
163
        mov     edx, [cur_width]
163
        mov     edx, [cur_width]
164
        imul    edx, font_width
164
        imul    edx, font_width
165
        add     edx, 5*2
165
        add     edx, 5*2
166
        mov     esi, [cur_height]
166
        mov     esi, [cur_height]
167
        imul    esi, font_height
167
        imul    esi, font_height
168
        add     esi, [skinh]
168
        add     esi, [skinh]
169
        add     esi, 5
169
        add     esi, 5
170
        int     40h
170
        int     40h
171
        call    draw_window
171
        call    draw_window
172
        call    draw_keybar
172
        call    draw_keybar
173
        mov     ebp, [active_screen_data]
173
        mov     ebp, [active_screen_data]
174
        mov     eax, [active_screen_vtable]
174
        mov     eax, [active_screen_vtable]
175
        call    dword [eax+screen_vtable.OnRedraw]
175
        call    dword [eax+screen_vtable.OnRedraw]
176
        jmp     event
176
        jmp     event
177
@@:
177
@@:
178
        call    draw_window
178
        call    draw_window
179
        jmp     event
179
        jmp     event
180
key:
180
key:
181
        mov     al, 2
181
        mov     al, 2
182
        int     40h
182
        int     40h
183
        test    al, al
183
        test    al, al
184
        jnz     event
184
        jnz     event
185
        xchg    al, ah
185
        xchg    al, ah
186
        cmp     al, 0xE0
186
        cmp     al, 0xE0
187
        jnz     @f
187
        jnz     @f
188
        mov     [bWasE0], 1
188
        mov     [bWasE0], 1
189
        jmp     event
189
        jmp     event
190
@@:
190
@@:
191
        xchg    ah, [bWasE0]
191
        xchg    ah, [bWasE0]
192
        mov     ebp, [active_screen_data]
192
        mov     ebp, [active_screen_data]
193
        mov     edx, [active_screen_vtable]
193
        mov     edx, [active_screen_vtable]
194
        cmp     al, 0x1D
194
        cmp     al, 0x1D
195
        jz      .ctrl_down
195
        jz      .ctrl_down
196
        cmp     al, 0x9D
196
        cmp     al, 0x9D
197
        jz      .ctrl_up
197
        jz      .ctrl_up
198
        cmp     al, 0x2A
198
        cmp     al, 0x2A
199
        jz      .lshift_down
199
        jz      .lshift_down
200
        cmp     al, 0xAA
200
        cmp     al, 0xAA
201
        jz      .lshift_up
201
        jz      .lshift_up
202
        cmp     al, 0x36
202
        cmp     al, 0x36
203
        jz      .rshift_down
203
        jz      .rshift_down
204
        cmp     al, 0xB6
204
        cmp     al, 0xB6
205
        jz      .rshift_up
205
        jz      .rshift_up
206
        cmp     al, 0x38
206
        cmp     al, 0x38
207
        jz      .alt_down
207
        jz      .alt_down
208
        cmp     al, 0xB8
208
        cmp     al, 0xB8
209
        jz      .alt_up
209
        jz      .alt_up
210
        call    [edx+screen_vtable.OnKey]
210
        call    [edx+screen_vtable.OnKey]
211
        jmp     event
211
        jmp     event
212
.ctrl_down:
212
.ctrl_down:
213
        test    ah, ah
213
        test    ah, ah
214
        jnz     .rctrl_down
214
        jnz     .rctrl_down
215
        or      [ctrlstate], 4
215
        or      [ctrlstate], 4
216
        jmp     .keybar
216
        jmp     .keybar
217
.rctrl_down:
217
.rctrl_down:
218
        or      [ctrlstate], 8
218
        or      [ctrlstate], 8
219
        jmp     .keybar
219
        jmp     .keybar
220
.ctrl_up:
220
.ctrl_up:
221
        test    ah, ah
221
        test    ah, ah
222
        jnz     .rctrl_up
222
        jnz     .rctrl_up
223
        and     [ctrlstate], not 4
223
        and     [ctrlstate], not 4
224
        jmp     .keybar
224
        jmp     .keybar
225
.rctrl_up:
225
.rctrl_up:
226
        and     [ctrlstate], not 8
226
        and     [ctrlstate], not 8
227
.keybar:
227
.keybar:
228
        call    draw_keybar
228
        call    draw_keybar
229
        call    draw_image
229
        call    draw_image
230
@@:     jmp     event
230
@@:     jmp     event
231
.lshift_down:
231
.lshift_down:
232
; ignore E0 2A sequence
232
; ignore E0 2A sequence
233
; e.g. arrow keys with NumLock on generate sequence E0 2A E0 xx / E0 xx+80 E0 AA
233
; e.g. arrow keys with NumLock on generate sequence E0 2A E0 xx / E0 xx+80 E0 AA
234
; where xx is scancode, so we can safely ignore E0 2A
234
; where xx is scancode, so we can safely ignore E0 2A
235
        test    ah, ah
235
        test    ah, ah
236
        jnz     @b
236
        jnz     @b
237
        or      [ctrlstate], 1
237
        or      [ctrlstate], 1
238
        jmp     .keybar
238
        jmp     .keybar
239
.lshift_up:
239
.lshift_up:
240
; ignore E0 AA sequence
240
; ignore E0 AA sequence
241
        test    ah, ah
241
        test    ah, ah
242
        jnz     @b
242
        jnz     @b
243
        and     [ctrlstate], not 1
243
        and     [ctrlstate], not 1
244
        jmp     .keybar
244
        jmp     .keybar
245
.rshift_down:
245
.rshift_down:
246
        or      [ctrlstate], 2
246
        or      [ctrlstate], 2
247
        jmp     .keybar
247
        jmp     .keybar
248
.rshift_up:
248
.rshift_up:
249
        and     [ctrlstate], not 2
249
        and     [ctrlstate], not 2
250
        jmp     .keybar
250
        jmp     .keybar
251
.alt_down:
251
.alt_down:
252
        test    ah, ah
252
        test    ah, ah
253
        jnz     .ralt_down
253
        jnz     .ralt_down
254
        or      [ctrlstate], 0x10
254
        or      [ctrlstate], 0x10
255
        jmp     .keybar
255
        jmp     .keybar
256
.ralt_down:
256
.ralt_down:
257
        or      [ctrlstate], 0x20
257
        or      [ctrlstate], 0x20
258
        jmp     .keybar
258
        jmp     .keybar
259
.alt_up:
259
.alt_up:
260
        test    ah, ah
260
        test    ah, ah
261
        jnz     .ralt_up
261
        jnz     .ralt_up
262
        and     [ctrlstate], not 0x10
262
        and     [ctrlstate], not 0x10
263
        jmp     .keybar
263
        jmp     .keybar
264
.ralt_up:
264
.ralt_up:
265
        and     [ctrlstate], not 0x20
265
        and     [ctrlstate], not 0x20
266
        jmp     .keybar
266
        jmp     .keybar
267
 
267
 
268
process_ctrl_keys:
268
process_ctrl_keys:
269
        cmp     byte [esi], 0
269
        cmp     byte [esi], 0
270
        jz      .done
270
        jz      .done
271
        push    ecx
271
        push    ecx
272
        cmp     al, [esi]
272
        cmp     al, [esi]
273
        jz      .check
273
        jz      .check
274
.cont:
274
.cont:
275
        pop     ecx
275
        pop     ecx
276
        add     esi, 8
276
        add     esi, 8
277
        jmp     process_ctrl_keys
277
        jmp     process_ctrl_keys
278
.done:
278
.done:
279
        stc
279
        stc
280
        ret
280
        ret
281
.check:
281
.check:
282
        mov     cl, 0
282
        mov     cl, 0
283
        call    .check_ctrlkey
283
        call    .check_ctrlkey
284
        jc      .cont
284
        jc      .cont
285
        mov     cl, 2
285
        mov     cl, 2
286
        call    .check_ctrlkey
286
        call    .check_ctrlkey
287
        jc      .cont
287
        jc      .cont
288
        mov     cl, 4
288
        mov     cl, 4
289
        call    .check_ctrlkey
289
        call    .check_ctrlkey
290
        jc      .cont
290
        jc      .cont
291
        pop     ecx
291
        pop     ecx
292
        call    dword [esi+4]
292
        call    dword [esi+4]
293
        clc
293
        clc
294
        ret
294
        ret
295
.check_ctrlkey:
295
.check_ctrlkey:
296
        push    eax edx
296
        push    eax edx
297
        movzx   edx, [ctrlstate]
297
        movzx   edx, [ctrlstate]
298
        shr     edx, cl
298
        shr     edx, cl
299
        add     cl, cl
299
        add     cl, cl
300
        movzx   eax, word [esi+2]
300
        movzx   eax, word [esi+2]
301
        shr     eax, cl
301
        shr     eax, cl
302
        and     eax, 15
302
        and     eax, 15
303
        cmp     al, ctrlkey_tests_num
303
        cmp     al, ctrlkey_tests_num
304
        jae     .fail
304
        jae     .fail
305
        xchg    eax, edx
305
        xchg    eax, edx
306
        and     al, 3
306
        and     al, 3
307
        call    [ctrlkey_tests + edx*4]
307
        call    [ctrlkey_tests + edx*4]
308
        cmp     al, 1
308
        cmp     al, 1
309
        pop     edx eax
309
        pop     edx eax
310
        ret
310
        ret
311
.fail:
311
.fail:
312
        stc
312
        stc
313
        pop     edx eax
313
        pop     edx eax
314
        ret
314
        ret
315
 
315
 
316
ctrlkey_test0:
316
ctrlkey_test0:
317
        test    al, al
317
        test    al, al
318
        setz    al
318
        setz    al
319
        ret
319
        ret
320
ctrlkey_test1:
320
ctrlkey_test1:
321
        test    al, al
321
        test    al, al
322
        setnp   al
322
        setnp   al
323
        ret
323
        ret
324
ctrlkey_test2:
324
ctrlkey_test2:
325
        cmp     al, 3
325
        cmp     al, 3
326
        setz    al
326
        setz    al
327
        ret
327
        ret
328
ctrlkey_test3:
328
ctrlkey_test3:
329
        cmp     al, 1
329
        cmp     al, 1
330
        setz    al
330
        setz    al
331
        ret
331
        ret
332
ctrlkey_test4:
332
ctrlkey_test4:
333
        cmp     al, 2
333
        cmp     al, 2
334
        setz    al
334
        setz    al
335
        ret
335
        ret
336
 
336
 
337
; TODO: add "no memory" error handling
337
; TODO: add "no memory" error handling
338
new_screen:
338
new_screen:
339
        call    mf_alloc
339
        call    mf_alloc
340
        test    eax, eax
340
        test    eax, eax
341
        jnz     @f
341
        jnz     @f
342
        ret
342
        ret
343
@@:
343
@@:
344
        mov     ebp, eax
344
        mov     ebp, eax
345
        mov     ebx, [num_screens]
345
        mov     ebx, [num_screens]
346
        inc     ebx
346
        inc     ebx
347
        shl     ebx, 3
347
        shl     ebx, 3
348
        mov     eax, [screens]
348
        mov     eax, [screens]
349
        call    mf_realloc
349
        call    mf_realloc
350
        test    eax, eax
350
        test    eax, eax
351
        jnz     @f
351
        jnz     @f
352
        mov     eax, ebp
352
        mov     eax, ebp
353
        call    mf_free
353
        call    mf_free
354
        xor     eax, eax
354
        xor     eax, eax
355
        ret
355
        ret
356
@@:
356
@@:
357
        mov     [screens], eax
357
        mov     [screens], eax
358
        inc     [num_screens]
358
        inc     [num_screens]
359
        mov     [eax+ebx-8], edx
359
        mov     [eax+ebx-8], edx
360
        mov     [eax+ebx-4], ebp
360
        mov     [eax+ebx-4], ebp
361
        mov     eax, [num_screens]
361
        mov     eax, [num_screens]
362
        dec     eax
362
        dec     eax
363
        mov     [active_screen], eax
363
        mov     [active_screen], eax
364
        mov     [active_screen_vtable], edx
364
        mov     [active_screen_vtable], edx
365
        mov     [active_screen_data], ebp
365
        mov     [active_screen_data], ebp
366
        jmp     draw_keybar
366
        jmp     draw_keybar
367
 
367
 
368
next_screen:
368
next_screen:
369
        mov     eax, [active_screen]
369
        mov     eax, [active_screen]
370
        inc     eax
370
        inc     eax
371
        cmp     eax, [num_screens]
371
        cmp     eax, [num_screens]
372
        jnz     @f
372
        jnz     @f
373
        xor     eax, eax
373
        xor     eax, eax
374
@@:     mov     [active_screen], eax
374
@@:     mov     [active_screen], eax
375
        jmp     change_screen
375
        jmp     change_screen
376
 
376
 
377
delete_active_screen:
377
delete_active_screen:
378
        mov     edi, [screens]
378
        mov     edi, [screens]
379
        mov     eax, [active_screen]
379
        mov     eax, [active_screen]
380
        shl     eax, 3
380
        shl     eax, 3
381
        add     edi, eax
381
        add     edi, eax
382
        push    dword [edi+4]
382
        push    dword [edi+4]
383
        lea     esi, [edi+8]
383
        lea     esi, [edi+8]
384
        mov     ecx, [num_screens]
384
        mov     ecx, [num_screens]
385
        sub     ecx, [active_screen]
385
        sub     ecx, [active_screen]
386
        dec     ecx
386
        dec     ecx
387
        add     ecx, ecx
387
        add     ecx, ecx
388
        rep     movsd
388
        rep     movsd
389
        dec     [num_screens]
389
        dec     [num_screens]
390
        mov     ebx, [num_screens]
390
        mov     ebx, [num_screens]
391
        shl     ebx, 3
391
        shl     ebx, 3
392
        mov     eax, [screens]
392
        mov     eax, [screens]
393
        call    mf_realloc
393
        call    mf_realloc
394
        pop     eax
394
        pop     eax
395
        call    mf_free
395
        call    mf_free
396
        and     [active_screen], 0
396
        and     [active_screen], 0
397
 
397
 
398
change_screen:
398
change_screen:
399
        pusha
399
        pusha
400
        mov     eax, [active_screen]
400
        mov     eax, [active_screen]
401
        mov     esi, [screens]
401
        mov     esi, [screens]
402
        mov     ebp, [esi+eax*8+4]
402
        mov     ebp, [esi+eax*8+4]
403
        mov     eax, [esi+eax*8]
403
        mov     eax, [esi+eax*8]
404
        mov     [active_screen_vtable], eax
404
        mov     [active_screen_vtable], eax
405
        mov     [active_screen_data], ebp
405
        mov     [active_screen_data], ebp
406
        call    draw_keybar
406
        call    draw_keybar
407
        call    [eax+screen_vtable.OnRedraw]
407
        call    [eax+screen_vtable.OnRedraw]
408
        popa
408
        popa
409
        ret
409
        ret
410
 
410
 
411
F12:
411
F12:
412
        mov     eax, [cur_width]
412
        mov     eax, [cur_width]
413
        add     eax, 8
413
        add     eax, 8
414
        mov     esi, eax
414
        mov     esi, eax
415
        mul     [num_screens]
415
        mul     [num_screens]
416
        call    mf_alloc
416
        call    mf_alloc
417
        test    eax, eax
417
        test    eax, eax
418
        jnz     @f
418
        jnz     @f
419
        ret
419
        ret
420
@@:
420
@@:
421
        mov     ebx, eax
421
        mov     ebx, eax
422
        mov     edi, eax
422
        mov     edi, eax
423
        xor     ecx, ecx
423
        xor     ecx, ecx
424
.next:
424
.next:
425
        xor     eax, eax
425
        xor     eax, eax
426
        stosd
426
        stosd
427
        inc     ecx
427
        inc     ecx
428
        cmp     ecx, [num_screens]
428
        cmp     ecx, [num_screens]
429
        jz      @f
429
        jz      @f
430
        lea     eax, [edi+esi-4]
430
        lea     eax, [edi+esi-4]
431
        mov     dword [edi-4], eax
431
        mov     dword [edi-4], eax
432
@@:
432
@@:
433
        xor     eax, eax
433
        xor     eax, eax
434
        stosd
434
        stosd
435
        dec     ecx
435
        dec     ecx
436
        jz      @f
436
        jz      @f
437
        lea     eax, [edi-8]
437
        lea     eax, [edi-8]
438
        sub     eax, esi
438
        sub     eax, esi
439
        mov     dword [edi-4], eax
439
        mov     dword [edi-4], eax
440
@@:
440
@@:
441
        mov     al, '&'
441
        mov     al, '&'
442
        stosb
442
        stosb
443
        cmp     ecx, 36
443
        cmp     ecx, 36
444
        jae     .noletter
444
        jae     .noletter
445
        lea     eax, [ecx+'0']
445
        lea     eax, [ecx+'0']
446
        cmp     al, '9'
446
        cmp     al, '9'
447
        jbe     @f
447
        jbe     @f
448
        add     al, 7
448
        add     al, 7
449
@@:
449
@@:
450
        stosb
450
        stosb
451
        mov     al, '.'
451
        mov     al, '.'
452
        stosb
452
        stosb
453
        jmp     .letter_done
453
        jmp     .letter_done
454
.noletter:
454
.noletter:
455
        mov     al, ' '
455
        mov     al, ' '
456
        stosb
456
        stosb
457
        stosb
457
        stosb
458
.letter_done:
458
.letter_done:
459
        mov     al, ' '
459
        mov     al, ' '
460
        stosb
460
        stosb
461
        pushad
461
        pushad
462
        mov     eax, [screens]
462
        mov     eax, [screens]
463
        mov     ebp, [eax+ecx*8+4]
463
        mov     ebp, [eax+ecx*8+4]
464
        mov     eax, [eax+ecx*8]
464
        mov     eax, [eax+ecx*8]
465
        mov     ecx, [cur_width]
465
        mov     ecx, [cur_width]
466
        sub     ecx, 12
466
        sub     ecx, 12
467
        call    [eax + screen_vtable.getname]
467
        call    [eax + screen_vtable.getname]
468
        popad
468
        popad
469
        sub     edi, 4
469
        sub     edi, 4
470
        add     edi, [cur_width]
470
        add     edi, [cur_width]
471
        inc     ecx
471
        inc     ecx
472
        cmp     ecx, [num_screens]
472
        cmp     ecx, [num_screens]
473
        jb      .next
473
        jb      .next
474
        mov     eax, [active_screen]
474
        mov     eax, [active_screen]
475
        mul     esi
475
        mul     esi
476
        add     eax, ebx
476
        add     eax, ebx
477
        push    1
477
        push    1
478
        push    aScreens
478
        push    aScreens
479
        push    eax
479
        push    eax
480
        call    menu
480
        call    menu
481
        cmp     eax, -1
481
        cmp     eax, -1
482
        jz      @f
482
        jz      @f
483
        sub     eax, ebx
483
        sub     eax, ebx
484
        div     esi
484
        div     esi
485
        mov     [active_screen], eax
485
        mov     [active_screen], eax
486
@@:
486
@@:
487
        mov     eax, ebx
487
        mov     eax, ebx
488
        call    mf_free
488
        call    mf_free
489
        jmp     change_screen
489
        jmp     change_screen
490
 
490
 
491
panels_OnKey:
491
panels_OnKey:
492
        mov     ebp, [active_panel]
492
        mov     ebp, [active_panel]
493
        mov     ecx, [ebp + panel1_index - panel1_data]
493
        mov     ecx, [ebp + panel1_index - panel1_data]
494
        mov     edx, [ebp + panel1_start - panel1_data]
494
        mov     edx, [ebp + panel1_start - panel1_data]
495
        mov     ebx, [ebp + panel1_colst - panel1_data]
495
        mov     ebx, [ebp + panel1_colst - panel1_data]
496
        add     ebx, edx
496
        add     ebx, edx
497
        mov     esi, panels_ctrlkeys
497
        mov     esi, panels_ctrlkeys
498
        jmp     process_ctrl_keys
498
        jmp     process_ctrl_keys
499
.ret:
499
.ret:
500
        ret
500
        ret
501
.up:
501
.up:
502
        jecxz   .ret
502
        jecxz   .ret
503
        dec     ecx
503
        dec     ecx
504
        mov     [ebp + panel1_index - panel1_data], ecx
504
        mov     [ebp + panel1_index - panel1_data], ecx
505
        cmp     ecx, edx
505
        cmp     ecx, edx
506
        jae     .done_redraw
506
        jae     .done_redraw
507
        mov     [ebp + panel1_start - panel1_data], ecx
507
        mov     [ebp + panel1_start - panel1_data], ecx
508
.done_redraw:
508
.done_redraw:
509
;        call    draw_panel
509
;        call    draw_panel
510
;        ret
510
;        ret
511
        jmp     draw_panel
511
        jmp     draw_panel
512
.down:
512
.down:
513
        inc     ecx
513
        inc     ecx
514
        cmp     ecx, [ebp + panel1_numfiles - panel1_data]
514
        cmp     ecx, [ebp + panel1_numfiles - panel1_data]
515
        jae     .ret
515
        jae     .ret
516
        mov     [ebp + panel1_index - panel1_data], ecx
516
        mov     [ebp + panel1_index - panel1_data], ecx
517
        cmp     ecx, ebx
517
        cmp     ecx, ebx
518
        jb      .done_redraw
518
        jb      .done_redraw
519
        sub     ecx, [ebp + panel1_colst - panel1_data]
519
        sub     ecx, [ebp + panel1_colst - panel1_data]
520
        inc     ecx
520
        inc     ecx
521
        mov     [ebp + panel1_start - panel1_data], ecx
521
        mov     [ebp + panel1_start - panel1_data], ecx
522
        jmp     .done_redraw
522
        jmp     .done_redraw
523
.left:
523
.left:
524
        jecxz   .ret
524
        jecxz   .ret
525
        sub     ecx, [ebp + panel1_colsz - panel1_data]
525
        sub     ecx, [ebp + panel1_colsz - panel1_data]
526
        jae     @f
526
        jae     @f
527
        xor     ecx, ecx
527
        xor     ecx, ecx
528
@@:
528
@@:
529
        mov     [ebp + panel1_index - panel1_data], ecx
529
        mov     [ebp + panel1_index - panel1_data], ecx
530
        cmp     ecx, edx
530
        cmp     ecx, edx
531
        jae     .done_redraw
531
        jae     .done_redraw
532
        sub     edx, [ebp + panel1_colsz - panel1_data]
532
        sub     edx, [ebp + panel1_colsz - panel1_data]
533
        jae     @f
533
        jae     @f
534
        xor     edx, edx
534
        xor     edx, edx
535
@@:
535
@@:
536
        mov     [ebp + panel1_start - panel1_data], edx
536
        mov     [ebp + panel1_start - panel1_data], edx
537
        jmp     .done_redraw
537
        jmp     .done_redraw
538
.right:
538
.right:
539
        add     ecx, [ebp + panel1_colsz - panel1_data]
539
        add     ecx, [ebp + panel1_colsz - panel1_data]
540
        cmp     ecx, [ebp + panel1_numfiles - panel1_data]
540
        cmp     ecx, [ebp + panel1_numfiles - panel1_data]
541
        jb      @f
541
        jb      @f
542
        mov     ecx, [ebp + panel1_numfiles - panel1_data]
542
        mov     ecx, [ebp + panel1_numfiles - panel1_data]
543
        dec     ecx
543
        dec     ecx
544
@@:
544
@@:
545
        mov     [ebp + panel1_index - panel1_data], ecx
545
        mov     [ebp + panel1_index - panel1_data], ecx
546
        cmp     ecx, ebx
546
        cmp     ecx, ebx
547
        jb      .done_redraw
547
        jb      .done_redraw
548
        add     ebx, [ebp + panel1_colsz - panel1_data]
548
        add     ebx, [ebp + panel1_colsz - panel1_data]
549
        cmp     ebx, [ebp + panel1_numfiles - panel1_data]
549
        cmp     ebx, [ebp + panel1_numfiles - panel1_data]
550
        jbe     @f
550
        jbe     @f
551
        mov     ebx, [ebp + panel1_numfiles - panel1_data]
551
        mov     ebx, [ebp + panel1_numfiles - panel1_data]
552
@@:
552
@@:
553
        sub     ebx, [ebp + panel1_colst - panel1_data]
553
        sub     ebx, [ebp + panel1_colst - panel1_data]
554
        jae     @f
554
        jae     @f
555
        xor     ebx, ebx
555
        xor     ebx, ebx
556
@@:
556
@@:
557
        mov     [ebp + panel1_start - panel1_data], ebx
557
        mov     [ebp + panel1_start - panel1_data], ebx
558
        jmp     .done_redraw
558
        jmp     .done_redraw
559
.tab:
559
.tab:
560
        xor     [active_panel], panel1_data xor panel2_data
560
        xor     [active_panel], panel1_data xor panel2_data
561
        call    draw_cmdbar
561
        call    draw_cmdbar
562
        call    draw_panel
562
        call    draw_panel
563
        mov     ebp, [active_panel]
563
        mov     ebp, [active_panel]
564
        jmp     .done_redraw
564
        jmp     .done_redraw
565
.home:
565
.home:
566
        and     [ebp + panel1_start - panel1_data], 0
566
        and     [ebp + panel1_start - panel1_data], 0
567
        and     [ebp + panel1_index - panel1_data], 0
567
        and     [ebp + panel1_index - panel1_data], 0
568
        jmp     .done_redraw
568
        jmp     .done_redraw
569
.end:
569
.end:
570
        mov     eax, [ebp + panel1_numfiles - panel1_data]
570
        mov     eax, [ebp + panel1_numfiles - panel1_data]
571
        dec     eax
571
        dec     eax
572
        mov     [ebp + panel1_index - panel1_data], eax
572
        mov     [ebp + panel1_index - panel1_data], eax
573
        inc     eax
573
        inc     eax
574
        sub     eax, [ebp + panel1_colst - panel1_data]
574
        sub     eax, [ebp + panel1_colst - panel1_data]
575
        jae     @f
575
        jae     @f
576
        xor     eax, eax
576
        xor     eax, eax
577
@@:
577
@@:
578
        mov     [ebp + panel1_start - panel1_data], eax
578
        mov     [ebp + panel1_start - panel1_data], eax
579
        jmp     .done_redraw
579
        jmp     .done_redraw
580
.enter:
580
.enter:
581
        call    get_curfile_folder_entry
581
        call    get_curfile_folder_entry
582
        test    byte [ecx], 10h
582
        test    byte [ecx], 10h
583
        jnz     .enter_folder
583
        jnz     .enter_folder
584
; find extension
584
; find extension
585
        lea     esi, [ecx+40]
585
        lea     esi, [ecx+40]
586
        push    esi
586
        push    esi
587
@@:
587
@@:
588
        lodsb
588
        lodsb
589
        test    al, al
589
        test    al, al
590
        jnz     @b
590
        jnz     @b
591
@@:
591
@@:
592
        dec     esi
592
        dec     esi
593
        cmp     byte [esi], '.'
593
        cmp     byte [esi], '.'
594
        jz      .found_ext
594
        jz      .found_ext
595
        cmp     esi, [esp]
595
        cmp     esi, [esp]
596
        ja      @b
596
        ja      @b
597
        jmp     .run_app
597
        jmp     .run_app
598
.found_ext:
598
.found_ext:
599
        inc     esi
599
        inc     esi
600
        mov     edi, associations
600
        mov     edi, associations
601
@@:
601
@@:
602
        push    esi edi
602
        push    esi edi
603
        mov     edi, [edi]
603
        mov     edi, [edi]
604
        call    strcmpi
604
        call    strcmpi
605
        pop     edi esi
605
        pop     edi esi
606
        jz      .run_association
606
        jz      .run_association
607
        add     edi, 8
607
        add     edi, 8
608
        cmp     edi, associations_end
608
        cmp     edi, associations_end
609
        jb      @b
609
        jb      @b
610
        jmp     .run_app
610
        jmp     .run_app
611
.run_association:
611
.run_association:
612
        mov     [execparams], execdata
612
        mov     [execparams], execdata
613
        mov     eax, [edi+4]
613
        mov     eax, [edi+4]
614
        mov     [execptr], eax
614
        mov     [execptr], eax
615
        jmp     .dorun
615
        jmp     .dorun
616
.run_app:
616
.run_app:
617
        mov     [execptr], execdata
617
        mov     [execptr], execdata
618
        and     [execparams], 0
618
        and     [execparams], 0
619
.dorun:
619
.dorun:
620
        pop     esi
620
        pop     esi
621
        lea     esi, [ebp + panel1_dir - panel1_data]
621
        lea     esi, [ebp + panel1_dir - panel1_data]
622
        mov     edi, execdata
622
        mov     edi, execdata
623
; TODO: add overflow check
623
; TODO: add overflow check
624
@@:
624
@@:
625
        lodsb
625
        lodsb
626
        test    al, al
626
        test    al, al
627
        jz      @f
627
        jz      @f
628
        stosb
628
        stosb
629
        jmp     @b
629
        jmp     @b
630
@@:
630
@@:
631
        lea     esi, [ecx+40]
631
        lea     esi, [ecx+40]
632
        mov     al, '/'
632
        mov     al, '/'
633
        stosb
633
        stosb
634
@@:
634
@@:
635
        lodsb
635
        lodsb
636
        stosb
636
        stosb
637
        test    al, al
637
        test    al, al
638
        jnz     @b
638
        jnz     @b
639
        push    70
639
        push    70
640
        pop     eax
640
        pop     eax
641
        mov     ebx, execinfo
641
        mov     ebx, execinfo
642
        int     40h
642
        int     40h
643
        ret
643
        ret
644
.enter_folder:
644
.enter_folder:
645
        lea     esi, [ecx+40]
645
        lea     esi, [ecx+40]
646
        cmp     word [esi], '..'
646
        cmp     word [esi], '..'
647
        jnz     @f
647
        jnz     @f
648
        cmp     byte [esi+2], 0
648
        cmp     byte [esi+2], 0
649
        jz      .dotdot
649
        jz      .dotdot
650
@@:
650
@@:
651
        lea     edi, [ebp + panel1_dir - panel1_data]
651
        lea     edi, [ebp + panel1_dir - panel1_data]
652
        mov     al, 0
652
        mov     al, 0
653
        or      ecx, -1
653
        or      ecx, -1
654
        repnz   scasb
654
        repnz   scasb
655
        dec     edi
655
        dec     edi
656
        mov     al, '/'
656
        mov     al, '/'
657
        cmp     [edi-1], al
657
        cmp     [edi-1], al
658
        jz      @f
658
        jz      @f
659
        stosb
659
        stosb
660
@@:
660
@@:
661
; TODO: add buffer overflow check
661
; TODO: add buffer overflow check
662
@@:
662
@@:
663
        lodsb
663
        lodsb
664
        stosb
664
        stosb
665
        test    al, al
665
        test    al, al
666
        jnz     @b
666
        jnz     @b
667
.reread:
667
.reread:
668
        call    read_folder
668
        call    read_folder
669
.done_cmdbar:
669
.done_cmdbar:
670
        call    draw_cmdbar
670
        call    draw_cmdbar
671
        jmp     .done_redraw
671
        jmp     .done_redraw
672
.dotdot:
672
.dotdot:
673
        lea     edi, [ebp + panel1_dir - panel1_data]
673
        lea     edi, [ebp + panel1_dir - panel1_data]
674
        mov     al, 0
674
        mov     al, 0
675
        or      ecx, -1
675
        or      ecx, -1
676
        repnz   scasb
676
        repnz   scasb
677
        dec     edi
677
        dec     edi
678
        mov     al, '/'
678
        mov     al, '/'
679
        std
679
        std
680
        repnz   scasb
680
        repnz   scasb
681
        cld
681
        cld
682
        inc     edi
682
        inc     edi
683
        mov     byte [edi], 0
683
        mov     byte [edi], 0
684
        inc     edi
684
        inc     edi
685
        push    edi
685
        push    edi
686
        call    read_folder
686
        call    read_folder
687
        pop     edi
687
        pop     edi
688
        mov     edx, [ebp + panel1_files - panel1_data]
688
        mov     edx, [ebp + panel1_files - panel1_data]
689
        mov     ecx, [ebp + panel1_numfiles - panel1_data]
689
        mov     ecx, [ebp + panel1_numfiles - panel1_data]
690
.scanloop:
690
.scanloop:
691
        mov     esi, [edx]
691
        mov     esi, [edx]
692
        mov     eax, [ebp + panel1_nfa - panel1_data]
692
        mov     eax, [ebp + panel1_nfa - panel1_data]
693
        lea     esi, [esi+eax*4+32+40]
693
        lea     esi, [esi+eax*4+32+40]
694
        add     esi, [ebp + panel1_files - panel1_data]
694
        add     esi, [ebp + panel1_files - panel1_data]
695
        push    esi edi
695
        push    esi edi
696
@@:
696
@@:
697
        lodsb
697
        lodsb
698
        call    match_symbol
698
        call    match_symbol
699
        jnz     @f
699
        jnz     @f
700
        inc     edi
700
        inc     edi
701
        test    al, al
701
        test    al, al
702
        jnz     @b
702
        jnz     @b
703
@@:
703
@@:
704
        pop     edi esi
704
        pop     edi esi
705
        jz      .scanfound
705
        jz      .scanfound
706
        add     edx, 4
706
        add     edx, 4
707
        loop    .scanloop
707
        loop    .scanloop
708
        jmp     .scandone
708
        jmp     .scandone
709
.scanfound:
709
.scanfound:
710
        sub     edx, [ebp + panel1_files - panel1_data]
710
        sub     edx, [ebp + panel1_files - panel1_data]
711
        shr     edx, 2
711
        shr     edx, 2
712
        mov     [ebp + panel1_index - panel1_data], edx
712
        mov     [ebp + panel1_index - panel1_data], edx
713
        sub     edx, [ebp + panel1_colst - panel1_data]
713
        sub     edx, [ebp + panel1_colst - panel1_data]
714
        jb      .scandone
714
        jb      .scandone
715
        inc     edx
715
        inc     edx
716
        mov     [ebp + panel1_start - panel1_data], edx
716
        mov     [ebp + panel1_start - panel1_data], edx
717
.scandone:
717
.scandone:
718
        jmp     .done_cmdbar
718
        jmp     .done_cmdbar
719
.ctrl_f39:
719
.ctrl_f39:
720
        sub     al, 0x3D
720
        sub     al, 0x3D
721
        add     al, al
721
        add     al, al
722
        mov     ah, [ebp + panel1_sortmode - panel1_data]
722
        mov     ah, [ebp + panel1_sortmode - panel1_data]
723
        and     ah, 0xFE
723
        and     ah, 0xFE
724
        cmp     al, ah
724
        cmp     al, ah
725
        jnz     @f
725
        jnz     @f
726
        and     [ebp + panel1_sortmode - panel1_data], 1
726
        and     [ebp + panel1_sortmode - panel1_data], 1
727
        or      al, [ebp + panel1_sortmode - panel1_data]
727
        or      al, [ebp + panel1_sortmode - panel1_data]
728
        xor     al, 1
728
        xor     al, 1
729
@@:
729
@@:
730
        mov     [ebp + panel1_sortmode - panel1_data], al
730
        mov     [ebp + panel1_sortmode - panel1_data], al
731
        mov     eax, [ebp + panel1_index - panel1_data]
731
        mov     eax, [ebp + panel1_index - panel1_data]
732
        mov     ecx, [ebp + panel1_files - panel1_data]
732
        mov     ecx, [ebp + panel1_files - panel1_data]
733
        push    dword [ecx+eax*4]
733
        push    dword [ecx+eax*4]
734
        push    ecx
734
        push    ecx
735
        call    sort_files
735
        call    sort_files
736
        pop     edi
736
        pop     edi
737
        pop     eax
737
        pop     eax
738
        or      ecx, -1
738
        or      ecx, -1
739
        repnz   scasd
739
        repnz   scasd
740
        not     ecx
740
        not     ecx
741
        dec     ecx
741
        dec     ecx
742
        mov     [ebp + panel1_index - panel1_data], ecx
742
        mov     [ebp + panel1_index - panel1_data], ecx
743
        sub     ecx, [ebp + panel1_start - panel1_data]
743
        sub     ecx, [ebp + panel1_start - panel1_data]
744
        jb      .less_start
744
        jb      .less_start
745
        sub     ecx, [ebp + panel1_colst - panel1_data]
745
        sub     ecx, [ebp + panel1_colst - panel1_data]
746
        jae     .gr_end
746
        jae     .gr_end
747
@@:     jmp     .done_redraw
747
@@:     jmp     .done_redraw
748
.less_start:
748
.less_start:
749
        add     [ebp + panel1_start - panel1_data], ecx
749
        add     [ebp + panel1_start - panel1_data], ecx
750
        jmp     @b
750
        jmp     @b
751
.gr_end:
751
.gr_end:
752
        inc     ecx
752
        inc     ecx
753
        add     [ebp + panel1_start - panel1_data], ecx
753
        add     [ebp + panel1_start - panel1_data], ecx
754
        jmp     @b
754
        jmp     @b
755
.alt_f12:
755
.alt_f12:
756
        mov     ebp, panel1_data
756
        mov     ebp, panel1_data
757
        cmp     al, 0x3B
757
        cmp     al, 0x3B
758
        jz      @f
758
        jz      @f
759
        mov     ebp, panel2_data
759
        mov     ebp, panel2_data
760
@@:
760
@@:
761
; get drives list
761
; get drives list
762
        mov     ebx, dirinfo
762
        mov     ebx, dirinfo
763
        mov     [ebx+dirinfo.size-dirinfo], 1
763
        mov     [ebx+dirinfo.size-dirinfo], 1
764
        mov     [ebx+dirinfo.dirdata-dirinfo], driveinfo
764
        mov     [ebx+dirinfo.dirdata-dirinfo], driveinfo
765
        mov     [ebx+dirinfo.name-dirinfo], tmpname
765
        mov     [ebx+dirinfo.name-dirinfo], tmpname
766
        mov     byte [tmpname], '/'
766
        mov     byte [tmpname], '/'
767
        xor     ecx, ecx
767
        xor     ecx, ecx
768
.drive_loop_e:
768
.drive_loop_e:
769
        mov     byte [tmpname+1], 0
769
        mov     byte [tmpname+1], 0
770
        push    70
770
        push    70
771
        pop     eax
771
        pop     eax
772
        int     40h
772
        int     40h
773
        mov     ebx, dirinfo
773
        mov     ebx, dirinfo
774
        test    eax, eax
774
        test    eax, eax
775
        jnz     .drive_loop_e_done
775
        jnz     .drive_loop_e_done
776
        mov     esi, driveinfo+32+40
776
        mov     esi, driveinfo+32+40
777
        mov     edi, tmpname+1
777
        mov     edi, tmpname+1
778
@@:
778
@@:
779
        lodsb
779
        lodsb
780
        stosb
780
        stosb
781
        test    al, al
781
        test    al, al
782
        jnz     @b
782
        jnz     @b
783
        push    [ebx+dirinfo.first-dirinfo]
783
        push    [ebx+dirinfo.first-dirinfo]
784
        and     [ebx+dirinfo.first-dirinfo], 0
784
        and     [ebx+dirinfo.first-dirinfo], 0
785
.drive_loop_i:
785
.drive_loop_i:
786
        push    70
786
        push    70
787
        pop     eax
787
        pop     eax
788
        int     40h
788
        int     40h
789
        mov     ebx, dirinfo
789
        mov     ebx, dirinfo
790
        test    eax, eax
790
        test    eax, eax
791
        jnz     .drive_loop_i_done
791
        jnz     .drive_loop_i_done
792
        mov     eax, 32+8
792
        mov     eax, 32+8
793
        call    mf_alloc
793
        call    mf_alloc
794
        test    eax, eax
794
        test    eax, eax
795
        jz      .drive_loop_i_done
795
        jz      .drive_loop_i_done
796
        jecxz   @f
796
        jecxz   @f
797
        mov     [ecx], eax
797
        mov     [ecx], eax
798
@@:
798
@@:
799
        and     dword [eax], 0
799
        and     dword [eax], 0
800
        mov     [eax+4], ecx
800
        mov     [eax+4], ecx
801
        mov     ecx, eax
801
        mov     ecx, eax
802
        lea     edi, [eax+8]
802
        lea     edi, [eax+8]
803
        mov     esi, tmpname
803
        mov     esi, tmpname
804
@@:
804
@@:
805
        lodsb
805
        lodsb
806
        test    al, al
806
        test    al, al
807
        jz      @f
807
        jz      @f
808
        stosb
808
        stosb
809
        jmp     @b
809
        jmp     @b
810
@@:
810
@@:
811
        mov     esi, driveinfo+32+40
811
        mov     esi, driveinfo+32+40
812
        mov     al, '/'
812
        mov     al, '/'
813
        stosb
813
        stosb
814
@@:
814
@@:
815
        lodsb
815
        lodsb
816
        stosb
816
        stosb
817
        test    al, al
817
        test    al, al
818
        jnz     @b
818
        jnz     @b
819
        inc     [ebx+dirinfo.first-dirinfo]
819
        inc     [ebx+dirinfo.first-dirinfo]
820
        jmp     .drive_loop_i
820
        jmp     .drive_loop_i
821
.drive_loop_i_done:
821
.drive_loop_i_done:
822
        pop     [ebx+dirinfo.first-dirinfo]
822
        pop     [ebx+dirinfo.first-dirinfo]
823
        inc     [ebx+dirinfo.first-dirinfo]
823
        inc     [ebx+dirinfo.first-dirinfo]
824
        jmp     .drive_loop_e
824
        jmp     .drive_loop_e
825
.drive_loop_e_done:
825
.drive_loop_e_done:
826
        and     [ebx+dirinfo.first-dirinfo], 0
826
        and     [ebx+dirinfo.first-dirinfo], 0
827
        lea     edi, [ebp + panel1_dir - panel1_data]
827
        lea     edi, [ebp + panel1_dir - panel1_data]
828
.find_cur_drive_loop:
828
.find_cur_drive_loop:
829
        push    edi
829
        push    edi
830
        lea     esi, [ecx+8]
830
        lea     esi, [ecx+8]
831
@@:
831
@@:
832
        lodsb
832
        lodsb
833
        test    al, al
833
        test    al, al
834
        jz      .cur_drive_found
834
        jz      .cur_drive_found
835
        call    match_symbol
835
        call    match_symbol
836
        jnz     @f
836
        jnz     @f
837
        inc     edi
837
        inc     edi
838
        jmp     @b
838
        jmp     @b
839
@@:
839
@@:
840
        cmp     dword [ecx+4], 0
840
        cmp     dword [ecx+4], 0
841
        jz      @f
841
        jz      @f
842
        pop     edi
842
        pop     edi
843
        mov     ecx, [ecx+4]
843
        mov     ecx, [ecx+4]
844
        jmp     .find_cur_drive_loop
844
        jmp     .find_cur_drive_loop
845
@@:
845
@@:
846
.cur_drive_found:
846
.cur_drive_found:
847
        pop     edi
847
        pop     edi
848
        push    1
848
        push    1
849
        push    aDrive
849
        push    aDrive
850
        push    ecx
850
        push    ecx
851
        mov     eax, [ebp + panel1_height - panel1_data]
851
        mov     eax, [ebp + panel1_height - panel1_data]
852
        sub     eax, 2
852
        sub     eax, 2
853
        jae     @f
853
        jae     @f
854
        add     eax, 2
854
        add     eax, 2
855
@@:
855
@@:
856
        push    eax
856
        push    eax
857
        push    [ebp + panel1_width - panel1_data]
857
        push    [ebp + panel1_width - panel1_data]
858
        push    [ebp + panel1_top - panel1_data]
858
        push    [ebp + panel1_top - panel1_data]
859
        push    [ebp + panel1_left - panel1_data]
859
        push    [ebp + panel1_left - panel1_data]
860
        call    menu_centered_in
860
        call    menu_centered_in
861
        cmp     eax, -1
861
        cmp     eax, -1
862
        jz      .ret2
862
        jz      .ret2
863
        lea     esi, [eax+8]
863
        lea     esi, [eax+8]
864
        lea     edi, [ebp + panel1_dir - panel1_data]
864
        lea     edi, [ebp + panel1_dir - panel1_data]
865
@@:
865
@@:
866
        lodsb
866
        lodsb
867
        stosb
867
        stosb
868
        test    al, al
868
        test    al, al
869
        jnz     @b
869
        jnz     @b
870
@@:
870
@@:
871
        cmp     dword [ecx+4], 0
871
        cmp     dword [ecx+4], 0
872
        jz      @f
872
        jz      @f
873
        mov     ecx, [ecx+4]
873
        mov     ecx, [ecx+4]
874
        jmp     @b
874
        jmp     @b
875
@@:
875
@@:
876
        mov     eax, ecx
876
        mov     eax, ecx
877
        mov     ecx, [ecx]
877
        mov     ecx, [ecx]
878
        call    mf_free
878
        call    mf_free
879
        test    ecx, ecx
879
        test    ecx, ecx
880
        jnz     @b
880
        jnz     @b
881
        call    read_folder
881
        call    read_folder
882
        jmp     .done_redraw
882
        jmp     .done_redraw
883
.f3:
883
.f3:
884
        call    view_file
884
        call    view_file
885
.ret2:
885
.ret2:
886
        ret
886
        ret
887
.f8:
887
.f8:
888
        call    get_curfile_folder_entry
888
        call    get_curfile_folder_entry
889
        cmp     [bConfirmDelete], 0
889
        cmp     [bConfirmDelete], 0
890
        jz      .f8_allowed
890
        jz      .f8_allowed
891
        mov     ebx, f8_confirm_dlgdata
891
        mov     ebx, f8_confirm_dlgdata
892
        mov     esi, aConfirmDeleteText
892
        mov     esi, aConfirmDeleteText
893
        mov     edi, aConfirmDeleteTextBuf
893
        mov     edi, aConfirmDeleteTextBuf
894
@@:
894
@@:
895
        lodsb
895
        lodsb
896
        stosb
896
        stosb
897
        test    al, al
897
        test    al, al
898
        jnz     @b
898
        jnz     @b
899
        dec     edi
899
        dec     edi
900
        mov     esi, aDeleteFolder
900
        mov     esi, aDeleteFolder
901
        test    byte [ecx], 10h
901
        test    byte [ecx], 10h
902
        jnz     @f
902
        jnz     @f
903
        mov     esi, aDeleteFile
903
        mov     esi, aDeleteFile
904
@@:
904
@@:
905
        lodsb
905
        lodsb
906
        stosb
906
        stosb
907
        test    al, al
907
        test    al, al
908
        jnz     @b
908
        jnz     @b
909
        lea     esi, [ecx+40]
909
        lea     esi, [ecx+40]
910
        mov     [ebx - f8_confirm_dlgdata + f8_confirm_dlgdata.name], esi
910
        mov     [ebx - f8_confirm_dlgdata + f8_confirm_dlgdata.name], esi
911
        or      eax, -1
911
        or      eax, -1
912
@@:
912
@@:
913
        inc     eax
913
        inc     eax
914
        cmp     byte [eax+esi], 0
914
        cmp     byte [eax+esi], 0
915
        jnz     @b
915
        jnz     @b
916
        sub     edi, aConfirmDeleteTextBuf+1
916
        sub     edi, aConfirmDeleteTextBuf+1
917
        cmp     eax, edi
917
        cmp     eax, edi
918
        jae     @f
918
        jae     @f
919
        mov     eax, edi
919
        mov     eax, edi
920
@@:
920
@@:
921
        inc     eax
921
        inc     eax
922
        inc     eax
922
        inc     eax
923
        mov     edx, [cur_width]
923
        mov     edx, [cur_width]
924
        sub     edx, 8
924
        sub     edx, 8
925
        cmp     eax, edx
925
        cmp     eax, edx
926
        jbe     @f
926
        jbe     @f
927
        mov     eax, edx
927
        mov     eax, edx
928
@@:
928
@@:
929
        mov     [ebx + dlgtemplate.width], eax
929
        mov     [ebx + dlgtemplate.width], eax
930
        dec     eax
930
        dec     eax
931
        dec     eax
931
        dec     eax
932
        mov     [ebx - f8_confirm_dlgdata + f8_confirm_dlgdata.width2], eax
932
        mov     [ebx - f8_confirm_dlgdata + f8_confirm_dlgdata.width2], eax
933
        mov     [ebx - f8_confirm_dlgdata + f8_confirm_dlgdata.width3], eax
933
        mov     [ebx - f8_confirm_dlgdata + f8_confirm_dlgdata.width3], eax
934
        shr     eax, 1
934
        shr     eax, 1
935
        mov     [ebx - f8_confirm_dlgdata + f8_confirm_dlgdata.del_x2], eax
935
        mov     [ebx - f8_confirm_dlgdata + f8_confirm_dlgdata.del_x2], eax
936
        sub     eax, aDeleteLength-1
936
        sub     eax, aDeleteLength-1
937
        mov     [ebx - f8_confirm_dlgdata + f8_confirm_dlgdata.del_x1], eax
937
        mov     [ebx - f8_confirm_dlgdata + f8_confirm_dlgdata.del_x1], eax
938
        add     eax, aDeleteLength
938
        add     eax, aDeleteLength
939
        mov     [ebx - f8_confirm_dlgdata + f8_confirm_dlgdata.cnl_x1], eax
939
        mov     [ebx - f8_confirm_dlgdata + f8_confirm_dlgdata.cnl_x1], eax
940
        add     eax, aCancelLength - 1
940
        add     eax, aCancelLength - 1
941
        mov     [ebx - f8_confirm_dlgdata + f8_confirm_dlgdata.cnl_x2], eax
941
        mov     [ebx - f8_confirm_dlgdata + f8_confirm_dlgdata.cnl_x2], eax
942
        mov     al, [dialog_border_color]
942
        mov     al, [dialog_border_color]
943
        mov     [ebx + dlgtemplate.border_color], al
943
        mov     [ebx + dlgtemplate.border_color], al
944
        mov     al, [dialog_header_color]
944
        mov     al, [dialog_header_color]
945
        mov     [ebx + dlgtemplate.header_color], al
945
        mov     [ebx + dlgtemplate.header_color], al
946
        mov     al, [dialog_main_color]
946
        mov     al, [dialog_main_color]
947
        mov     [ebx + dlgtemplate.main_color], al
947
        mov     [ebx + dlgtemplate.main_color], al
948
        or      byte [ebx - f8_confirm_dlgdata + f8_confirm_dlgdata.flags1], 4
948
        or      byte [ebx - f8_confirm_dlgdata + f8_confirm_dlgdata.flags1], 4
949
        and     byte [ebx - f8_confirm_dlgdata + f8_confirm_dlgdata.flags2], not 4
949
        and     byte [ebx - f8_confirm_dlgdata + f8_confirm_dlgdata.flags2], not 4
950
        push    ebx
950
        push    ebx
951
        call    DialogBox
951
        call    DialogBox
952
        cmp     eax, f8_confirm_dlgdata.del_btn
952
        cmp     eax, f8_confirm_dlgdata.del_btn
953
        jnz     .ret2
953
        jnz     .ret2
954
.f8_allowed:
954
.f8_allowed:
955
        lea     esi, [ebp + panel1_dir - panel1_data]
955
        lea     esi, [ebp + panel1_dir - panel1_data]
956
        mov     edi, execdata
956
        mov     edi, execdata
957
@@:
957
@@:
958
        lodsb
958
        lodsb
959
        test    al, al
959
        test    al, al
960
        jz      @f
960
        jz      @f
961
        stosb
961
        stosb
962
        jmp     @b
962
        jmp     @b
963
@@:
963
@@:
964
        lea     esi, [ecx+40]
964
        lea     esi, [ecx+40]
965
        mov     al, '/'
965
        mov     al, '/'
966
        stosb
966
        stosb
967
@@:
967
@@:
968
        lodsb
968
        lodsb
969
        stosb
969
        stosb
970
        test    al, al
970
        test    al, al
971
        jnz     @b
971
        jnz     @b
972
        push    70
972
        push    70
973
        pop     eax
973
        pop     eax
974
        mov     ebx, delinfo
974
        mov     ebx, delinfo
975
        int     0x40
975
        int     0x40
976
.ctrl_r:
976
.ctrl_r:
977
; Rescan panel
977
; Rescan panel
978
;       call    read_folder
978
;       call    read_folder
979
;       jmp     .done_redraw
979
;       jmp     .done_redraw
980
        mov     eax, [ebp + panel1_index - panel1_data]
980
        mov     eax, [ebp + panel1_index - panel1_data]
981
        push    eax
981
        push    eax
982
        call    get_curfile_name
982
        call    get_curfile_name
983
        mov     esi, eax
983
        mov     esi, eax
984
        mov     edi, saved_file_name
984
        mov     edi, saved_file_name
985
@@:
985
@@:
986
        lodsb
986
        lodsb
987
        stosb
987
        stosb
988
        test    al, al
988
        test    al, al
989
        jnz     @b
989
        jnz     @b
990
        push    [ebp + panel1_start - panel1_data]
990
        push    [ebp + panel1_start - panel1_data]
991
        call    read_folder
991
        call    read_folder
992
        pop     [ebp + panel1_start - panel1_data]
992
        pop     [ebp + panel1_start - panel1_data]
993
        pop     [ebp + panel1_index - panel1_data]
993
        pop     [ebp + panel1_index - panel1_data]
994
        or      eax, -1
994
        or      eax, -1
995
@@:
995
@@:
996
        inc     eax
996
        inc     eax
997
        cmp     eax, [ebp + panel1_numfiles - panel1_data]
997
        cmp     eax, [ebp + panel1_numfiles - panel1_data]
998
        jae     .ctrl_r.notfound
998
        jae     .ctrl_r.notfound
999
        mov     esi, [ebp + panel1_nfa - panel1_data]
999
        mov     esi, [ebp + panel1_nfa - panel1_data]
1000
        mov     ecx, [ebp + panel1_files - panel1_data]
1000
        mov     ecx, [ebp + panel1_files - panel1_data]
1001
        lea     esi, [ecx+esi*4+32+40]
1001
        lea     esi, [ecx+esi*4+32+40]
1002
        add     esi, [ecx+eax*4]
1002
        add     esi, [ecx+eax*4]
1003
        mov     edi, saved_file_name
1003
        mov     edi, saved_file_name
1004
        call    strcmpi
1004
        call    strcmpi
1005
        jnz     @b
1005
        jnz     @b
1006
.ctrl_r.found:
1006
.ctrl_r.found:
1007
        mov     [ebp + panel1_index - panel1_data], eax
1007
        mov     [ebp + panel1_index - panel1_data], eax
1008
.ctrl_r.notfound:
1008
.ctrl_r.notfound:
1009
        mov     eax, [ebp + panel1_numfiles - panel1_data]
1009
        mov     eax, [ebp + panel1_numfiles - panel1_data]
1010
        dec     eax
1010
        dec     eax
1011
        cmp     [ebp + panel1_index - panel1_data], eax
1011
        cmp     [ebp + panel1_index - panel1_data], eax
1012
        jbe     @f
1012
        jbe     @f
1013
        mov     [ebp + panel1_index - panel1_data], eax
1013
        mov     [ebp + panel1_index - panel1_data], eax
1014
@@:
1014
@@:
1015
        mov     eax, [ebp + panel1_index - panel1_data]
1015
        mov     eax, [ebp + panel1_index - panel1_data]
1016
        cmp     [ebp + panel1_start - panel1_data], eax
1016
        cmp     [ebp + panel1_start - panel1_data], eax
1017
        jbe     @f
1017
        jbe     @f
1018
        mov     [ebp + panel1_start - panel1_data], eax
1018
        mov     [ebp + panel1_start - panel1_data], eax
1019
@@:
1019
@@:
1020
        inc     eax
1020
        inc     eax
1021
        sub     eax, [ebp + panel1_colst - panel1_data]
1021
        sub     eax, [ebp + panel1_colst - panel1_data]
1022
        jae     @f
1022
        jae     @f
1023
        xor     eax, eax
1023
        xor     eax, eax
1024
@@:
1024
@@:
1025
        cmp     [ebp + panel1_start - panel1_data], eax
1025
        cmp     [ebp + panel1_start - panel1_data], eax
1026
        jae     @f
1026
        jae     @f
1027
        mov     [ebp + panel1_start - panel1_data], eax
1027
        mov     [ebp + panel1_start - panel1_data], eax
1028
@@:
1028
@@:
1029
        mov     eax, [ebp + panel1_numfiles - panel1_data]
1029
        mov     eax, [ebp + panel1_numfiles - panel1_data]
1030
        sub     eax, [ebp + panel1_colst - panel1_data]
1030
        sub     eax, [ebp + panel1_colst - panel1_data]
1031
        jbe     @f
1031
        jbe     @f
1032
        cmp     [ebp + panel1_start - panel1_data], eax
1032
        cmp     [ebp + panel1_start - panel1_data], eax
1033
        jbe     @f
1033
        jbe     @f
1034
        mov     [ebp + panel1_start - panel1_data], eax
1034
        mov     [ebp + panel1_start - panel1_data], eax
1035
@@:
1035
@@:
1036
        jmp     .done_redraw
1036
        jmp     .done_redraw
1037
 
1037
 
1038
panels_OnRedraw:
1038
panels_OnRedraw:
1039
        call    draw_cmdbar
1039
        call    draw_cmdbar
1040
        mov     ebp, panel1_data
1040
        mov     ebp, panel1_data
1041
        call    draw_panel
1041
        call    draw_panel
1042
        mov     ebp, panel2_data
1042
        mov     ebp, panel2_data
1043
        call    draw_panel
1043
        call    draw_panel
1044
        ret
1044
        ret
1045
 
1045
 
1046
init_console:
1046
init_console:
1047
        mov     ax, 0720h
1047
        mov     ax, 0720h
1048
        mov     ecx, [cur_width]
1048
        mov     ecx, [cur_width]
1049
        imul    ecx, [cur_height]
1049
        imul    ecx, [cur_height]
1050
        mov     edi, console_data
1050
        mov     edi, console_data
1051
        rep     stosw
1051
        rep     stosw
1052
        and     [panel1_left], 0
1052
        and     [panel1_left], 0
1053
        and     [panel1_top], 0
1053
        and     [panel1_top], 0
1054
        and     [panel2_top], 0
1054
        and     [panel2_top], 0
1055
        mov     eax, [cur_width]
1055
        mov     eax, [cur_width]
1056
        inc     eax
1056
        inc     eax
1057
        shr     eax, 1
1057
        shr     eax, 1
1058
        mov     [panel1_width], eax
1058
        mov     [panel1_width], eax
1059
        mov     [panel2_left], eax
1059
        mov     [panel2_left], eax
1060
        sub     eax, [cur_width]
1060
        sub     eax, [cur_width]
1061
        neg     eax
1061
        neg     eax
1062
        mov     [panel2_width], eax
1062
        mov     [panel2_width], eax
1063
        mov     eax, [cur_height]
1063
        mov     eax, [cur_height]
1064
        dec     eax
1064
        dec     eax
1065
        dec     eax
1065
        dec     eax
1066
        mov     [panel1_height], eax
1066
        mov     [panel1_height], eax
1067
        mov     [panel2_height], eax
1067
        mov     [panel2_height], eax
1068
        ret
1068
        ret
1069
 
1069
 
1070
get_curfile_folder_entry:
1070
get_curfile_folder_entry:
1071
        push    eax
1071
        push    eax
1072
        mov     ecx, [ebp + panel1_index - panel1_data]
1072
        mov     ecx, [ebp + panel1_index - panel1_data]
1073
        mov     eax, [ebp + panel1_files - panel1_data]
1073
        mov     eax, [ebp + panel1_files - panel1_data]
1074
        mov     ecx, [eax+ecx*4]
1074
        mov     ecx, [eax+ecx*4]
1075
        mov     eax, [ebp + panel1_nfa - panel1_data]
1075
        mov     eax, [ebp + panel1_nfa - panel1_data]
1076
        lea     ecx, [ecx+eax*4+32]
1076
        lea     ecx, [ecx+eax*4+32]
1077
        add     ecx, [ebp + panel1_files - panel1_data]
1077
        add     ecx, [ebp + panel1_files - panel1_data]
1078
        pop     eax
1078
        pop     eax
1079
        ret
1079
        ret
1080
get_curfile_name:
1080
get_curfile_name:
1081
        call    get_curfile_folder_entry
1081
        call    get_curfile_folder_entry
1082
        add     ecx, 40
1082
        add     ecx, 40
1083
        ret
1083
        ret
1084
 
1084
 
1085
panels_getname:
1085
panels_getname:
1086
if lang eq ru
1086
if lang eq ru
1087
        mov     eax, ' ­¥'
1087
        mov     eax, ' ­¥'
1088
        stosd
1088
        stosd
1089
        mov     eax, 'Ǭ  '
1089
        mov     eax, 'Ǭ  '
1090
        stosd
1090
        stosd
1091
        mov     eax, '    '
1091
        mov     eax, '    '
1092
        stosd
1092
        stosd
1093
        stosb
1093
        stosb
1094
else
1094
else
1095
        mov     eax, 'Pane'
1095
        mov     eax, 'Pane'
1096
        stosd
1096
        stosd
1097
        mov     eax, 'ls  '
1097
        mov     eax, 'ls  '
1098
        stosd
1098
        stosd
1099
        mov     eax, '    '
1099
        mov     eax, '    '
1100
        stosd
1100
        stosd
1101
        stosb
1101
        stosb
1102
end if
1102
end if
1103
        sub     ecx, 13
1103
        sub     ecx, 13
1104
        mov     ebp, [active_panel]
1104
        mov     ebp, [active_panel]
1105
        lea     esi, [ebp + panel1_dir - panel1_data]
1105
        lea     esi, [ebp + panel1_dir - panel1_data]
1106
        push    3
1106
        push    3
1107
        pop     edx
1107
        pop     edx
1108
@@:
1108
@@:
1109
        lodsb
1109
        lodsb
1110
        stosb
1110
        stosb
1111
        dec     ecx
1111
        dec     ecx
1112
        test    al, al
1112
        test    al, al
1113
        jz      @f
1113
        jz      @f
1114
        cmp     al, '/'
1114
        cmp     al, '/'
1115
        jnz     @b
1115
        jnz     @b
1116
        dec     edx
1116
        dec     edx
1117
        jnz     @b
1117
        jnz     @b
1118
@@:
1118
@@:
1119
        test    al, al
1119
        test    al, al
1120
        jnz     @f
1120
        jnz     @f
1121
        dec     esi
1121
        dec     esi
1122
        dec     edi
1122
        dec     edi
1123
@@:
1123
@@:
1124
        push    esi
1124
        push    esi
1125
@@:
1125
@@:
1126
        lodsb
1126
        lodsb
1127
        test    al, al
1127
        test    al, al
1128
        jnz     @b
1128
        jnz     @b
1129
        dec     esi
1129
        dec     esi
1130
        mov     ebx, esi
1130
        mov     ebx, esi
1131
        sub     ebx, [esp]
1131
        sub     ebx, [esp]
1132
        dec     esi
1132
        dec     esi
1133
        push    esi
1133
        push    esi
1134
        mov     edx, [ebp + panel1_files - panel1_data]
1134
        mov     edx, [ebp + panel1_files - panel1_data]
1135
        mov     esi, [ebp + panel1_index - panel1_data]
1135
        mov     esi, [ebp + panel1_index - panel1_data]
1136
        mov     esi, [edx+esi*4]
1136
        mov     esi, [edx+esi*4]
1137
        add     esi, edx
1137
        add     esi, edx
1138
        mov     edx, [ebp + panel1_nfa - panel1_data]
1138
        mov     edx, [ebp + panel1_nfa - panel1_data]
1139
        lea     esi, [esi+edx*4+32+40]
1139
        lea     esi, [esi+edx*4+32+40]
1140
        push    esi
1140
        push    esi
1141
@@:
1141
@@:
1142
        lodsb
1142
        lodsb
1143
        test    al, al
1143
        test    al, al
1144
        jnz     @b
1144
        jnz     @b
1145
        add     ebx, esi
1145
        add     ebx, esi
1146
        sub     ebx, [esp]
1146
        sub     ebx, [esp]
1147
        dec     esi
1147
        dec     esi
1148
        cmp     ebx, ecx
1148
        cmp     ebx, ecx
1149
        jbe     @f
1149
        jbe     @f
1150
        mov     al, '.'
1150
        mov     al, '.'
1151
        stosb
1151
        stosb
1152
        stosb
1152
        stosb
1153
        stosb
1153
        stosb
1154
        sub     ecx, 3
1154
        sub     ecx, 3
1155
        mov     ebx, ecx
1155
        mov     ebx, ecx
1156
@@:
1156
@@:
1157
        add     edi, ebx
1157
        add     edi, ebx
1158
        inc     ecx
1158
        inc     ecx
1159
        std
1159
        std
1160
@@:
1160
@@:
1161
        movsb
1161
        movsb
1162
        dec     ecx
1162
        dec     ecx
1163
        jz      .nodir
1163
        jz      .nodir
1164
        cmp     esi, [esp]
1164
        cmp     esi, [esp]
1165
        jae     @b
1165
        jae     @b
1166
        mov     al, '/'
1166
        mov     al, '/'
1167
        stosb
1167
        stosb
1168
        dec     ecx
1168
        dec     ecx
1169
        jz      .nodir
1169
        jz      .nodir
1170
        mov     esi, [esp+4]
1170
        mov     esi, [esp+4]
1171
@@:
1171
@@:
1172
        cmp     esi, [esp+8]
1172
        cmp     esi, [esp+8]
1173
        jb      .nodir
1173
        jb      .nodir
1174
        movsb
1174
        movsb
1175
        loop    @b
1175
        loop    @b
1176
.nodir:
1176
.nodir:
1177
        cld
1177
        cld
1178
        pop     eax
1178
        pop     eax
1179
        pop     eax
1179
        pop     eax
1180
        pop     eax
1180
        pop     eax
1181
        ret
1181
        ret
1182
 
1182
 
1183
draw_window:
1183
draw_window:
1184
        push    12
1184
        push    12
1185
        pop     eax
1185
        pop     eax
1186
        push    1
1186
        push    1
1187
        pop     ebx
1187
        pop     ebx
1188
        int     40h
1188
        int     40h
1189
        mov     al, 48
1189
        mov     al, 48
1190
        mov     bl, 4
1190
        mov     bl, 4
1191
        int     40h
1191
        int     40h
1192
        mov     [skinh], eax
1192
        mov     [skinh], eax
1193
        mov     ebx, [cur_width]
1193
        mov     ebx, [cur_width]
1194
        imul    ebx, font_width
1194
        imul    ebx, font_width
1195
        add     ebx, 100*65536 + 5*2
1195
        add     ebx, 100*65536 + 5*2
1196
        mov     ecx, [cur_height]
1196
        mov     ecx, [cur_height]
1197
        imul    ecx, font_height
1197
        imul    ecx, font_height
1198
        lea     ecx, [eax+ecx+5+100*65536]
1198
        lea     ecx, [eax+ecx+5+100*65536]
1199
        xor     eax, eax
1199
        xor     eax, eax
1200
        mov     edx, 0x13000000
1200
        mov     edx, 0x13000000
1201
        mov     edi, header
1201
        mov     edi, header
1202
        int     40h
1202
        int     40h
1203
        mov     al, 48
1203
        mov     al, 48
1204
        push    3
1204
        push    3
1205
        pop     ebx
1205
        pop     ebx
1206
        mov     ecx, std_colors
1206
        mov     ecx, std_colors
1207
        push    40
1207
        push    40
1208
        pop     edx
1208
        pop     edx
1209
        int     40h
1209
        int     40h
1210
;        mov     bl, 7
1210
;        mov     bl, 7
1211
;        int     40h
1211
;        int     40h
1212
;        xor     ax, ax
1212
;        xor     ax, ax
1213
;        shr     ebx, 16
1213
;        shr     ebx, 16
1214
;        or      ebx, eax
1214
;        or      ebx, eax
1215
;        mov     ecx, [std_colors+16]
1215
;        mov     ecx, [std_colors+16]
1216
;        mov     edx, header
1216
;        mov     edx, header
1217
;        push    header.length
1217
;        push    header.length
1218
;        pop     esi
1218
;        pop     esi
1219
;        push    4
1219
;        push    4
1220
;        pop     eax
1220
;        pop     eax
1221
;        int     40h
1221
;        int     40h
1222
        xor     ecx, ecx
1222
        xor     ecx, ecx
1223
        call    draw_image
1223
        call    draw_image
1224
        push    12
1224
        push    12
1225
        pop     eax
1225
        pop     eax
1226
        push    2
1226
        push    2
1227
        pop     ebx
1227
        pop     ebx
1228
        int     40h
1228
        int     40h
1229
        ret
1229
        ret
1230
 
1230
 
1231
draw_image.nomem:
1231
draw_image.nomem:
1232
        mov     al, 13
1232
        mov     al, 13
1233
        xor     edx, edx
1233
        xor     edx, edx
1234
        mov     ebx, [cur_width]
1234
        mov     ebx, [cur_width]
1235
        imul    ebx, font_width
1235
        imul    ebx, font_width
1236
        add     ebx, 5*65536
1236
        add     ebx, 5*65536
1237
        mov     ecx, [skinh-2]
1237
        mov     ecx, [skinh-2]
1238
        mov     cx, word [cur_height]
1238
        mov     cx, word [cur_height]
1239
        imul    cx, font_height
1239
        imul    cx, font_height
1240
        int     40h
1240
        int     40h
1241
        mov     al, 4
1241
        mov     al, 4
1242
        mov     ebx, 32*65536+32
1242
        mov     ebx, 32*65536+32
1243
        mov     ecx, 0xFFFFFF
1243
        mov     ecx, 0xFFFFFF
1244
        mov     edx, nomem_draw
1244
        mov     edx, nomem_draw
1245
        push    nomem_draw.size
1245
        push    nomem_draw.size
1246
        pop     esi
1246
        pop     esi
1247
        int     40h
1247
        int     40h
1248
        ret
1248
        ret
1249
 
1249
 
1250
draw_image:
1250
draw_image:
1251
        cmp     [MemForImage], 0
1251
        cmp     [MemForImage], 0
1252
        jnz     .allocated
1252
        jnz     .allocated
1253
; allocate memory for image
1253
; allocate memory for image
1254
        mov     eax, [cur_width]
1254
        mov     eax, [cur_width]
1255
        imul    eax, [cur_height]
1255
        imul    eax, [cur_height]
1256
        imul    eax, font_width*font_height*3
1256
        imul    eax, font_width*font_height*3
1257
        call    mf_alloc
1257
        call    mf_alloc
1258
        test    eax, eax
1258
        test    eax, eax
1259
        jz      draw_image.nomem
1259
        jz      draw_image.nomem
1260
        mov     [MemForImage], eax
1260
        mov     [MemForImage], eax
1261
.allocated:
1261
.allocated:
1262
        mov     edi, [MemForImage]
1262
        mov     edi, [MemForImage]
1263
        mov     esi, console_data
1263
        mov     esi, console_data
1264
        mov     ecx, [cur_height]
1264
        mov     ecx, [cur_height]
1265
.lh:
1265
.lh:
1266
        push    ecx
1266
        push    ecx
1267
        mov     ecx, [cur_width]
1267
        mov     ecx, [cur_width]
1268
.lw:
1268
.lw:
1269
        push    ecx edi
1269
        push    ecx edi
1270
        xor     eax, eax
1270
        xor     eax, eax
1271
        mov     al, [esi+1]
1271
        mov     al, [esi+1]
1272
        and     al, 0xF
1272
        and     al, 0xF
1273
        mov     ebx, [console_colors + eax*4]   ; 梥â ⥪áâ 
1273
        mov     ebx, [console_colors + eax*4]   ; 梥â ⥪áâ 
1274
        mov     al, [esi+1]
1274
        mov     al, [esi+1]
1275
        shr     al, 4
1275
        shr     al, 4
1276
        mov     ebp, [console_colors + eax*4]   ; 梥â ä®­ 
1276
        mov     ebp, [console_colors + eax*4]   ; 梥â ä®­ 
1277
        lodsb
1277
        lodsb
1278
        inc     esi
1278
        inc     esi
1279
if font_width > 8
1279
if font_width > 8
1280
        lea     edx, [eax+eax+font]
1280
        lea     edx, [eax+eax+font]
1281
else
1281
else
1282
        lea     edx, [eax+font]
1282
        lea     edx, [eax+font]
1283
end if
1283
end if
1284
        mov     ecx, font_height
1284
        mov     ecx, font_height
1285
.sh:
1285
.sh:
1286
        push    ecx edi
1286
        push    ecx edi
1287
        xor     ecx, ecx
1287
        xor     ecx, ecx
1288
.sw:
1288
.sw:
1289
        mov     eax, ebx
1289
        mov     eax, ebx
1290
        bt      [edx], ecx
1290
        bt      [edx], ecx
1291
        jc      @f
1291
        jc      @f
1292
        mov     eax, ebp
1292
        mov     eax, ebp
1293
@@:
1293
@@:
1294
        stosw
1294
        stosw
1295
        shr     eax, 16
1295
        shr     eax, 16
1296
        stosb
1296
        stosb
1297
        inc     ecx
1297
        inc     ecx
1298
        cmp     ecx, font_width
1298
        cmp     ecx, font_width
1299
        jb      .sw
1299
        jb      .sw
1300
        pop     edi ecx
1300
        pop     edi ecx
1301
        mov     eax, [cur_width]
1301
        mov     eax, [cur_width]
1302
        imul    eax, font_width*3
1302
        imul    eax, font_width*3
1303
        add     edi, eax
1303
        add     edi, eax
1304
if font_width > 8
1304
if font_width > 8
1305
        add     edx, 256*2
1305
        add     edx, 256*2
1306
else
1306
else
1307
        add     edx, 256
1307
        add     edx, 256
1308
end if
1308
end if
1309
        loop    .sh
1309
        loop    .sh
1310
        pop     edi ecx
1310
        pop     edi ecx
1311
        add     edi, font_width*3
1311
        add     edi, font_width*3
1312
        loop    .lw
1312
        loop    .lw
1313
        mov     eax, [cur_width]
1313
        mov     eax, [cur_width]
1314
        imul    eax, (font_height-1)*font_width*3
1314
        imul    eax, (font_height-1)*font_width*3
1315
        add     edi, eax
1315
        add     edi, eax
1316
        pop     ecx
1316
        pop     ecx
1317
        loop    .lh
1317
        loop    .lh
1318
        push    7
1318
        push    7
1319
        pop     eax
1319
        pop     eax
1320
        mov     ebx, [MemForImage]
1320
        mov     ebx, [MemForImage]
1321
        mov     ecx, [cur_width]
1321
        mov     ecx, [cur_width]
1322
        imul    ecx, font_width*10000h
1322
        imul    ecx, font_width*10000h
1323
        mov     cx, word [cur_height]
1323
        mov     cx, word [cur_height]
1324
        imul    cx, font_height
1324
        imul    cx, font_height
1325
        mov     edx, [skinh]
1325
        mov     edx, [skinh]
1326
        add     edx, 5*10000h
1326
        add     edx, 5*10000h
1327
        int     40h
1327
        int     40h
1328
        ret
1328
        ret
1329
 
1329
 
1330
get_console_ptr:
1330
get_console_ptr:
1331
; in: eax=x, edx=y
1331
; in: eax=x, edx=y
1332
; out: edi->console data
1332
; out: edi->console data
1333
        push    edx
1333
        push    edx
1334
        imul    edx, [cur_width]
1334
        imul    edx, [cur_width]
1335
        add     edx, eax
1335
        add     edx, eax
1336
        lea     edi, [console_data + edx*2]
1336
        lea     edi, [console_data + edx*2]
1337
        pop     edx
1337
        pop     edx
1338
        ret
1338
        ret
1339
 
1339
 
1340
draw_keybar:
1340
draw_keybar:
1341
        pushad
1341
        pushad
1342
        xor     eax, eax
1342
        xor     eax, eax
1343
        test    [ctrlstate], 3
1343
        test    [ctrlstate], 3
1344
        jz      @f
1344
        jz      @f
1345
        inc     eax
1345
        inc     eax
1346
@@:
1346
@@:
1347
        test    [ctrlstate], 0xC
1347
        test    [ctrlstate], 0xC
1348
        jz      @f
1348
        jz      @f
1349
        or      al, 2
1349
        or      al, 2
1350
@@:
1350
@@:
1351
        test    [ctrlstate], 0x30
1351
        test    [ctrlstate], 0x30
1352
        jz      @f
1352
        jz      @f
1353
        or      al, 4
1353
        or      al, 4
1354
@@:
1354
@@:
1355
        imul    eax, 6*12
1355
        imul    eax, 6*12
1356
        mov     esi, [active_screen_vtable]
1356
        mov     esi, [active_screen_vtable]
1357
        mov     esi, [esi+screen_vtable.keybar]
1357
        mov     esi, [esi+screen_vtable.keybar]
1358
        add     esi, eax
1358
        add     esi, eax
1359
        xor     ecx, ecx
1359
        xor     ecx, ecx
1360
        inc     ecx
1360
        inc     ecx
1361
        xor     eax, eax
1361
        xor     eax, eax
1362
        mov     edx, [cur_height]
1362
        mov     edx, [cur_height]
1363
        dec     edx
1363
        dec     edx
1364
        call    get_console_ptr
1364
        call    get_console_ptr
1365
        push    6
1365
        push    6
1366
        pop     ebx
1366
        pop     ebx
1367
        mov     eax, [cur_width]
1367
        mov     eax, [cur_width]
1368
        sub     eax, 11+9+3*2+6
1368
        sub     eax, 11+9+3*2+6
1369
        cmp     eax, 7*11
1369
        cmp     eax, 7*11
1370
        jl      @f
1370
        jl      @f
1371
        cdq
1371
        cdq
1372
        mov     bl, 11
1372
        mov     bl, 11
1373
        div     ebx
1373
        div     ebx
1374
        mov     ebx, eax
1374
        mov     ebx, eax
1375
@@:
1375
@@:
1376
        xor     edx, edx
1376
        xor     edx, edx
1377
.l:
1377
.l:
1378
        add     edx, 7
1378
        add     edx, 7
1379
        cmp     cl, 10
1379
        cmp     cl, 10
1380
        jb      @f
1380
        jb      @f
1381
        inc     edx
1381
        inc     edx
1382
@@:
1382
@@:
1383
        cmp     edx, [cur_width]
1383
        cmp     edx, [cur_width]
1384
        ja      .ret
1384
        ja      .ret
1385
        cmp     cl, 10
1385
        cmp     cl, 10
1386
        jae     .twodig
1386
        jae     .twodig
1387
        lea     eax, [ecx+'0']
1387
        lea     eax, [ecx+'0']
1388
        stosb
1388
        stosb
1389
        mov     al, [keybar_number_color]
1389
        mov     al, [keybar_number_color]
1390
        stosb
1390
        stosb
1391
        jmp     .cmn
1391
        jmp     .cmn
1392
.twodig:
1392
.twodig:
1393
        mov     al, cl
1393
        mov     al, cl
1394
        cbw
1394
        cbw
1395
        div     [_10]
1395
        div     [_10]
1396
        add     al, '0'
1396
        add     al, '0'
1397
        stosb
1397
        stosb
1398
        mov     al, [keybar_number_color]
1398
        mov     al, [keybar_number_color]
1399
        stosb
1399
        stosb
1400
        xchg    al, ah
1400
        xchg    al, ah
1401
        add     al, '0'
1401
        add     al, '0'
1402
        stosw
1402
        stosw
1403
.cmn:
1403
.cmn:
1404
        mov     ah, [keybar_name_color]
1404
        mov     ah, [keybar_name_color]
1405
        push    ecx
1405
        push    ecx
1406
        mov     cl, 6
1406
        mov     cl, 6
1407
@@:
1407
@@:
1408
        lodsb
1408
        lodsb
1409
        stosw
1409
        stosw
1410
        loop    @b
1410
        loop    @b
1411
        mov     al, ' '
1411
        mov     al, ' '
1412
        lea     ecx, [ebx-6]
1412
        lea     ecx, [ebx-6]
1413
        cmp     byte [esp], 12
1413
        cmp     byte [esp], 12
1414
        jz      .ret_pop
1414
        jz      .ret_pop
1415
        add     edx, ecx
1415
        add     edx, ecx
1416
        rep     stosw
1416
        rep     stosw
1417
        pop     ecx
1417
        pop     ecx
1418
        inc     edx
1418
        inc     edx
1419
        cmp     edx, [cur_width]
1419
        cmp     edx, [cur_width]
1420
        ja      .ret
1420
        ja      .ret
1421
        mov     ah, [keybar_bgr_color]
1421
        mov     ah, [keybar_bgr_color]
1422
        stosw
1422
        stosw
1423
        inc     ecx
1423
        inc     ecx
1424
        jmp     .l
1424
        jmp     .l
1425
.ret_pop:
1425
.ret_pop:
1426
        pop     ecx
1426
        pop     ecx
1427
.ret:
1427
.ret:
1428
        cmp     byte [edi-2], ' '
1428
        cmp     byte [edi-2], ' '
1429
        jnz     @f
1429
        jnz     @f
1430
        dec     edi
1430
        dec     edi
1431
        dec     edi
1431
        dec     edi
1432
@@:
1432
@@:
1433
        push    edi
1433
        push    edi
1434
        mov     eax, [cur_width]
1434
        mov     eax, [cur_width]
1435
        mov     edx, [cur_height]
1435
        mov     edx, [cur_height]
1436
        call    get_console_ptr
1436
        call    get_console_ptr
1437
        mov     ecx, edi
1437
        mov     ecx, edi
1438
        pop     edi
1438
        pop     edi
1439
        sub     ecx, edi
1439
        sub     ecx, edi
1440
        shr     ecx, 1
1440
        shr     ecx, 1
1441
        mov     al, ' '
1441
        mov     al, ' '
1442
        mov     ah, [keybar_name_color]
1442
        mov     ah, [keybar_name_color]
1443
        rep     stosw
1443
        rep     stosw
1444
.done:
1444
.done:
1445
        popad
1445
        popad
1446
        ret
1446
        ret
1447
 
1447
 
1448
draw_cmdbar:
1448
draw_cmdbar:
1449
        mov     esi, [active_panel]
1449
        mov     esi, [active_panel]
1450
        add     esi, panel1_dir - panel1_data
1450
        add     esi, panel1_dir - panel1_data
1451
        xor     eax, eax
1451
        xor     eax, eax
1452
        mov     edx, [cur_height]
1452
        mov     edx, [cur_height]
1453
        dec     edx
1453
        dec     edx
1454
        dec     edx
1454
        dec     edx
1455
        call    get_console_ptr
1455
        call    get_console_ptr
1456
        mov     ah, [cmdbar_prefix_color]
1456
        mov     ah, [cmdbar_prefix_color]
1457
        mov     ecx, [cur_width]
1457
        mov     ecx, [cur_width]
1458
        dec     ecx
1458
        dec     ecx
1459
@@:
1459
@@:
1460
        lodsb
1460
        lodsb
1461
        test    al, al
1461
        test    al, al
1462
        jz      @f
1462
        jz      @f
1463
        stosw
1463
        stosw
1464
        loop    @b
1464
        loop    @b
1465
@@:
1465
@@:
1466
        mov     al, '>'
1466
        mov     al, '>'
1467
        stosw
1467
        stosw
1468
        mov     al, ' '
1468
        mov     al, ' '
1469
        mov     ah, [cmdbar_normal_color]
1469
        mov     ah, [cmdbar_normal_color]
1470
        rep     stosw
1470
        rep     stosw
1471
        ret
1471
        ret
1472
 
1472
 
1473
draw_border:
1473
draw_border:
1474
        push    edi
1474
        push    edi
1475
        mov     al, 0xC9
1475
        mov     al, 0xC9
1476
        stosw
1476
        stosw
1477
        mov     al, 0xCD
1477
        mov     al, 0xCD
1478
        lea     ecx, [ebx-2]
1478
        lea     ecx, [ebx-2]
1479
        rep     stosw
1479
        rep     stosw
1480
        mov     al, 0xBB
1480
        mov     al, 0xBB
1481
        stosw
1481
        stosw
1482
        pop     edi
1482
        pop     edi
1483
        add     edi, [cur_width]
1483
        add     edi, [cur_width]
1484
        add     edi, [cur_width]
1484
        add     edi, [cur_width]
1485
        lea     ecx, [edx-2]
1485
        lea     ecx, [edx-2]
1486
.l:
1486
.l:
1487
        push    edi
1487
        push    edi
1488
        mov     al, 0xBA
1488
        mov     al, 0xBA
1489
        stosw
1489
        stosw
1490
        mov     al, 0x20
1490
        mov     al, 0x20
1491
        push    ecx
1491
        push    ecx
1492
        lea     ecx, [ebx-2]
1492
        lea     ecx, [ebx-2]
1493
        rep     stosw
1493
        rep     stosw
1494
        pop     ecx
1494
        pop     ecx
1495
        mov     al, 0xBA
1495
        mov     al, 0xBA
1496
        stosw
1496
        stosw
1497
        pop     edi
1497
        pop     edi
1498
        add     edi, [cur_width]
1498
        add     edi, [cur_width]
1499
        add     edi, [cur_width]
1499
        add     edi, [cur_width]
1500
        loop    .l
1500
        loop    .l
1501
        mov     al, 0xC8
1501
        mov     al, 0xC8
1502
        stosw
1502
        stosw
1503
        mov     al, 0xCD
1503
        mov     al, 0xCD
1504
        lea     ecx, [ebx-2]
1504
        lea     ecx, [ebx-2]
1505
        rep     stosw
1505
        rep     stosw
1506
        mov     al, 0xBC
1506
        mov     al, 0xBC
1507
        stosw
1507
        stosw
1508
        ret
1508
        ret
1509
 
1509
 
1510
draw_panel:
1510
draw_panel:
1511
        mov     eax, [ebp + panel1_left - panel1_data]
1511
        mov     eax, [ebp + panel1_left - panel1_data]
1512
        mov     edx, [ebp + panel1_top - panel1_data]
1512
        mov     edx, [ebp + panel1_top - panel1_data]
1513
        call    get_console_ptr
1513
        call    get_console_ptr
1514
; draw border
1514
; draw border
1515
        mov     ah, [panel_border_color]
1515
        mov     ah, [panel_border_color]
1516
        mov     ebx, [ebp + panel1_width - panel1_data]
1516
        mov     ebx, [ebp + panel1_width - panel1_data]
1517
        mov     edx, [ebp + panel1_height - panel1_data]
1517
        mov     edx, [ebp + panel1_height - panel1_data]
1518
        call    draw_border
1518
        call    draw_border
1519
        push    eax
1519
        push    eax
1520
        mov     eax, [ebp + panel1_left - panel1_data]
1520
        mov     eax, [ebp + panel1_left - panel1_data]
1521
        mov     edx, [ebp + panel1_top - panel1_data]
1521
        mov     edx, [ebp + panel1_top - panel1_data]
1522
        add     edx, [ebp + panel1_height - panel1_data]
1522
        add     edx, [ebp + panel1_height - panel1_data]
1523
        sub     edx, 3
1523
        sub     edx, 3
1524
        call    get_console_ptr
1524
        call    get_console_ptr
1525
        pop     eax
1525
        pop     eax
1526
        mov     al, 0xC7
1526
        mov     al, 0xC7
1527
        stosw
1527
        stosw
1528
        mov     al, 0xC4
1528
        mov     al, 0xC4
1529
        lea     ecx, [ebx-2]
1529
        lea     ecx, [ebx-2]
1530
        rep     stosw
1530
        rep     stosw
1531
        mov     al, 0xB6
1531
        mov     al, 0xB6
1532
        stosw
1532
        stosw
1533
        mov     eax, [ebp + panel1_width - panel1_data]
1533
        mov     eax, [ebp + panel1_width - panel1_data]
1534
        sub     eax, 3
1534
        sub     eax, 3
1535
        shr     eax, 1
1535
        shr     eax, 1
1536
        mov     [column_width], eax
1536
        mov     [column_width], eax
1537
        mov     eax, [ebp + panel1_left - panel1_data]
1537
        mov     eax, [ebp + panel1_left - panel1_data]
1538
        inc     eax
1538
        inc     eax
1539
        mov     [column_left], eax
1539
        mov     [column_left], eax
1540
        add     eax, [column_width]
1540
        add     eax, [column_width]
1541
        mov     edx, [ebp + panel1_top - panel1_data]
1541
        mov     edx, [ebp + panel1_top - panel1_data]
1542
        inc     edx
1542
        inc     edx
1543
        mov     [column_top], edx
1543
        mov     [column_top], edx
1544
        dec     edx
1544
        dec     edx
1545
        call    get_console_ptr
1545
        call    get_console_ptr
1546
        mov     ah, [panel_border_color]
1546
        mov     ah, [panel_border_color]
1547
        mov     al, 0xD1
1547
        mov     al, 0xD1
1548
        mov     [edi], ax
1548
        mov     [edi], ax
1549
        add     edi, [cur_width]
1549
        add     edi, [cur_width]
1550
        add     edi, [cur_width]
1550
        add     edi, [cur_width]
1551
        mov     ecx, [ebp + panel1_height - panel1_data]
1551
        mov     ecx, [ebp + panel1_height - panel1_data]
1552
        sub     ecx, 4
1552
        sub     ecx, 4
1553
        mov     [column_height], ecx
1553
        mov     [column_height], ecx
1554
        mov     al, 0xB3
1554
        mov     al, 0xB3
1555
@@:
1555
@@:
1556
        mov     [edi], ax
1556
        mov     [edi], ax
1557
        add     edi, [cur_width]
1557
        add     edi, [cur_width]
1558
        add     edi, [cur_width]
1558
        add     edi, [cur_width]
1559
        loop    @b
1559
        loop    @b
1560
        mov     al, 0xC1
1560
        mov     al, 0xC1
1561
        stosw
1561
        stosw
1562
        mov     eax, [column_height]
1562
        mov     eax, [column_height]
1563
        dec     eax
1563
        dec     eax
1564
        mov     [ebp + panel1_colsz - panel1_data], eax
1564
        mov     [ebp + panel1_colsz - panel1_data], eax
1565
        add     eax, eax
1565
        add     eax, eax
1566
        mov     [ebp + panel1_colst - panel1_data], eax
1566
        mov     [ebp + panel1_colst - panel1_data], eax
1567
        mov     eax, [ebp + panel1_start - panel1_data]
1567
        mov     eax, [ebp + panel1_start - panel1_data]
1568
        mov     [column_index], eax
1568
        mov     [column_index], eax
1569
        call    draw_column
1569
        call    draw_column
1570
        mov     eax, [ebp + panel1_width - panel1_data]
1570
        mov     eax, [ebp + panel1_width - panel1_data]
1571
        sub     eax, 3
1571
        sub     eax, 3
1572
        mov     ecx, [column_width]
1572
        mov     ecx, [column_width]
1573
        sub     eax, ecx
1573
        sub     eax, ecx
1574
        mov     [column_width], eax
1574
        mov     [column_width], eax
1575
        inc     ecx
1575
        inc     ecx
1576
        add     [column_left], ecx
1576
        add     [column_left], ecx
1577
        call    draw_column
1577
        call    draw_column
1578
; ‡ £®«®¢®ª ¯ ­¥«¨ (⥪ãé ï ¯ ¯ª )
1578
; ‡ £®«®¢®ª ¯ ­¥«¨ (⥪ãé ï ¯ ¯ª )
1579
        lea     esi, [ebp + panel1_dir - panel1_data]
1579
        lea     esi, [ebp + panel1_dir - panel1_data]
1580
        mov     edi, cur_header
1580
        mov     edi, cur_header
1581
        mov     ecx, [ebp + panel1_width - panel1_data]
1581
        mov     ecx, [ebp + panel1_width - panel1_data]
1582
        sub     ecx, 7
1582
        sub     ecx, 7
1583
        movsb
1583
        movsb
1584
@@:
1584
@@:
1585
        lodsb
1585
        lodsb
1586
        stosb
1586
        stosb
1587
        dec     ecx
1587
        dec     ecx
1588
        test    al, al
1588
        test    al, al
1589
        jz      .header_created
1589
        jz      .header_created
1590
        cmp     al, '/'
1590
        cmp     al, '/'
1591
        jnz     @b
1591
        jnz     @b
1592
        mov     edx, esi
1592
        mov     edx, esi
1593
@@:
1593
@@:
1594
        lodsb
1594
        lodsb
1595
        test    al, al
1595
        test    al, al
1596
        jnz     @b
1596
        jnz     @b
1597
        sub     esi, edx
1597
        sub     esi, edx
1598
        dec     esi
1598
        dec     esi
1599
        cmp     esi, ecx
1599
        cmp     esi, ecx
1600
        jbe     @f
1600
        jbe     @f
1601
        mov     word [edi], '..'
1601
        mov     word [edi], '..'
1602
        mov     byte [edi+2], '.'
1602
        mov     byte [edi+2], '.'
1603
        add     edi, 3
1603
        add     edi, 3
1604
        sub     ecx, 3
1604
        sub     ecx, 3
1605
        add     edx, esi
1605
        add     edx, esi
1606
        sub     edx, ecx
1606
        sub     edx, ecx
1607
@@:
1607
@@:
1608
        mov     esi, edx
1608
        mov     esi, edx
1609
@@:
1609
@@:
1610
        lodsb
1610
        lodsb
1611
        stosb
1611
        stosb
1612
        dec     ecx
1612
        dec     ecx
1613
        test    al, al
1613
        test    al, al
1614
        jnz     @b
1614
        jnz     @b
1615
.header_created:
1615
.header_created:
1616
        mov     edx, [ebp + panel1_top - panel1_data]
1616
        mov     edx, [ebp + panel1_top - panel1_data]
1617
        mov     eax, [ebp + panel1_left - panel1_data]
1617
        mov     eax, [ebp + panel1_left - panel1_data]
1618
        shr     ecx, 1
1618
        shr     ecx, 1
1619
        lea     eax, [eax+ecx+3]
1619
        lea     eax, [eax+ecx+3]
1620
        call    get_console_ptr
1620
        call    get_console_ptr
1621
        mov     ah, [panel_active_header_color]
1621
        mov     ah, [panel_active_header_color]
1622
        cmp     ebp, [active_panel]
1622
        cmp     ebp, [active_panel]
1623
        jz      @f
1623
        jz      @f
1624
        mov     ah, [panel_header_color]
1624
        mov     ah, [panel_header_color]
1625
@@:
1625
@@:
1626
        mov     al, ' '
1626
        mov     al, ' '
1627
        stosw
1627
        stosw
1628
        mov     esi, cur_header
1628
        mov     esi, cur_header
1629
@@:
1629
@@:
1630
        lodsb
1630
        lodsb
1631
        test    al, al
1631
        test    al, al
1632
        jz      @f
1632
        jz      @f
1633
        stosw
1633
        stosw
1634
        jmp     @b
1634
        jmp     @b
1635
@@:
1635
@@:
1636
        mov     al, ' '
1636
        mov     al, ' '
1637
        stosw
1637
        stosw
1638
        mov     edx, [ebp + panel1_top - panel1_data]
1638
        mov     edx, [ebp + panel1_top - panel1_data]
1639
        inc     edx
1639
        inc     edx
1640
        mov     eax, [ebp + panel1_left - panel1_data]
1640
        mov     eax, [ebp + panel1_left - panel1_data]
1641
        inc     eax
1641
        inc     eax
1642
        call    get_console_ptr
1642
        call    get_console_ptr
1643
        movzx   eax, [ebp + panel1_sortmode - panel1_data]
1643
        movzx   eax, [ebp + panel1_sortmode - panel1_data]
1644
        mov     al, [compare_names+eax]
1644
        mov     al, [compare_names+eax]
1645
        stosb
1645
        stosb
1646
        cmp     [ebp + panel1_numfiles - panel1_data], 0
1646
        cmp     [ebp + panel1_numfiles - panel1_data], 0
1647
        jz      .skip_curinfo
1647
        jz      .skip_curinfo
1648
; ˆ­ä®à¬ æ¨ï ® ¢ë¡à ­­®¬ ä ©«¥
1648
; ˆ­ä®à¬ æ¨ï ® ¢ë¡à ­­®¬ ä ©«¥
1649
        mov     ebx, [ebp + panel1_index - panel1_data]
1649
        mov     ebx, [ebp + panel1_index - panel1_data]
1650
        mov     eax, [ebp + panel1_files - panel1_data]
1650
        mov     eax, [ebp + panel1_files - panel1_data]
1651
        mov     ebx, [eax+ebx*4]
1651
        mov     ebx, [eax+ebx*4]
1652
        mov     eax, [ebp + panel1_nfa - panel1_data]
1652
        mov     eax, [ebp + panel1_nfa - panel1_data]
1653
        lea     ebx, [ebx+eax*4+32]
1653
        lea     ebx, [ebx+eax*4+32]
1654
        add     ebx, [ebp + panel1_files - panel1_data]
1654
        add     ebx, [ebp + panel1_files - panel1_data]
1655
        mov     eax, [ebp + panel1_left - panel1_data]
1655
        mov     eax, [ebp + panel1_left - panel1_data]
1656
        add     eax, [ebp + panel1_width - panel1_data]
1656
        add     eax, [ebp + panel1_width - panel1_data]
1657
        dec     eax
1657
        dec     eax
1658
        mov     edx, [ebp + panel1_top - panel1_data]
1658
        mov     edx, [ebp + panel1_top - panel1_data]
1659
        add     edx, [ebp + panel1_height - panel1_data]
1659
        add     edx, [ebp + panel1_height - panel1_data]
1660
        dec     edx
1660
        dec     edx
1661
        dec     edx
1661
        dec     edx
1662
        call    get_console_ptr
1662
        call    get_console_ptr
1663
        mov     ecx, [ebp + panel1_width - panel1_data]
1663
        mov     ecx, [ebp + panel1_width - panel1_data]
1664
        dec     ecx
1664
        dec     ecx
1665
        dec     ecx
1665
        dec     ecx
1666
; ‚à¥¬ï ¬®¤¨ä¨ª æ¨¨
1666
; ‚à¥¬ï ¬®¤¨ä¨ª æ¨¨
1667
        sub     edi, 5*2
1667
        sub     edi, 5*2
1668
        sub     ecx, 6
1668
        sub     ecx, 6
1669
        mov     al, [ebx+24+2]
1669
        mov     al, [ebx+24+2]
1670
        aam
1670
        aam
1671
        or      ax, 0x3030
1671
        or      ax, 0x3030
1672
        mov     [edi], ah
1672
        mov     [edi], ah
1673
        mov     [edi+2], al
1673
        mov     [edi+2], al
1674
        mov     [edi+4], byte ':'
1674
        mov     [edi+4], byte ':'
1675
        mov     al, [ebx+24+1]
1675
        mov     al, [ebx+24+1]
1676
        aam
1676
        aam
1677
        or      ax, 0x3030
1677
        or      ax, 0x3030
1678
        mov     [edi+6], ah
1678
        mov     [edi+6], ah
1679
        mov     [edi+8], al
1679
        mov     [edi+8], al
1680
        mov     al, [panel_normal_color]
1680
        mov     al, [panel_normal_color]
1681
        mov     [edi+1], al
1681
        mov     [edi+1], al
1682
        mov     [edi+3], al
1682
        mov     [edi+3], al
1683
        mov     [edi+5], al
1683
        mov     [edi+5], al
1684
        mov     [edi+7], al
1684
        mov     [edi+7], al
1685
        mov     [edi+9], al
1685
        mov     [edi+9], al
1686
        dec     edi
1686
        dec     edi
1687
        mov     [edi], al
1687
        mov     [edi], al
1688
        dec     edi
1688
        dec     edi
1689
        mov     byte [edi], ' '
1689
        mov     byte [edi], ' '
1690
; „ â  ¬®¤¨ä¨ª æ¨¨
1690
; „ â  ¬®¤¨ä¨ª æ¨¨
1691
        sub     edi, 8*2
1691
        sub     edi, 8*2
1692
        sub     ecx, 9
1692
        sub     ecx, 9
1693
        mov     al, [ebx+28+0]
1693
        mov     al, [ebx+28+0]
1694
        aam
1694
        aam
1695
        or      ax, 0x3030
1695
        or      ax, 0x3030
1696
        mov     [edi], ah
1696
        mov     [edi], ah
1697
        mov     [edi+2], al
1697
        mov     [edi+2], al
1698
        mov     [edi+4], byte '.'
1698
        mov     [edi+4], byte '.'
1699
        mov     al, [ebx+28+1]
1699
        mov     al, [ebx+28+1]
1700
        aam
1700
        aam
1701
        or      ax, 0x3030
1701
        or      ax, 0x3030
1702
        mov     [edi+6], ah
1702
        mov     [edi+6], ah
1703
        mov     [edi+8], al
1703
        mov     [edi+8], al
1704
        mov     [edi+10], byte '.'
1704
        mov     [edi+10], byte '.'
1705
        mov     ax, [ebx+28+2]
1705
        mov     ax, [ebx+28+2]
1706
        div     [_100]
1706
        div     [_100]
1707
        mov     al, ah
1707
        mov     al, ah
1708
        aam
1708
        aam
1709
        or      ax, 0x3030
1709
        or      ax, 0x3030
1710
        mov     [edi+12], ah
1710
        mov     [edi+12], ah
1711
        mov     [edi+14], al
1711
        mov     [edi+14], al
1712
        mov     al, [panel_normal_color]
1712
        mov     al, [panel_normal_color]
1713
        mov     [edi+1], al
1713
        mov     [edi+1], al
1714
        mov     [edi+3], al
1714
        mov     [edi+3], al
1715
        mov     [edi+5], al
1715
        mov     [edi+5], al
1716
        mov     [edi+7], al
1716
        mov     [edi+7], al
1717
        mov     [edi+9], al
1717
        mov     [edi+9], al
1718
        mov     [edi+11], al
1718
        mov     [edi+11], al
1719
        mov     [edi+13], al
1719
        mov     [edi+13], al
1720
        mov     [edi+15], al
1720
        mov     [edi+15], al
1721
        dec     edi
1721
        dec     edi
1722
        mov     [edi], al
1722
        mov     [edi], al
1723
        dec     edi
1723
        dec     edi
1724
        mov     [edi], byte ' '
1724
        mov     [edi], byte ' '
1725
;  §¬¥à
1725
;  §¬¥à
1726
        std
1726
        std
1727
        mov     ah, [panel_normal_color]
1727
        mov     ah, [panel_normal_color]
1728
        dec     edi
1728
        dec     edi
1729
        dec     edi
1729
        dec     edi
1730
        dec     ecx
1730
        dec     ecx
1731
        test    byte [ebx], 0x10
1731
        test    byte [ebx], 0x10
1732
        jz      .size_file
1732
        jz      .size_file
1733
        push    ecx
1733
        push    ecx
1734
        mov     esi, aFolder+aFolder.size-1
1734
        mov     esi, aFolder+aFolder.size-1
1735
        mov     ecx, aFolder.size
1735
        mov     ecx, aFolder.size
1736
        cmp     word [ebx+40], '..'
1736
        cmp     word [ebx+40], '..'
1737
        jnz     @f
1737
        jnz     @f
1738
        cmp     byte [ebx+42], 0
1738
        cmp     byte [ebx+42], 0
1739
        jnz     @f
1739
        jnz     @f
1740
        mov     esi, aUp+aUp.size-1
1740
        mov     esi, aUp+aUp.size-1
1741
        mov     cl, aUp.size
1741
        mov     cl, aUp.size
1742
@@:
1742
@@:
1743
        sub     [esp], ecx
1743
        sub     [esp], ecx
1744
@@:
1744
@@:
1745
        lodsb
1745
        lodsb
1746
        stosw
1746
        stosw
1747
        loop    @b
1747
        loop    @b
1748
        pop     ecx
1748
        pop     ecx
1749
        jmp     .size_done
1749
        jmp     .size_done
1750
.size_file:
1750
.size_file:
1751
        mov     edx, [ebx+36]
1751
        mov     edx, [ebx+36]
1752
        test    edx, edx
1752
        test    edx, edx
1753
        jz      .size_less_4g
1753
        jz      .size_less_4g
1754
        cmp     edx, 10*256
1754
        cmp     edx, 10*256
1755
        jae     .size_tera
1755
        jae     .size_tera
1756
; ¢ £¨£ ¡ ©â å
1756
; ¢ £¨£ ¡ ©â å
1757
        mov     al, 'G'
1757
        mov     al, 'G'
1758
        jmp     .size_letter
1758
        jmp     .size_letter
1759
.size_tera:
1759
.size_tera:
1760
; ¢ â¥à ¡ ©â å
1760
; ¢ â¥à ¡ ©â å
1761
        shr     edx, 8
1761
        shr     edx, 8
1762
        mov     al, 'T'
1762
        mov     al, 'T'
1763
        jmp     .size_letter
1763
        jmp     .size_letter
1764
.size_less_4g:
1764
.size_less_4g:
1765
        mov     edx, [ebx+32]
1765
        mov     edx, [ebx+32]
1766
        cmp     edx, 10*(1 shl 20)
1766
        cmp     edx, 10*(1 shl 20)
1767
        jae     .size_mega
1767
        jae     .size_mega
1768
        cmp     edx, 1 shl 20
1768
        cmp     edx, 1 shl 20
1769
        jb      .size_num
1769
        jb      .size_num
1770
        shr     edx, 10
1770
        shr     edx, 10
1771
        mov     al, 'K'
1771
        mov     al, 'K'
1772
        jmp     .size_letter
1772
        jmp     .size_letter
1773
.size_mega:
1773
.size_mega:
1774
        mov     al, 'M'
1774
        mov     al, 'M'
1775
        shr     edx, 20
1775
        shr     edx, 20
1776
.size_letter:
1776
.size_letter:
1777
        stosw
1777
        stosw
1778
        dec     ecx
1778
        dec     ecx
1779
        mov     al, ' '
1779
        mov     al, ' '
1780
        stosw
1780
        stosw
1781
        dec     ecx
1781
        dec     ecx
1782
.size_num:
1782
.size_num:
1783
        xchg    eax, edx
1783
        xchg    eax, edx
1784
        xor     edx, edx
1784
        xor     edx, edx
1785
        div     [_10d]
1785
        div     [_10d]
1786
        xchg    eax, edx
1786
        xchg    eax, edx
1787
        add     al, '0'
1787
        add     al, '0'
1788
        mov     ah, [panel_normal_color]
1788
        mov     ah, [panel_normal_color]
1789
        stosw
1789
        stosw
1790
        dec     ecx
1790
        dec     ecx
1791
        test    edx, edx
1791
        test    edx, edx
1792
        jnz     .size_num
1792
        jnz     .size_num
1793
.size_done:
1793
.size_done:
1794
        cld
1794
        cld
1795
; ˆ¬ï
1795
; ˆ¬ï
1796
        sub     edi, ecx
1796
        sub     edi, ecx
1797
        sub     edi, ecx
1797
        sub     edi, ecx
1798
        lea     esi, [ebx+40]
1798
        lea     esi, [ebx+40]
1799
@@:
1799
@@:
1800
        lodsb
1800
        lodsb
1801
        test    al, al
1801
        test    al, al
1802
        jnz     @b
1802
        jnz     @b
1803
        sub     esi, ebx
1803
        sub     esi, ebx
1804
        sub     esi, 41
1804
        sub     esi, 41
1805
        mov     ah, [panel_normal_color]
1805
        mov     ah, [panel_normal_color]
1806
        cmp     esi, ecx
1806
        cmp     esi, ecx
1807
        lea     edx, [ebx+40]
1807
        lea     edx, [ebx+40]
1808
        jbe     @f
1808
        jbe     @f
1809
        mov     al, '{'
1809
        mov     al, '{'
1810
        mov     [edi-2], ax
1810
        mov     [edi-2], ax
1811
        add     edx, esi
1811
        add     edx, esi
1812
        sub     edx, ecx
1812
        sub     edx, ecx
1813
@@:
1813
@@:
1814
        mov     esi, edx
1814
        mov     esi, edx
1815
@@:
1815
@@:
1816
        lodsb
1816
        lodsb
1817
        test    al, al
1817
        test    al, al
1818
        jz      @f
1818
        jz      @f
1819
        stosw
1819
        stosw
1820
        loop    @b
1820
        loop    @b
1821
@@:
1821
@@:
1822
        mov     al, ' '
1822
        mov     al, ' '
1823
        rep     stosw
1823
        rep     stosw
1824
.skip_curinfo:
1824
.skip_curinfo:
1825
        call    draw_image
1825
        call    draw_image
1826
        ret
1826
        ret
1827
 
1827
 
1828
draw_column:
1828
draw_column:
1829
        mov     eax, [column_left]
1829
        mov     eax, [column_left]
1830
        mov     edx, [column_top]
1830
        mov     edx, [column_top]
1831
        call    get_console_ptr
1831
        call    get_console_ptr
1832
; § £®«®¢®ª á⮫¡æ 
1832
; § £®«®¢®ª á⮫¡æ 
1833
        push    edi
1833
        push    edi
1834
        mov     ah, [column_header_color]
1834
        mov     ah, [column_header_color]
1835
        mov     al, ' '
1835
        mov     al, ' '
1836
        mov     ecx, [column_width]
1836
        mov     ecx, [column_width]
1837
if lang eq ru
1837
if lang eq ru
1838
        sub     ecx, 3
1838
        sub     ecx, 3
1839
else
1839
else
1840
        sub     ecx, 4
1840
        sub     ecx, 4
1841
end if
1841
end if
1842
        shr     ecx, 1
1842
        shr     ecx, 1
1843
        rep     stosw
1843
        rep     stosw
1844
if lang eq ru
1844
if lang eq ru
1845
        mov     al, 'ˆ'
1845
        mov     al, 'ˆ'
1846
        stosw
1846
        stosw
1847
        mov     al, '¬'
1847
        mov     al, '¬'
1848
        stosw
1848
        stosw
1849
        mov     al, 'ï'
1849
        mov     al, 'ï'
1850
        stosw
1850
        stosw
1851
else
1851
else
1852
        mov     al, 'N'
1852
        mov     al, 'N'
1853
        stosw
1853
        stosw
1854
        mov     al, 'a'
1854
        mov     al, 'a'
1855
        stosw
1855
        stosw
1856
        mov     al, 'm'
1856
        mov     al, 'm'
1857
        stosw
1857
        stosw
1858
        mov     al, 'e'
1858
        mov     al, 'e'
1859
        stosw
1859
        stosw
1860
end if
1860
end if
1861
        mov     al, ' '
1861
        mov     al, ' '
1862
        mov     ecx, [column_width]
1862
        mov     ecx, [column_width]
1863
if lang eq ru
1863
if lang eq ru
1864
        sub     ecx, 2
1864
        sub     ecx, 2
1865
else
1865
else
1866
        sub     ecx, 3
1866
        sub     ecx, 3
1867
end if
1867
end if
1868
        shr     ecx, 1
1868
        shr     ecx, 1
1869
        rep     stosw
1869
        rep     stosw
1870
        pop     edi
1870
        pop     edi
1871
        add     edi, [cur_width]
1871
        add     edi, [cur_width]
1872
        add     edi, [cur_width]
1872
        add     edi, [cur_width]
1873
; ä ©«ë
1873
; ä ©«ë
1874
        mov     edx, [ebp + panel1_numfiles - panel1_data]
1874
        mov     edx, [ebp + panel1_numfiles - panel1_data]
1875
        mov     ecx, [column_height]
1875
        mov     ecx, [column_height]
1876
        dec     ecx
1876
        dec     ecx
1877
.l:
1877
.l:
1878
        cmp     [column_index], edx
1878
        cmp     [column_index], edx
1879
        jae     .ret
1879
        jae     .ret
1880
        push    ecx
1880
        push    ecx
1881
        mov     esi, [column_index]
1881
        mov     esi, [column_index]
1882
        mov     ecx, [ebp + panel1_files - panel1_data]
1882
        mov     ecx, [ebp + panel1_files - panel1_data]
1883
        mov     esi, [ecx+esi*4]
1883
        mov     esi, [ecx+esi*4]
1884
        mov     ecx, [ebp + panel1_nfa - panel1_data]
1884
        mov     ecx, [ebp + panel1_nfa - panel1_data]
1885
        lea     esi, [esi + ecx*4 + 32 + 40]
1885
        lea     esi, [esi + ecx*4 + 32 + 40]
1886
        add     esi, [ebp + panel1_files - panel1_data]
1886
        add     esi, [ebp + panel1_files - panel1_data]
1887
; ¯®¤á¢¥âª 
1887
; ¯®¤á¢¥âª 
1888
;        call    insert_last_dot
1888
;        call    insert_last_dot
1889
        xor     ecx, ecx
1889
        xor     ecx, ecx
1890
.highlight_test_loop:
1890
.highlight_test_loop:
1891
        mov     ebx, [highlight_groups+ecx*4]
1891
        mov     ebx, [highlight_groups+ecx*4]
1892
        mov     al, [ebx + highlight.IncludeAttributes]
1892
        mov     al, [ebx + highlight.IncludeAttributes]
1893
        mov     ah, [esi - 40]
1893
        mov     ah, [esi - 40]
1894
        and     ah, al
1894
        and     ah, al
1895
        cmp     ah, al
1895
        cmp     ah, al
1896
        jnz     .highlight_test_failed
1896
        jnz     .highlight_test_failed
1897
        push    edi
1897
        push    edi
1898
        lea     edi, [ebx + highlight.Mask]
1898
        lea     edi, [ebx + highlight.Mask]
1899
        call    match_mask
1899
        call    match_mask
1900
        pop     edi
1900
        pop     edi
1901
        jc      .highlight_test_failed
1901
        jc      .highlight_test_failed
1902
        mov     ah, [ebx + highlight.NormalColor]
1902
        mov     ah, [ebx + highlight.NormalColor]
1903
        cmp     ebp, [active_panel]
1903
        cmp     ebp, [active_panel]
1904
        jnz     @f
1904
        jnz     @f
1905
        mov     ecx, [column_index]
1905
        mov     ecx, [column_index]
1906
        cmp     ecx, [ebp + panel1_index - panel1_data]
1906
        cmp     ecx, [ebp + panel1_index - panel1_data]
1907
        jnz     @f
1907
        jnz     @f
1908
        mov     ah, [ebx + highlight.CursorColor]
1908
        mov     ah, [ebx + highlight.CursorColor]
1909
@@:
1909
@@:
1910
        test    ah, ah
1910
        test    ah, ah
1911
        jz      .nohighlight
1911
        jz      .nohighlight
1912
        jmp     .doname
1912
        jmp     .doname
1913
.highlight_test_failed:
1913
.highlight_test_failed:
1914
        inc     ecx
1914
        inc     ecx
1915
        cmp     ecx, [highlight_num_groups]
1915
        cmp     ecx, [highlight_num_groups]
1916
        jb      .highlight_test_loop
1916
        jb      .highlight_test_loop
1917
.nohighlight:
1917
.nohighlight:
1918
        mov     ah, [panel_normal_color]
1918
        mov     ah, [panel_normal_color]
1919
        cmp     ebp, [active_panel]
1919
        cmp     ebp, [active_panel]
1920
        jnz     @f
1920
        jnz     @f
1921
        mov     ecx, [column_index]
1921
        mov     ecx, [column_index]
1922
        cmp     ecx, [ebp + panel1_index - panel1_data]
1922
        cmp     ecx, [ebp + panel1_index - panel1_data]
1923
        jnz     @f
1923
        jnz     @f
1924
        mov     ah, [panel_cursor_color]
1924
        mov     ah, [panel_cursor_color]
1925
@@:
1925
@@:
1926
.doname:
1926
.doname:
1927
;        call    delete_last_dot
1927
;        call    delete_last_dot
1928
        mov     ecx, [column_width]
1928
        mov     ecx, [column_width]
1929
        push    edi
1929
        push    edi
1930
@@:
1930
@@:
1931
        lodsb
1931
        lodsb
1932
        test    al, al
1932
        test    al, al
1933
        jz      @f
1933
        jz      @f
1934
        stosw
1934
        stosw
1935
        loop    @b
1935
        loop    @b
1936
        cmp     byte [esi], 0
1936
        cmp     byte [esi], 0
1937
        jz      @f
1937
        jz      @f
1938
        mov     byte [edi], '}'
1938
        mov     byte [edi], '}'
1939
@@:
1939
@@:
1940
        mov     al, ' '
1940
        mov     al, ' '
1941
        rep     stosw
1941
        rep     stosw
1942
        pop     edi
1942
        pop     edi
1943
        add     edi, [cur_width]
1943
        add     edi, [cur_width]
1944
        add     edi, [cur_width]
1944
        add     edi, [cur_width]
1945
        inc     [column_index]
1945
        inc     [column_index]
1946
        pop     ecx
1946
        pop     ecx
1947
        dec     ecx
1947
        dec     ecx
1948
        jnz     .l
1948
        jnz     .l
1949
.ret:
1949
.ret:
1950
        cmp     ebp, panel1_data
1950
        cmp     ebp, panel1_data
1951
        jnz     .ret2
1951
        jnz     .ret2
1952
; —¨á«® íªà ­®¢
1952
; —¨á«® íªà ­®¢
1953
        mov     eax, [num_screens]
1953
        mov     eax, [num_screens]
1954
        dec     eax
1954
        dec     eax
1955
        jz      .ret2
1955
        jz      .ret2
1956
        push    eax
1956
        push    eax
1957
        xor     eax, eax
1957
        xor     eax, eax
1958
        xor     edx, edx
1958
        xor     edx, edx
1959
        call    get_console_ptr
1959
        call    get_console_ptr
1960
        mov     ah, [panel_nscreens_color]
1960
        mov     ah, [panel_nscreens_color]
1961
        mov     al, '['
1961
        mov     al, '['
1962
        stosw
1962
        stosw
1963
        pop     eax
1963
        pop     eax
1964
        push    -'0'
1964
        push    -'0'
1965
@@:
1965
@@:
1966
        xor     edx, edx
1966
        xor     edx, edx
1967
        div     [_10d]
1967
        div     [_10d]
1968
        push    edx
1968
        push    edx
1969
        test    eax, eax
1969
        test    eax, eax
1970
        jnz     @b
1970
        jnz     @b
1971
@@:
1971
@@:
1972
        pop     eax
1972
        pop     eax
1973
        add     eax, '0'
1973
        add     eax, '0'
1974
        jz      @f
1974
        jz      @f
1975
        mov     ah, [panel_nscreens_color]
1975
        mov     ah, [panel_nscreens_color]
1976
        stosw
1976
        stosw
1977
        jmp     @b
1977
        jmp     @b
1978
@@:
1978
@@:
1979
        mov     al, ']'
1979
        mov     al, ']'
1980
        mov     ah, [panel_nscreens_color]
1980
        mov     ah, [panel_nscreens_color]
1981
        stosw
1981
        stosw
1982
.ret2:
1982
.ret2:
1983
        ret
1983
        ret
1984
 
1984
 
1985
;insert_last_dot:
1985
;insert_last_dot:
1986
;        push    eax esi
1986
;        push    eax esi
1987
;        mov     ah, 0
1987
;        mov     ah, 0
1988
;.loop:
1988
;.loop:
1989
;        lodsb
1989
;        lodsb
1990
;        test    al, al
1990
;        test    al, al
1991
;        jz      .done
1991
;        jz      .done
1992
;        cmp     al, '.'
1992
;        cmp     al, '.'
1993
;        jnz     .loop
1993
;        jnz     .loop
1994
;        mov     ah, 1
1994
;        mov     ah, 1
1995
;        jmp     .loop
1995
;        jmp     .loop
1996
;.done:
1996
;.done:
1997
;        test    ah, ah
1997
;        test    ah, ah
1998
;        jnz     @f
1998
;        jnz     @f
1999
;        mov     byte [esi-1], '.'
1999
;        mov     byte [esi-1], '.'
2000
;        mov     byte [esi], 0
2000
;        mov     byte [esi], 0
2001
;@@:
2001
;@@:
2002
;        pop     esi eax
2002
;        pop     esi eax
2003
;        ret
2003
;        ret
2004
 
2004
 
2005
;delete_last_dot:
2005
;delete_last_dot:
2006
;        push    esi
2006
;        push    esi
2007
;@@:
2007
;@@:
2008
;        cmp     byte [esi], 0
2008
;        cmp     byte [esi], 0
2009
;        jz      @f
2009
;        jz      @f
2010
;        inc     esi
2010
;        inc     esi
2011
;        jmp     @b
2011
;        jmp     @b
2012
;@@:
2012
;@@:
2013
;        cmp     byte [esi-1], '.'
2013
;        cmp     byte [esi-1], '.'
2014
;        jnz     @f
2014
;        jnz     @f
2015
;        mov     byte [esi-1], 0
2015
;        mov     byte [esi-1], 0
2016
;@@:     pop     esi
2016
;@@:     pop     esi
2017
;        ret
2017
;        ret
2018
 
2018
 
2019
read_folder:
2019
read_folder:
2020
        mov     eax, [ebp + panel1_nfa - panel1_data]
2020
        mov     eax, [ebp + panel1_nfa - panel1_data]
2021
        mov     [dirinfo.size], eax
2021
        mov     [dirinfo.size], eax
2022
        shl     eax, 2
2022
        shl     eax, 2
2023
        add     eax, [ebp + panel1_files - panel1_data]
2023
        add     eax, [ebp + panel1_files - panel1_data]
2024
        mov     [dirinfo.dirdata], eax
2024
        mov     [dirinfo.dirdata], eax
2025
        lea     eax, [ebp + panel1_dir - panel1_data]
2025
        lea     eax, [ebp + panel1_dir - panel1_data]
2026
        mov     [dirinfo.name], eax
2026
        mov     [dirinfo.name], eax
2027
        push    70
2027
        push    70
2028
        pop     eax
2028
        pop     eax
2029
        mov     ebx, dirinfo
2029
        mov     ebx, dirinfo
2030
        int     40h
2030
        int     40h
2031
        test    eax, eax
2031
        test    eax, eax
2032
        jz      .ok
2032
        jz      .ok
2033
        cmp     eax, 6
2033
        cmp     eax, 6
2034
        jz      .ok
2034
        jz      .ok
2035
; TODO: add error handling
2035
; TODO: add error handling
2036
        mov     [ebp + panel1_numfiles - panel1_data], 2
2036
        mov     [ebp + panel1_numfiles - panel1_data], 2
2037
        mov     eax, [ebp + panel1_nfa - panel1_data]
2037
        mov     eax, [ebp + panel1_nfa - panel1_data]
2038
        shl     eax, 2
2038
        shl     eax, 2
2039
        add     eax, [ebp + panel1_files - panel1_data]
2039
        add     eax, [ebp + panel1_files - panel1_data]
2040
        add     eax, 32+40
2040
        add     eax, 32+40
2041
        mov     word [eax], '..'
2041
        mov     word [eax], '..'
2042
        mov     byte [eax+2], 0
2042
        mov     byte [eax+2], 0
2043
        add     eax, 304
2043
        add     eax, 304
2044
        mov     dword [eax], 'Read'
2044
        mov     dword [eax], 'Read'
2045
        mov     dword [eax+4], ' err'
2045
        mov     dword [eax+4], ' err'
2046
        mov     dword [eax+8], 'or'
2046
        mov     dword [eax+8], 'or'
2047
        mov     eax, [ebp + panel1_files - panel1_data]
2047
        mov     eax, [ebp + panel1_files - panel1_data]
2048
        mov     dword [eax], 0
2048
        mov     dword [eax], 0
2049
        mov     dword [eax+4], 304
2049
        mov     dword [eax+4], 304
2050
        and     dword [ebp + panel1_index - panel1_data], 0
2050
        and     dword [ebp + panel1_index - panel1_data], 0
2051
        and     dword [ebp + panel1_start - panel1_data], 0
2051
        and     dword [ebp + panel1_start - panel1_data], 0
2052
        ret
2052
        ret
2053
.ok:
2053
.ok:
2054
        mov     eax, [dirinfo.dirdata]
2054
        mov     eax, [dirinfo.dirdata]
2055
        cmp     [eax+8], ebx
2055
        cmp     [eax+8], ebx
2056
        jz      .readdone
2056
        jz      .readdone
2057
        push    eax
2057
        push    eax
2058
        mov     eax, [ebp + panel1_files - panel1_data]
2058
        mov     eax, [ebp + panel1_files - panel1_data]
2059
        cmp     eax, buf1
2059
        cmp     eax, buf1
2060
        jz      @f
2060
        jz      @f
2061
        cmp     eax, buf2
2061
        cmp     eax, buf2
2062
        jz      @f
2062
        jz      @f
2063
        call    mf_free
2063
        call    mf_free
2064
@@:
2064
@@:
2065
        pop     eax
2065
        pop     eax
2066
        mov     eax, [eax+8]
2066
        mov     eax, [eax+8]
2067
        add     eax, 0xF
2067
        add     eax, 0xF
2068
        and     eax, not 0xF
2068
        and     eax, not 0xF
2069
        push    eax
2069
        push    eax
2070
        imul    eax, 4+304
2070
        imul    eax, 4+304
2071
        add     eax, 32
2071
        add     eax, 32
2072
        call    mf_alloc
2072
        call    mf_alloc
2073
        test    eax, eax
2073
        test    eax, eax
2074
        jnz     .succ1
2074
        jnz     .succ1
2075
        pop     eax
2075
        pop     eax
2076
; TODO: add error handling
2076
; TODO: add error handling
2077
        jmp     .readdone
2077
        jmp     .readdone
2078
.succ1:
2078
.succ1:
2079
        mov     [ebp + panel1_files - panel1_data], eax
2079
        mov     [ebp + panel1_files - panel1_data], eax
2080
        pop     [ebp + panel1_nfa - panel1_data]
2080
        pop     [ebp + panel1_nfa - panel1_data]
2081
        jmp     read_folder
2081
        jmp     read_folder
2082
.readdone:
2082
.readdone:
2083
        and     [ebp + panel1_start - panel1_data], 0
2083
        and     [ebp + panel1_start - panel1_data], 0
2084
        and     [ebp + panel1_index - panel1_data], 0
2084
        and     [ebp + panel1_index - panel1_data], 0
2085
        and     [ebp + panel1_start - panel1_data], 0
2085
        and     [ebp + panel1_start - panel1_data], 0
2086
        mov     edi, [ebp + panel1_files - panel1_data]
2086
        mov     edi, [ebp + panel1_files - panel1_data]
2087
        mov     eax, [ebp + panel1_nfa - panel1_data]
2087
        mov     eax, [ebp + panel1_nfa - panel1_data]
2088
        lea     esi, [edi + eax*4 + 32]
2088
        lea     esi, [edi + eax*4 + 32]
2089
        xor     eax, eax
2089
        xor     eax, eax
2090
        mov     ecx, [esi-32+4]
2090
        mov     ecx, [esi-32+4]
2091
        jecxz   .loopdone
2091
        jecxz   .loopdone
2092
; ˆ£­®à¨à㥬 ᯥ樠«ì­ë¥ ¢å®¤ë, ᮮ⢥âáâ¢ãî騥 ¯ ¯ª¥ '.' ¨ ¬¥âª¥ ⮬ 
2092
; ˆ£­®à¨à㥬 ᯥ樠«ì­ë¥ ¢å®¤ë, ᮮ⢥âáâ¢ãî騥 ¯ ¯ª¥ '.' ¨ ¬¥âª¥ ⮬ 
2093
.ptrinit:
2093
.ptrinit:
2094
        cmp     word [esi+eax+40], '.'
2094
        cmp     word [esi+eax+40], '.'
2095
        jz      .loopcont
2095
        jz      .loopcont
2096
        test    byte [esi+eax], 8
2096
        test    byte [esi+eax], 8
2097
        jnz     .loopcont
2097
        jnz     .loopcont
2098
        stosd
2098
        stosd
2099
.loopcont:
2099
.loopcont:
2100
        add     eax, 304
2100
        add     eax, 304
2101
        loop    .ptrinit
2101
        loop    .ptrinit
2102
.loopdone:
2102
.loopdone:
2103
        sub     edi, [ebp + panel1_files - panel1_data]
2103
        sub     edi, [ebp + panel1_files - panel1_data]
2104
        shr     edi, 2
2104
        shr     edi, 2
2105
        mov     [ebp + panel1_numfiles - panel1_data], edi
2105
        mov     [ebp + panel1_numfiles - panel1_data], edi
2106
.done:
2106
.done:
2107
; ‘®àâ¨à®¢ª 
2107
; ‘®àâ¨à®¢ª 
2108
sort_files:
2108
sort_files:
2109
        movzx   eax, [ebp + panel1_sortmode - panel1_data]
2109
        movzx   eax, [ebp + panel1_sortmode - panel1_data]
2110
        mov     ebx, [compare_fns + eax*4]
2110
        mov     ebx, [compare_fns + eax*4]
2111
        mov     edx, [ebp + panel1_files - panel1_data]
2111
        mov     edx, [ebp + panel1_files - panel1_data]
2112
        mov     ecx, [ebp + panel1_numfiles - panel1_data]
2112
        mov     ecx, [ebp + panel1_numfiles - panel1_data]
2113
        call    sort
2113
        call    sort
2114
        ret
2114
        ret
2115
 
2115
 
2116
compare_name:
2116
compare_name:
2117
        push    eax
2117
        push    eax
2118
        mov     eax, [ebp + panel1_nfa - panel1_data]
2118
        mov     eax, [ebp + panel1_nfa - panel1_data]
2119
        add     esi, [ebp + panel1_files - panel1_data]
2119
        add     esi, [ebp + panel1_files - panel1_data]
2120
        add     edi, [ebp + panel1_files - panel1_data]
2120
        add     edi, [ebp + panel1_files - panel1_data]
2121
        lea     esi, [esi+eax*4+0x20]
2121
        lea     esi, [esi+eax*4+0x20]
2122
        lea     edi, [edi+eax*4+0x20]
2122
        lea     edi, [edi+eax*4+0x20]
2123
        pop     eax
2123
        pop     eax
2124
        cmp     word [esi+40], '..'
2124
        cmp     word [esi+40], '..'
2125
        jnz     @f
2125
        jnz     @f
2126
        cmp     byte [esi+42], 0
2126
        cmp     byte [esi+42], 0
2127
        jz      .less
2127
        jz      .less
2128
@@:     cmp     word [edi+40], '..'
2128
@@:     cmp     word [edi+40], '..'
2129
        jnz     @f
2129
        jnz     @f
2130
        cmp     byte [edi+42], 0
2130
        cmp     byte [edi+42], 0
2131
        jz      .greater
2131
        jz      .greater
2132
@@:
2132
@@:
2133
        test    byte [esi], 10h
2133
        test    byte [esi], 10h
2134
        jnz     .1dir
2134
        jnz     .1dir
2135
        test    byte [edi], 10h
2135
        test    byte [edi], 10h
2136
        jnz     .greater
2136
        jnz     .greater
2137
.eq1:
2137
.eq1:
2138
        add     esi, 40
2138
        add     esi, 40
2139
        add     edi, 40
2139
        add     edi, 40
2140
        jmp     strcmpi
2140
        jmp     strcmpi
2141
.greater:
2141
.greater:
2142
        test    esi, esi
2142
        test    esi, esi
2143
        ret
2143
        ret
2144
.1dir:
2144
.1dir:
2145
        test    byte [edi], 10h
2145
        test    byte [edi], 10h
2146
        jnz     .eq1
2146
        jnz     .eq1
2147
.less:
2147
.less:
2148
        xor     edi, edi
2148
        xor     edi, edi
2149
        stc
2149
        stc
2150
        ret
2150
        ret
2151
 
2151
 
2152
compare_name_rev:
2152
compare_name_rev:
2153
        push    eax
2153
        push    eax
2154
        mov     eax, [ebp + panel1_nfa - panel1_data]
2154
        mov     eax, [ebp + panel1_nfa - panel1_data]
2155
        add     esi, [ebp + panel1_files - panel1_data]
2155
        add     esi, [ebp + panel1_files - panel1_data]
2156
        add     edi, [ebp + panel1_files - panel1_data]
2156
        add     edi, [ebp + panel1_files - panel1_data]
2157
        lea     esi, [esi+eax*4+0x20]
2157
        lea     esi, [esi+eax*4+0x20]
2158
        lea     edi, [edi+eax*4+0x20]
2158
        lea     edi, [edi+eax*4+0x20]
2159
        pop     eax
2159
        pop     eax
2160
        cmp     word [esi+40], '..'
2160
        cmp     word [esi+40], '..'
2161
        jnz     @f
2161
        jnz     @f
2162
        cmp     byte [esi+42], 0
2162
        cmp     byte [esi+42], 0
2163
        jz      .less
2163
        jz      .less
2164
@@:     cmp     word [edi+40], '..'
2164
@@:     cmp     word [edi+40], '..'
2165
        jnz     @f
2165
        jnz     @f
2166
        cmp     byte [edi+42], 0
2166
        cmp     byte [edi+42], 0
2167
        jz      .greater
2167
        jz      .greater
2168
@@:
2168
@@:
2169
        test    byte [esi], 10h
2169
        test    byte [esi], 10h
2170
        jnz     .1dir
2170
        jnz     .1dir
2171
        test    byte [edi], 10h
2171
        test    byte [edi], 10h
2172
        jnz     .greater
2172
        jnz     .greater
2173
.eq1:
2173
.eq1:
2174
        add     esi, 40
2174
        add     esi, 40
2175
        add     edi, 40
2175
        add     edi, 40
2176
        xchg    esi, edi
2176
        xchg    esi, edi
2177
        jmp     strcmpi
2177
        jmp     strcmpi
2178
.greater:
2178
.greater:
2179
        test    esi, esi
2179
        test    esi, esi
2180
        ret
2180
        ret
2181
.1dir:
2181
.1dir:
2182
        test    byte [edi], 10h
2182
        test    byte [edi], 10h
2183
        jnz     .eq1
2183
        jnz     .eq1
2184
.less:
2184
.less:
2185
        xor     edi, edi
2185
        xor     edi, edi
2186
        stc
2186
        stc
2187
        ret
2187
        ret
2188
 
2188
 
2189
strcmpi:
2189
strcmpi:
2190
        push    eax
2190
        push    eax
2191
@@:
2191
@@:
2192
        lodsb
2192
        lodsb
2193
        call    match_symbol
2193
        call    match_symbol
2194
        jnz     .ret
2194
        jnz     .ret
2195
        inc     edi
2195
        inc     edi
2196
        test    al, al
2196
        test    al, al
2197
        jnz     @b
2197
        jnz     @b
2198
.ret:
2198
.ret:
2199
        pop     eax
2199
        pop     eax
2200
        ret
2200
        ret
2201
 
2201
 
2202
compare_ext:
2202
compare_ext:
2203
        push    eax
2203
        push    eax
2204
        mov     eax, [ebp + panel1_nfa - panel1_data]
2204
        mov     eax, [ebp + panel1_nfa - panel1_data]
2205
        add     esi, [ebp + panel1_files - panel1_data]
2205
        add     esi, [ebp + panel1_files - panel1_data]
2206
        add     edi, [ebp + panel1_files - panel1_data]
2206
        add     edi, [ebp + panel1_files - panel1_data]
2207
        lea     esi, [esi+eax*4+0x20]
2207
        lea     esi, [esi+eax*4+0x20]
2208
        lea     edi, [edi+eax*4+0x20]
2208
        lea     edi, [edi+eax*4+0x20]
2209
        pop     eax
2209
        pop     eax
2210
        cmp     word [esi+40], '..'
2210
        cmp     word [esi+40], '..'
2211
        jnz     @f
2211
        jnz     @f
2212
        cmp     byte [esi+42], 0
2212
        cmp     byte [esi+42], 0
2213
        jz      .less
2213
        jz      .less
2214
@@:     cmp     word [edi+40], '..'
2214
@@:     cmp     word [edi+40], '..'
2215
        jnz     @f
2215
        jnz     @f
2216
        cmp     byte [edi+42], 0
2216
        cmp     byte [edi+42], 0
2217
        jz      .greater
2217
        jz      .greater
2218
@@:
2218
@@:
2219
        test    byte [esi], 10h
2219
        test    byte [esi], 10h
2220
        jnz     .1dir
2220
        jnz     .1dir
2221
        test    byte [edi], 10h
2221
        test    byte [edi], 10h
2222
        jnz     .greater
2222
        jnz     .greater
2223
.eq1:
2223
.eq1:
2224
        add     esi, 40
2224
        add     esi, 40
2225
        add     edi, 40
2225
        add     edi, 40
2226
        push    esi edi
2226
        push    esi edi
2227
        call    seek_ext
2227
        call    seek_ext
2228
        xchg    esi, edi
2228
        xchg    esi, edi
2229
        call    seek_ext
2229
        call    seek_ext
2230
        xchg    esi, edi
2230
        xchg    esi, edi
2231
        call    strcmpi
2231
        call    strcmpi
2232
        jnz     .ret
2232
        jnz     .ret
2233
        pop     edi esi
2233
        pop     edi esi
2234
        jmp     strcmpi
2234
        jmp     strcmpi
2235
.ret:
2235
.ret:
2236
        pop     edi esi
2236
        pop     edi esi
2237
        ret
2237
        ret
2238
.greater:
2238
.greater:
2239
        test    esi, esi
2239
        test    esi, esi
2240
        ret
2240
        ret
2241
.1dir:
2241
.1dir:
2242
        test    byte [edi], 10h
2242
        test    byte [edi], 10h
2243
        jnz     .eq1
2243
        jnz     .eq1
2244
.less:
2244
.less:
2245
        xor     edi, edi
2245
        xor     edi, edi
2246
        stc
2246
        stc
2247
        ret
2247
        ret
2248
 
2248
 
2249
compare_ext_rev:
2249
compare_ext_rev:
2250
        push    eax
2250
        push    eax
2251
        mov     eax, [ebp + panel1_nfa - panel1_data]
2251
        mov     eax, [ebp + panel1_nfa - panel1_data]
2252
        add     esi, [ebp + panel1_files - panel1_data]
2252
        add     esi, [ebp + panel1_files - panel1_data]
2253
        add     edi, [ebp + panel1_files - panel1_data]
2253
        add     edi, [ebp + panel1_files - panel1_data]
2254
        lea     esi, [esi+eax*4+0x20]
2254
        lea     esi, [esi+eax*4+0x20]
2255
        lea     edi, [edi+eax*4+0x20]
2255
        lea     edi, [edi+eax*4+0x20]
2256
        pop     eax
2256
        pop     eax
2257
        cmp     word [esi+40], '..'
2257
        cmp     word [esi+40], '..'
2258
        jnz     @f
2258
        jnz     @f
2259
        cmp     byte [esi+42], 0
2259
        cmp     byte [esi+42], 0
2260
        jz      .less
2260
        jz      .less
2261
@@:     cmp     word [edi+40], '..'
2261
@@:     cmp     word [edi+40], '..'
2262
        jnz     @f
2262
        jnz     @f
2263
        cmp     byte [edi+42], 0
2263
        cmp     byte [edi+42], 0
2264
        jz      .greater
2264
        jz      .greater
2265
@@:
2265
@@:
2266
        test    byte [esi], 10h
2266
        test    byte [esi], 10h
2267
        jnz     .1dir
2267
        jnz     .1dir
2268
        test    byte [edi], 10h
2268
        test    byte [edi], 10h
2269
        jnz     .greater
2269
        jnz     .greater
2270
.eq1:
2270
.eq1:
2271
        add     esi, 40
2271
        add     esi, 40
2272
        add     edi, 40
2272
        add     edi, 40
2273
        push    esi edi
2273
        push    esi edi
2274
        call    seek_ext
2274
        call    seek_ext
2275
        xchg    esi, edi
2275
        xchg    esi, edi
2276
        call    seek_ext
2276
        call    seek_ext
2277
        call    strcmpi
2277
        call    strcmpi
2278
        jnz     .ret
2278
        jnz     .ret
2279
        pop     edi esi
2279
        pop     edi esi
2280
        xchg    esi, edi
2280
        xchg    esi, edi
2281
        jmp     strcmpi
2281
        jmp     strcmpi
2282
.ret:
2282
.ret:
2283
        pop     edi esi
2283
        pop     edi esi
2284
        ret
2284
        ret
2285
.greater:
2285
.greater:
2286
        test    esi, esi
2286
        test    esi, esi
2287
        ret
2287
        ret
2288
.1dir:
2288
.1dir:
2289
        test    byte [edi], 10h
2289
        test    byte [edi], 10h
2290
        jnz     .eq1
2290
        jnz     .eq1
2291
.less:
2291
.less:
2292
        xor     edi, edi
2292
        xor     edi, edi
2293
        stc
2293
        stc
2294
        ret
2294
        ret
2295
 
2295
 
2296
seek_ext:
2296
seek_ext:
2297
        push    eax
2297
        push    eax
2298
        xor     eax, eax
2298
        xor     eax, eax
2299
.l:
2299
.l:
2300
        inc     esi
2300
        inc     esi
2301
        cmp     byte [esi-1], '.'
2301
        cmp     byte [esi-1], '.'
2302
        jnz     @f
2302
        jnz     @f
2303
        mov     eax, esi
2303
        mov     eax, esi
2304
@@:
2304
@@:
2305
        cmp     byte [esi-1], 0
2305
        cmp     byte [esi-1], 0
2306
        jnz     .l
2306
        jnz     .l
2307
        test    eax, eax
2307
        test    eax, eax
2308
        jnz     @f
2308
        jnz     @f
2309
        lea     eax, [esi-1]
2309
        lea     eax, [esi-1]
2310
@@:
2310
@@:
2311
        mov     esi, eax
2311
        mov     esi, eax
2312
        pop     eax
2312
        pop     eax
2313
        ret
2313
        ret
2314
 
2314
 
2315
compare_modified:
2315
compare_modified:
2316
        push    eax
2316
        push    eax
2317
        mov     eax, [ebp + panel1_nfa - panel1_data]
2317
        mov     eax, [ebp + panel1_nfa - panel1_data]
2318
        add     esi, [ebp + panel1_files - panel1_data]
2318
        add     esi, [ebp + panel1_files - panel1_data]
2319
        add     edi, [ebp + panel1_files - panel1_data]
2319
        add     edi, [ebp + panel1_files - panel1_data]
2320
        lea     esi, [esi+eax*4+0x20]
2320
        lea     esi, [esi+eax*4+0x20]
2321
        lea     edi, [edi+eax*4+0x20]
2321
        lea     edi, [edi+eax*4+0x20]
2322
        pop     eax
2322
        pop     eax
2323
        cmp     word [esi+40], '..'
2323
        cmp     word [esi+40], '..'
2324
        jnz     @f
2324
        jnz     @f
2325
        cmp     byte [esi+42], 0
2325
        cmp     byte [esi+42], 0
2326
        jz      .less
2326
        jz      .less
2327
@@:     cmp     word [edi+40], '..'
2327
@@:     cmp     word [edi+40], '..'
2328
        jnz     @f
2328
        jnz     @f
2329
        cmp     byte [edi+42], 0
2329
        cmp     byte [edi+42], 0
2330
        jz      .greater
2330
        jz      .greater
2331
@@:
2331
@@:
2332
        test    byte [esi], 10h
2332
        test    byte [esi], 10h
2333
        jnz     .1dir
2333
        jnz     .1dir
2334
        test    byte [edi], 10h
2334
        test    byte [edi], 10h
2335
        jnz     .greater
2335
        jnz     .greater
2336
.eq1:
2336
.eq1:
2337
        push    edi
2337
        push    edi
2338
        mov     edi, [edi+28]
2338
        mov     edi, [edi+28]
2339
        cmp     edi, [esi+28]
2339
        cmp     edi, [esi+28]
2340
        pop     edi
2340
        pop     edi
2341
        jnz     @f
2341
        jnz     @f
2342
        push    edi
2342
        push    edi
2343
        mov     edi, [edi+24]
2343
        mov     edi, [edi+24]
2344
        cmp     edi, [esi+24]
2344
        cmp     edi, [esi+24]
2345
        pop     edi
2345
        pop     edi
2346
        jnz     @f
2346
        jnz     @f
2347
        add     esi, 40
2347
        add     esi, 40
2348
        add     edi, 40
2348
        add     edi, 40
2349
        jmp     strcmpi
2349
        jmp     strcmpi
2350
@@:
2350
@@:
2351
        ret
2351
        ret
2352
.greater:
2352
.greater:
2353
        test    esi, esi
2353
        test    esi, esi
2354
        ret
2354
        ret
2355
.1dir:
2355
.1dir:
2356
        test    byte [edi], 10h
2356
        test    byte [edi], 10h
2357
        jnz     .eq1
2357
        jnz     .eq1
2358
.less:
2358
.less:
2359
        xor     edi, edi
2359
        xor     edi, edi
2360
        stc
2360
        stc
2361
        ret
2361
        ret
2362
 
2362
 
2363
compare_modified_rev:
2363
compare_modified_rev:
2364
        push    eax
2364
        push    eax
2365
        mov     eax, [ebp + panel1_nfa - panel1_data]
2365
        mov     eax, [ebp + panel1_nfa - panel1_data]
2366
        add     esi, [ebp + panel1_files - panel1_data]
2366
        add     esi, [ebp + panel1_files - panel1_data]
2367
        add     edi, [ebp + panel1_files - panel1_data]
2367
        add     edi, [ebp + panel1_files - panel1_data]
2368
        lea     esi, [esi+eax*4+0x20]
2368
        lea     esi, [esi+eax*4+0x20]
2369
        lea     edi, [edi+eax*4+0x20]
2369
        lea     edi, [edi+eax*4+0x20]
2370
        pop     eax
2370
        pop     eax
2371
        cmp     word [esi+40], '..'
2371
        cmp     word [esi+40], '..'
2372
        jnz     @f
2372
        jnz     @f
2373
        cmp     byte [esi+42], 0
2373
        cmp     byte [esi+42], 0
2374
        jz      .less
2374
        jz      .less
2375
@@:     cmp     word [edi+40], '..'
2375
@@:     cmp     word [edi+40], '..'
2376
        jnz     @f
2376
        jnz     @f
2377
        cmp     byte [edi+42], 0
2377
        cmp     byte [edi+42], 0
2378
        jz      .greater
2378
        jz      .greater
2379
@@:
2379
@@:
2380
        test    byte [esi], 10h
2380
        test    byte [esi], 10h
2381
        jnz     .1dir
2381
        jnz     .1dir
2382
        test    byte [edi], 10h
2382
        test    byte [edi], 10h
2383
        jnz     .greater
2383
        jnz     .greater
2384
.eq1:
2384
.eq1:
2385
        push    esi
2385
        push    esi
2386
        mov     esi, [esi+28]
2386
        mov     esi, [esi+28]
2387
        cmp     esi, [edi+28]
2387
        cmp     esi, [edi+28]
2388
        pop     esi
2388
        pop     esi
2389
        jnz     @f
2389
        jnz     @f
2390
        push    esi
2390
        push    esi
2391
        mov     esi, [esi+24]
2391
        mov     esi, [esi+24]
2392
        cmp     esi, [edi+24]
2392
        cmp     esi, [edi+24]
2393
        pop     esi
2393
        pop     esi
2394
        jnz     @f
2394
        jnz     @f
2395
        add     esi, 40
2395
        add     esi, 40
2396
        add     edi, 40
2396
        add     edi, 40
2397
        xchg    esi, edi
2397
        xchg    esi, edi
2398
        jmp     strcmpi
2398
        jmp     strcmpi
2399
@@:
2399
@@:
2400
        ret
2400
        ret
2401
.greater:
2401
.greater:
2402
        test    esi, esi
2402
        test    esi, esi
2403
        ret
2403
        ret
2404
.1dir:
2404
.1dir:
2405
        test    byte [edi], 10h
2405
        test    byte [edi], 10h
2406
        jnz     .eq1
2406
        jnz     .eq1
2407
.less:
2407
.less:
2408
        xor     edi, edi
2408
        xor     edi, edi
2409
        stc
2409
        stc
2410
        ret
2410
        ret
2411
 
2411
 
2412
compare_size:
2412
compare_size:
2413
        push    eax
2413
        push    eax
2414
        mov     eax, [ebp + panel1_nfa - panel1_data]
2414
        mov     eax, [ebp + panel1_nfa - panel1_data]
2415
        add     esi, [ebp + panel1_files - panel1_data]
2415
        add     esi, [ebp + panel1_files - panel1_data]
2416
        add     edi, [ebp + panel1_files - panel1_data]
2416
        add     edi, [ebp + panel1_files - panel1_data]
2417
        lea     esi, [esi+eax*4+0x20]
2417
        lea     esi, [esi+eax*4+0x20]
2418
        lea     edi, [edi+eax*4+0x20]
2418
        lea     edi, [edi+eax*4+0x20]
2419
        pop     eax
2419
        pop     eax
2420
        cmp     word [esi+40], '..'
2420
        cmp     word [esi+40], '..'
2421
        jnz     @f
2421
        jnz     @f
2422
        cmp     byte [esi+42], 0
2422
        cmp     byte [esi+42], 0
2423
        jz      .less
2423
        jz      .less
2424
@@:     cmp     word [edi+40], '..'
2424
@@:     cmp     word [edi+40], '..'
2425
        jnz     @f
2425
        jnz     @f
2426
        cmp     byte [edi+42], 0
2426
        cmp     byte [edi+42], 0
2427
        jz      .greater
2427
        jz      .greater
2428
@@:
2428
@@:
2429
        test    byte [esi], 10h
2429
        test    byte [esi], 10h
2430
        jnz     .1dir
2430
        jnz     .1dir
2431
        test    byte [edi], 10h
2431
        test    byte [edi], 10h
2432
        jnz     .greater
2432
        jnz     .greater
2433
.eq1:
2433
.eq1:
2434
        push    edi
2434
        push    edi
2435
        mov     edi, [edi+36]
2435
        mov     edi, [edi+36]
2436
        cmp     edi, [esi+36]
2436
        cmp     edi, [esi+36]
2437
        pop     edi
2437
        pop     edi
2438
        jnz     @f
2438
        jnz     @f
2439
        push    edi
2439
        push    edi
2440
        mov     edi, [edi+32]
2440
        mov     edi, [edi+32]
2441
        cmp     edi, [esi+32]
2441
        cmp     edi, [esi+32]
2442
        pop     edi
2442
        pop     edi
2443
        jnz     @f
2443
        jnz     @f
2444
        add     esi, 40
2444
        add     esi, 40
2445
        add     edi, 40
2445
        add     edi, 40
2446
        jmp     strcmpi
2446
        jmp     strcmpi
2447
@@:
2447
@@:
2448
        ret
2448
        ret
2449
.greater:
2449
.greater:
2450
        test    esi, esi
2450
        test    esi, esi
2451
        ret
2451
        ret
2452
.1dir:
2452
.1dir:
2453
        test    byte [edi], 10h
2453
        test    byte [edi], 10h
2454
        jnz     .eq1
2454
        jnz     .eq1
2455
.less:
2455
.less:
2456
        xor     edi, edi
2456
        xor     edi, edi
2457
        stc
2457
        stc
2458
        ret
2458
        ret
2459
 
2459
 
2460
compare_size_rev:
2460
compare_size_rev:
2461
        push    eax
2461
        push    eax
2462
        mov     eax, [ebp + panel1_nfa - panel1_data]
2462
        mov     eax, [ebp + panel1_nfa - panel1_data]
2463
        add     esi, [ebp + panel1_files - panel1_data]
2463
        add     esi, [ebp + panel1_files - panel1_data]
2464
        add     edi, [ebp + panel1_files - panel1_data]
2464
        add     edi, [ebp + panel1_files - panel1_data]
2465
        lea     esi, [esi+eax*4+0x20]
2465
        lea     esi, [esi+eax*4+0x20]
2466
        lea     edi, [edi+eax*4+0x20]
2466
        lea     edi, [edi+eax*4+0x20]
2467
        pop     eax
2467
        pop     eax
2468
        cmp     word [esi+40], '..'
2468
        cmp     word [esi+40], '..'
2469
        jnz     @f
2469
        jnz     @f
2470
        cmp     byte [esi+42], 0
2470
        cmp     byte [esi+42], 0
2471
        jz      .less
2471
        jz      .less
2472
@@:     cmp     word [edi+40], '..'
2472
@@:     cmp     word [edi+40], '..'
2473
        jnz     @f
2473
        jnz     @f
2474
        cmp     byte [edi+42], 0
2474
        cmp     byte [edi+42], 0
2475
        jz      .greater
2475
        jz      .greater
2476
@@:
2476
@@:
2477
        test    byte [esi], 10h
2477
        test    byte [esi], 10h
2478
        jnz     .1dir
2478
        jnz     .1dir
2479
        test    byte [edi], 10h
2479
        test    byte [edi], 10h
2480
        jnz     .greater
2480
        jnz     .greater
2481
.eq1:
2481
.eq1:
2482
        push    esi
2482
        push    esi
2483
        mov     esi, [esi+36]
2483
        mov     esi, [esi+36]
2484
        cmp     esi, [edi+36]
2484
        cmp     esi, [edi+36]
2485
        pop     esi
2485
        pop     esi
2486
        jnz     @f
2486
        jnz     @f
2487
        push    esi
2487
        push    esi
2488
        mov     esi, [esi+32]
2488
        mov     esi, [esi+32]
2489
        cmp     esi, [edi+32]
2489
        cmp     esi, [edi+32]
2490
        pop     esi
2490
        pop     esi
2491
        jnz     @f
2491
        jnz     @f
2492
        add     esi, 40
2492
        add     esi, 40
2493
        add     edi, 40
2493
        add     edi, 40
2494
        xchg    esi, edi
2494
        xchg    esi, edi
2495
        jmp     strcmpi
2495
        jmp     strcmpi
2496
@@:
2496
@@:
2497
        ret
2497
        ret
2498
.greater:
2498
.greater:
2499
        test    esi, esi
2499
        test    esi, esi
2500
        ret
2500
        ret
2501
.1dir:
2501
.1dir:
2502
        test    byte [edi], 10h
2502
        test    byte [edi], 10h
2503
        jnz     .eq1
2503
        jnz     .eq1
2504
.less:
2504
.less:
2505
        xor     edi, edi
2505
        xor     edi, edi
2506
        stc
2506
        stc
2507
        ret
2507
        ret
2508
 
2508
 
2509
compare_unordered:
2509
compare_unordered:
2510
        cmp     esi, edi
2510
        cmp     esi, edi
2511
        ret
2511
        ret
2512
compare_unordered_rev:
2512
compare_unordered_rev:
2513
        push    eax
2513
        push    eax
2514
        mov     eax, [ebp + panel1_nfa - panel1_data]
2514
        mov     eax, [ebp + panel1_nfa - panel1_data]
2515
        add     esi, [ebp + panel1_files - panel1_data]
2515
        add     esi, [ebp + panel1_files - panel1_data]
2516
        add     edi, [ebp + panel1_files - panel1_data]
2516
        add     edi, [ebp + panel1_files - panel1_data]
2517
        lea     esi, [esi+eax*4+0x20]
2517
        lea     esi, [esi+eax*4+0x20]
2518
        lea     edi, [edi+eax*4+0x20]
2518
        lea     edi, [edi+eax*4+0x20]
2519
        pop     eax
2519
        pop     eax
2520
        cmp     word [esi+40], '..'
2520
        cmp     word [esi+40], '..'
2521
        jnz     @f
2521
        jnz     @f
2522
        cmp     byte [esi+42], 0
2522
        cmp     byte [esi+42], 0
2523
        jz      .less
2523
        jz      .less
2524
@@:     cmp     word [edi+40], '..'
2524
@@:     cmp     word [edi+40], '..'
2525
        jnz     @f
2525
        jnz     @f
2526
        cmp     byte [edi+42], 0
2526
        cmp     byte [edi+42], 0
2527
        jz      .greater
2527
        jz      .greater
2528
@@:
2528
@@:
2529
        cmp     edi, esi
2529
        cmp     edi, esi
2530
        ret
2530
        ret
2531
.greater:
2531
.greater:
2532
        test    esi, esi
2532
        test    esi, esi
2533
        ret
2533
        ret
2534
.less:
2534
.less:
2535
        xor     edi, edi
2535
        xor     edi, edi
2536
        stc
2536
        stc
2537
        ret
2537
        ret
2538
 
2538
 
2539
compare_created:
2539
compare_created:
2540
        push    eax
2540
        push    eax
2541
        mov     eax, [ebp + panel1_nfa - panel1_data]
2541
        mov     eax, [ebp + panel1_nfa - panel1_data]
2542
        add     esi, [ebp + panel1_files - panel1_data]
2542
        add     esi, [ebp + panel1_files - panel1_data]
2543
        add     edi, [ebp + panel1_files - panel1_data]
2543
        add     edi, [ebp + panel1_files - panel1_data]
2544
        lea     esi, [esi+eax*4+0x20]
2544
        lea     esi, [esi+eax*4+0x20]
2545
        lea     edi, [edi+eax*4+0x20]
2545
        lea     edi, [edi+eax*4+0x20]
2546
        pop     eax
2546
        pop     eax
2547
        cmp     word [esi+40], '..'
2547
        cmp     word [esi+40], '..'
2548
        jnz     @f
2548
        jnz     @f
2549
        cmp     byte [esi+42], 0
2549
        cmp     byte [esi+42], 0
2550
        jz      .less
2550
        jz      .less
2551
@@:     cmp     word [edi+40], '..'
2551
@@:     cmp     word [edi+40], '..'
2552
        jnz     @f
2552
        jnz     @f
2553
        cmp     byte [edi+42], 0
2553
        cmp     byte [edi+42], 0
2554
        jz      .greater
2554
        jz      .greater
2555
@@:
2555
@@:
2556
        test    byte [esi], 10h
2556
        test    byte [esi], 10h
2557
        jnz     .1dir
2557
        jnz     .1dir
2558
        test    byte [edi], 10h
2558
        test    byte [edi], 10h
2559
        jnz     .greater
2559
        jnz     .greater
2560
.eq1:
2560
.eq1:
2561
        push    edi
2561
        push    edi
2562
        mov     edi, [edi+12]
2562
        mov     edi, [edi+12]
2563
        cmp     edi, [esi+12]
2563
        cmp     edi, [esi+12]
2564
        pop     edi
2564
        pop     edi
2565
        jnz     @f
2565
        jnz     @f
2566
        push    edi
2566
        push    edi
2567
        mov     edi, [edi+8]
2567
        mov     edi, [edi+8]
2568
        cmp     edi, [esi+8]
2568
        cmp     edi, [esi+8]
2569
        pop     edi
2569
        pop     edi
2570
        jnz     @f
2570
        jnz     @f
2571
        add     esi, 40
2571
        add     esi, 40
2572
        add     edi, 40
2572
        add     edi, 40
2573
        jmp     strcmpi
2573
        jmp     strcmpi
2574
@@:
2574
@@:
2575
        ret
2575
        ret
2576
.greater:
2576
.greater:
2577
        test    esi, esi
2577
        test    esi, esi
2578
        ret
2578
        ret
2579
.1dir:
2579
.1dir:
2580
        test    byte [edi], 10h
2580
        test    byte [edi], 10h
2581
        jnz     .eq1
2581
        jnz     .eq1
2582
.less:
2582
.less:
2583
        xor     edi, edi
2583
        xor     edi, edi
2584
        stc
2584
        stc
2585
        ret
2585
        ret
2586
 
2586
 
2587
compare_created_rev:
2587
compare_created_rev:
2588
        push    eax
2588
        push    eax
2589
        mov     eax, [ebp + panel1_nfa - panel1_data]
2589
        mov     eax, [ebp + panel1_nfa - panel1_data]
2590
        add     esi, [ebp + panel1_files - panel1_data]
2590
        add     esi, [ebp + panel1_files - panel1_data]
2591
        add     edi, [ebp + panel1_files - panel1_data]
2591
        add     edi, [ebp + panel1_files - panel1_data]
2592
        lea     esi, [esi+eax*4+0x20]
2592
        lea     esi, [esi+eax*4+0x20]
2593
        lea     edi, [edi+eax*4+0x20]
2593
        lea     edi, [edi+eax*4+0x20]
2594
        pop     eax
2594
        pop     eax
2595
        cmp     word [esi+40], '..'
2595
        cmp     word [esi+40], '..'
2596
        jnz     @f
2596
        jnz     @f
2597
        cmp     byte [esi+42], 0
2597
        cmp     byte [esi+42], 0
2598
        jz      .less
2598
        jz      .less
2599
@@:     cmp     word [edi+40], '..'
2599
@@:     cmp     word [edi+40], '..'
2600
        jnz     @f
2600
        jnz     @f
2601
        cmp     byte [edi+42], 0
2601
        cmp     byte [edi+42], 0
2602
        jz      .greater
2602
        jz      .greater
2603
@@:
2603
@@:
2604
        test    byte [esi], 10h
2604
        test    byte [esi], 10h
2605
        jnz     .1dir
2605
        jnz     .1dir
2606
        test    byte [edi], 10h
2606
        test    byte [edi], 10h
2607
        jnz     .greater
2607
        jnz     .greater
2608
.eq1:
2608
.eq1:
2609
        push    esi
2609
        push    esi
2610
        mov     esi, [esi+12]
2610
        mov     esi, [esi+12]
2611
        cmp     esi, [edi+12]
2611
        cmp     esi, [edi+12]
2612
        pop     esi
2612
        pop     esi
2613
        jnz     @f
2613
        jnz     @f
2614
        push    esi
2614
        push    esi
2615
        mov     esi, [esi+8]
2615
        mov     esi, [esi+8]
2616
        cmp     esi, [edi+8]
2616
        cmp     esi, [edi+8]
2617
        pop     esi
2617
        pop     esi
2618
        jnz     @f
2618
        jnz     @f
2619
        add     esi, 40
2619
        add     esi, 40
2620
        add     edi, 40
2620
        add     edi, 40
2621
        xchg    esi, edi
2621
        xchg    esi, edi
2622
        jmp     strcmpi
2622
        jmp     strcmpi
2623
@@:
2623
@@:
2624
        ret
2624
        ret
2625
.greater:
2625
.greater:
2626
        test    esi, esi
2626
        test    esi, esi
2627
        ret
2627
        ret
2628
.1dir:
2628
.1dir:
2629
        test    byte [edi], 10h
2629
        test    byte [edi], 10h
2630
        jnz     .eq1
2630
        jnz     .eq1
2631
.less:
2631
.less:
2632
        xor     edi, edi
2632
        xor     edi, edi
2633
        stc
2633
        stc
2634
        ret
2634
        ret
2635
 
2635
 
2636
compare_accessed:
2636
compare_accessed:
2637
        push    eax
2637
        push    eax
2638
        mov     eax, [ebp + panel1_nfa - panel1_data]
2638
        mov     eax, [ebp + panel1_nfa - panel1_data]
2639
        add     esi, [ebp + panel1_files - panel1_data]
2639
        add     esi, [ebp + panel1_files - panel1_data]
2640
        add     edi, [ebp + panel1_files - panel1_data]
2640
        add     edi, [ebp + panel1_files - panel1_data]
2641
        lea     esi, [esi+eax*4+0x20]
2641
        lea     esi, [esi+eax*4+0x20]
2642
        lea     edi, [edi+eax*4+0x20]
2642
        lea     edi, [edi+eax*4+0x20]
2643
        pop     eax
2643
        pop     eax
2644
        cmp     word [esi+40], '..'
2644
        cmp     word [esi+40], '..'
2645
        jnz     @f
2645
        jnz     @f
2646
        cmp     byte [esi+42], 0
2646
        cmp     byte [esi+42], 0
2647
        jz      .less
2647
        jz      .less
2648
@@:     cmp     word [edi+40], '..'
2648
@@:     cmp     word [edi+40], '..'
2649
        jnz     @f
2649
        jnz     @f
2650
        cmp     byte [edi+42], 0
2650
        cmp     byte [edi+42], 0
2651
        jz      .greater
2651
        jz      .greater
2652
@@:
2652
@@:
2653
        test    byte [esi], 10h
2653
        test    byte [esi], 10h
2654
        jnz     .1dir
2654
        jnz     .1dir
2655
        test    byte [edi], 10h
2655
        test    byte [edi], 10h
2656
        jnz     .greater
2656
        jnz     .greater
2657
.eq1:
2657
.eq1:
2658
        push    edi
2658
        push    edi
2659
        mov     edi, [edi+20]
2659
        mov     edi, [edi+20]
2660
        cmp     edi, [esi+20]
2660
        cmp     edi, [esi+20]
2661
        pop     edi
2661
        pop     edi
2662
        jnz     @f
2662
        jnz     @f
2663
        push    edi
2663
        push    edi
2664
        mov     edi, [edi+16]
2664
        mov     edi, [edi+16]
2665
        cmp     edi, [esi+16]
2665
        cmp     edi, [esi+16]
2666
        pop     edi
2666
        pop     edi
2667
        jnz     @f
2667
        jnz     @f
2668
        add     esi, 40
2668
        add     esi, 40
2669
        add     edi, 40
2669
        add     edi, 40
2670
        jmp     strcmpi
2670
        jmp     strcmpi
2671
@@:
2671
@@:
2672
        ret
2672
        ret
2673
.greater:
2673
.greater:
2674
        test    esi, esi
2674
        test    esi, esi
2675
        ret
2675
        ret
2676
.1dir:
2676
.1dir:
2677
        test    byte [edi], 10h
2677
        test    byte [edi], 10h
2678
        jnz     .eq1
2678
        jnz     .eq1
2679
.less:
2679
.less:
2680
        xor     edi, edi
2680
        xor     edi, edi
2681
        stc
2681
        stc
2682
        ret
2682
        ret
2683
 
2683
 
2684
compare_accessed_rev:
2684
compare_accessed_rev:
2685
        push    eax
2685
        push    eax
2686
        mov     eax, [ebp + panel1_nfa - panel1_data]
2686
        mov     eax, [ebp + panel1_nfa - panel1_data]
2687
        add     esi, [ebp + panel1_files - panel1_data]
2687
        add     esi, [ebp + panel1_files - panel1_data]
2688
        add     edi, [ebp + panel1_files - panel1_data]
2688
        add     edi, [ebp + panel1_files - panel1_data]
2689
        lea     esi, [esi+eax*4+0x20]
2689
        lea     esi, [esi+eax*4+0x20]
2690
        lea     edi, [edi+eax*4+0x20]
2690
        lea     edi, [edi+eax*4+0x20]
2691
        pop     eax
2691
        pop     eax
2692
        cmp     word [esi+40], '..'
2692
        cmp     word [esi+40], '..'
2693
        jnz     @f
2693
        jnz     @f
2694
        cmp     byte [esi+42], 0
2694
        cmp     byte [esi+42], 0
2695
        jz      .less
2695
        jz      .less
2696
@@:     cmp     word [edi+40], '..'
2696
@@:     cmp     word [edi+40], '..'
2697
        jnz     @f
2697
        jnz     @f
2698
        cmp     byte [edi+42], 0
2698
        cmp     byte [edi+42], 0
2699
        jz      .greater
2699
        jz      .greater
2700
@@:
2700
@@:
2701
        test    byte [esi], 10h
2701
        test    byte [esi], 10h
2702
        jnz     .1dir
2702
        jnz     .1dir
2703
        test    byte [edi], 10h
2703
        test    byte [edi], 10h
2704
        jnz     .greater
2704
        jnz     .greater
2705
.eq1:
2705
.eq1:
2706
        push    esi
2706
        push    esi
2707
        mov     esi, [esi+20]
2707
        mov     esi, [esi+20]
2708
        cmp     esi, [edi+20]
2708
        cmp     esi, [edi+20]
2709
        pop     esi
2709
        pop     esi
2710
        jnz     @f
2710
        jnz     @f
2711
        push    esi
2711
        push    esi
2712
        mov     esi, [esi+16]
2712
        mov     esi, [esi+16]
2713
        cmp     esi, [edi+16]
2713
        cmp     esi, [edi+16]
2714
        pop     esi
2714
        pop     esi
2715
        jnz     @f
2715
        jnz     @f
2716
        add     esi, 40
2716
        add     esi, 40
2717
        add     edi, 40
2717
        add     edi, 40
2718
        xchg    esi, edi
2718
        xchg    esi, edi
2719
        jmp     strcmpi
2719
        jmp     strcmpi
2720
@@:
2720
@@:
2721
        ret
2721
        ret
2722
.greater:
2722
.greater:
2723
        test    esi, esi
2723
        test    esi, esi
2724
        ret
2724
        ret
2725
.1dir:
2725
.1dir:
2726
        test    byte [edi], 10h
2726
        test    byte [edi], 10h
2727
        jnz     .eq1
2727
        jnz     .eq1
2728
.less:
2728
.less:
2729
        xor     edi, edi
2729
        xor     edi, edi
2730
        stc
2730
        stc
2731
        ret
2731
        ret
2732
 
2732
 
2733
match_mask:
2733
match_mask:
2734
; in: esi->name, edi->mask
2734
; in: esi->name, edi->mask
2735
; out: CF clear <=> match
2735
; out: CF clear <=> match
2736
        pusha
2736
        pusha
2737
        xchg    esi, edi
2737
        xchg    esi, edi
2738
.main_cycle:
2738
.main_cycle:
2739
        push    esi
2739
        push    esi
2740
@@:
2740
@@:
2741
        lodsb
2741
        lodsb
2742
        test    al, al
2742
        test    al, al
2743
        jz      @f
2743
        jz      @f
2744
        cmp     al, ','
2744
        cmp     al, ','
2745
        jz      @f
2745
        jz      @f
2746
        cmp     al, '|'
2746
        cmp     al, '|'
2747
        jnz     @b
2747
        jnz     @b
2748
@@:
2748
@@:
2749
        mov     [esi-1], byte 0
2749
        mov     [esi-1], byte 0
2750
        xchg    esi, [esp]
2750
        xchg    esi, [esp]
2751
        call    match_single_mask
2751
        call    match_single_mask
2752
        pop     esi
2752
        pop     esi
2753
        mov     [esi-1], al
2753
        mov     [esi-1], al
2754
        jnc     .found
2754
        jnc     .found
2755
        cmp     al, ','
2755
        cmp     al, ','
2756
        jz      .main_cycle
2756
        jz      .main_cycle
2757
.done_fail:
2757
.done_fail:
2758
        stc
2758
        stc
2759
        popa
2759
        popa
2760
        ret
2760
        ret
2761
.found:
2761
.found:
2762
        test    al, al
2762
        test    al, al
2763
        jz      .done_succ
2763
        jz      .done_succ
2764
        cmp     al, '|'
2764
        cmp     al, '|'
2765
        jz      .test_exclude
2765
        jz      .test_exclude
2766
        lodsb
2766
        lodsb
2767
        jmp     .found
2767
        jmp     .found
2768
.done_succ:
2768
.done_succ:
2769
        clc
2769
        clc
2770
        popa
2770
        popa
2771
        ret
2771
        ret
2772
.test_exclude:
2772
.test_exclude:
2773
        push    esi
2773
        push    esi
2774
@@:
2774
@@:
2775
        lodsb
2775
        lodsb
2776
        test    al, al
2776
        test    al, al
2777
        jz      @f
2777
        jz      @f
2778
        cmp     al, ','
2778
        cmp     al, ','
2779
        jnz     @b
2779
        jnz     @b
2780
@@:
2780
@@:
2781
        mov     byte [esi-1], 0
2781
        mov     byte [esi-1], 0
2782
        xchg    esi, [esp]
2782
        xchg    esi, [esp]
2783
        call    match_single_mask
2783
        call    match_single_mask
2784
        pop     esi
2784
        pop     esi
2785
        mov     [esi-1], al
2785
        mov     [esi-1], al
2786
        jnc     .done_fail
2786
        jnc     .done_fail
2787
        test    al, al
2787
        test    al, al
2788
        jz      .done_succ
2788
        jz      .done_succ
2789
        jmp     .test_exclude
2789
        jmp     .test_exclude
2790
 
2790
 
2791
match_single_mask:
2791
match_single_mask:
2792
; in: esi->mask, edi->name
2792
; in: esi->mask, edi->name
2793
; out: CF clear <=> match
2793
; out: CF clear <=> match
2794
        pusha
2794
        pusha
2795
.mask_symbol:
2795
.mask_symbol:
2796
        lodsb
2796
        lodsb
2797
        test    al, al
2797
        test    al, al
2798
        jz      .mask_done
2798
        jz      .mask_done
2799
        cmp     al, '*'
2799
        cmp     al, '*'
2800
        jz      .asterisk
2800
        jz      .asterisk
2801
        cmp     al, '?'
2801
        cmp     al, '?'
2802
        jz      .quest
2802
        jz      .quest
2803
        cmp     al, '['
2803
        cmp     al, '['
2804
        jz      .list
2804
        jz      .list
2805
        call    match_symbol
2805
        call    match_symbol
2806
        jnz     .done_fail
2806
        jnz     .done_fail
2807
        inc     edi
2807
        inc     edi
2808
        jmp     .mask_symbol
2808
        jmp     .mask_symbol
2809
.done_fail:
2809
.done_fail:
2810
        stc
2810
        stc
2811
        popa
2811
        popa
2812
        ret
2812
        ret
2813
.mask_done:
2813
.mask_done:
2814
        scasb
2814
        scasb
2815
        jnz     .done_fail
2815
        jnz     .done_fail
2816
.done_succ:
2816
.done_succ:
2817
        clc
2817
        clc
2818
        popa
2818
        popa
2819
        ret
2819
        ret
2820
.quest:
2820
.quest:
2821
        mov     al, 0
2821
        mov     al, 0
2822
        scasb
2822
        scasb
2823
        jz      .done_fail
2823
        jz      .done_fail
2824
        jmp     .mask_symbol
2824
        jmp     .mask_symbol
2825
.list:
2825
.list:
2826
        lodsb
2826
        lodsb
2827
        cmp     al, ']'
2827
        cmp     al, ']'
2828
        jz      .done_fail
2828
        jz      .done_fail
2829
        cmp     byte [esi+1], '-'
2829
        cmp     byte [esi+1], '-'
2830
        jz      .range
2830
        jz      .range
2831
        call    match_symbol
2831
        call    match_symbol
2832
        jnz     .list
2832
        jnz     .list
2833
.listok:
2833
.listok:
2834
        inc     edi
2834
        inc     edi
2835
@@:
2835
@@:
2836
        lodsb
2836
        lodsb
2837
        cmp     al, ']'
2837
        cmp     al, ']'
2838
        jnz     @b
2838
        jnz     @b
2839
        jmp     .mask_symbol
2839
        jmp     .mask_symbol
2840
.range:
2840
.range:
2841
        call    match_symbol
2841
        call    match_symbol
2842
        ja      @f
2842
        ja      @f
2843
        mov     al, [esi+2]
2843
        mov     al, [esi+2]
2844
        call    match_symbol
2844
        call    match_symbol
2845
        jae     .listok
2845
        jae     .listok
2846
@@:
2846
@@:
2847
        inc     esi
2847
        inc     esi
2848
        jmp     .list
2848
        jmp     .list
2849
.asterisk:
2849
.asterisk:
2850
        push    edi
2850
        push    edi
2851
@@:
2851
@@:
2852
        call    match_single_mask
2852
        call    match_single_mask
2853
        jnc     @f
2853
        jnc     @f
2854
        mov     al, 0
2854
        mov     al, 0
2855
        scasb
2855
        scasb
2856
        jnz     @b
2856
        jnz     @b
2857
        pop     edi
2857
        pop     edi
2858
        jmp     .done_fail
2858
        jmp     .done_fail
2859
@@:
2859
@@:
2860
        pop     edi
2860
        pop     edi
2861
        jmp     .done_succ
2861
        jmp     .done_succ
2862
 
2862
 
2863
tolower:
2863
tolower:
2864
        cmp     al, 'A'
2864
        cmp     al, 'A'
2865
        jb      @f
2865
        jb      @f
2866
        cmp     al, 'Z'
2866
        cmp     al, 'Z'
2867
        ja      @f
2867
        ja      @f
2868
        add     al, ' '
2868
        add     al, ' '
2869
@@:     ret
2869
@@:     ret
2870
 
2870
 
2871
match_symbol:
2871
match_symbol:
2872
; in: al,[edi]=symbols
2872
; in: al,[edi]=symbols
2873
; out: flags as 'cmp al,[edi]'
2873
; out: flags as 'cmp al,[edi]'
2874
        push    eax
2874
        push    eax
2875
        call    tolower
2875
        call    tolower
2876
        mov     ah, [edi]
2876
        mov     ah, [edi]
2877
        xchg    al, ah
2877
        xchg    al, ah
2878
        call    tolower
2878
        call    tolower
2879
        cmp     ah, al
2879
        cmp     ah, al
2880
        pop     eax
2880
        pop     eax
2881
        ret
2881
        ret
2882
 
2882
 
2883
 
2883
 
2884
header  db      'Kolibri Far 0.14'
2884
header  db      'Kolibri Far 0.14'
2885
;.length = $ - header
2885
;.length = $ - header
2886
        db      0
2886
        db      0
2887
 
2887
 
2888
nomem_draw      db      'No memory for redraw.',0
2888
nomem_draw      db      'No memory for redraw.',0
2889
.size = $ - nomem_draw
2889
.size = $ - nomem_draw
2890
 
2890
 
2891
def_left_dir    db      '/rd/1',0
2891
def_left_dir    db      '/rd/1',0
2892
def_right_dir   db      '/hd0/1',0
2892
def_right_dir   db      '/hd0/1',0
2893
 
2893
 
2894
if lang eq ru
2894
if lang eq ru
2895
aFolder         db      ' ¯ª '
2895
aFolder         db      ' ¯ª '
2896
.size = $-aFolder
2896
.size = $-aFolder
2897
aUp             db      '‚¢¥àå'
2897
aUp             db      '‚¢¥àå'
2898
.size = $-aUp
2898
.size = $-aUp
2899
aDrive          db      '„¨áª',0
2899
aDrive          db      '„¨áª',0
2900
aScreens        db      'ªà ­ë',0
2900
aScreens        db      'ªà ­ë',0
2901
else
2901
else
2902
aFolder         db      'Folder'
2902
aFolder         db      'Folder'
2903
.size = $-aFolder
2903
.size = $-aFolder
2904
aUp             db      'Up'
2904
aUp             db      'Up'
2905
.size = $-aUp
2905
.size = $-aUp
2906
aDrive          db      'Drive',0
2906
aDrive          db      'Drive',0
2907
aScreens        db      'Screens',0
2907
aScreens        db      'Screens',0
2908
end if
2908
end if
2909
 
2909
 
2910
_10d dd 10
2910
_10d dd 10
2911
_100d dd 100
2911
_100d dd 100
2912
_10 db 10
2912
_10 db 10
2913
_100 db 100
2913
_100 db 100
2914
 
2914
 
2915
fpu_cw  dw      000011100111111b
2915
fpu_cw  dw      000011100111111b
2916
 
2916
 
2917
keybar_panels:
2917
keybar_panels:
2918
if lang eq ru
2918
if lang eq ru
2919
; ¡¥§ ª« ¢¨è-¬®¤¨ä¨ª â®à®¢
2919
; ¡¥§ ª« ¢¨è-¬®¤¨ä¨ª â®à®¢
2920
        db      '®¬®éì'
2920
        db      '®¬®éì'
2921
        db      '®«ì§Œ'
2921
        db      '®«ì§Œ'
2922
        db      'à®á¬ '
2922
        db      'à®á¬ '
2923
        db      '¥¤ ªâ'
2923
        db      '¥¤ ªâ'
2924
        db      'Š®¯¨à '
2924
        db      'Š®¯¨à '
2925
        db      '¥à¥­ '
2925
        db      '¥à¥­ '
2926
        db      ' ¯ª  '
2926
        db      ' ¯ª  '
2927
        db      '“¤ «¥­'
2927
        db      '“¤ «¥­'
2928
        db      'Š®­äŒ­'
2928
        db      'Š®­äŒ­'
2929
        db      '‚ë室 '
2929
        db      '‚ë室 '
2930
        db      'Œ®¤ã«¨'
2930
        db      'Œ®¤ã«¨'
2931
        db      'ªà ­ë'
2931
        db      'ªà ­ë'
2932
; Shift
2932
; Shift
2933
        db      '„®¡ ¢«'
2933
        db      '„®¡ ¢«'
2934
        db      ' á¯ ª'
2934
        db      ' á¯ ª'
2935
        db      '€à劮¬'
2935
        db      '€à劮¬'
2936
        db      '¥¤ ª.'
2936
        db      '¥¤ ª.'
2937
        db      'Š®¯¨à '
2937
        db      'Š®¯¨à '
2938
        db      '¥à¥¨¬'
2938
        db      '¥à¥¨¬'
2939
        db      '      '
2939
        db      '      '
2940
        db      '“¤ «¥­'
2940
        db      '“¤ «¥­'
2941
        db      '‘®åà ­'
2941
        db      '‘®åà ­'
2942
        db      '®á«¤­'
2942
        db      '®á«¤­'
2943
        db      'ƒà㯯ë'
2943
        db      'ƒà㯯ë'
2944
        db      '‚ë¡à ­'
2944
        db      '‚ë¡à ­'
2945
; Ctrl
2945
; Ctrl
2946
        db      '‹¥¢ ï '
2946
        db      '‹¥¢ ï '
2947
        db      'à ¢ ï'
2947
        db      'à ¢ ï'
2948
        db      'ˆ¬ï   '
2948
        db      'ˆ¬ï   '
2949
        db      ' áè¨à'
2949
        db      ' áè¨à'
2950
        db      'Œ®¤¨ä '
2950
        db      'Œ®¤¨ä '
2951
        db      ' §¬¥à'
2951
        db      ' §¬¥à'
2952
        db      '¥á®àâ'
2952
        db      '¥á®àâ'
2953
        db      '‘®§¤ ­'
2953
        db      '‘®§¤ ­'
2954
        db      '„®áâã¯'
2954
        db      '„®áâã¯'
2955
        db      'Ž¯¨á ­'
2955
        db      'Ž¯¨á ­'
2956
        db      '‚« ¤¥«'
2956
        db      '‚« ¤¥«'
2957
        db      '‘®àâ  '
2957
        db      '‘®àâ  '
2958
; Ctrl+Shift
2958
; Ctrl+Shift
2959
        db      '      '
2959
        db      '      '
2960
        db      '      '
2960
        db      '      '
2961
        db      'à®á¬ '
2961
        db      'à®á¬ '
2962
        db      '¥¤ ªâ'
2962
        db      '¥¤ ªâ'
2963
        db      '      '
2963
        db      '      '
2964
        db      '      '
2964
        db      '      '
2965
        db      '      '
2965
        db      '      '
2966
        db      '      '
2966
        db      '      '
2967
        db      '      '
2967
        db      '      '
2968
        db      '      '
2968
        db      '      '
2969
        db      '      '
2969
        db      '      '
2970
        db      '      '
2970
        db      '      '
2971
; Alt
2971
; Alt
2972
        db      '‹¥¢ ï '
2972
        db      '‹¥¢ ï '
2973
        db      'à ¢ ï'
2973
        db      'à ¢ ï'
2974
        db      '‘¬®âà.'
2974
        db      '‘¬®âà.'
2975
        db      '¥¤ ª.'
2975
        db      '¥¤ ª.'
2976
        db      '¥ç âì'
2976
        db      '¥ç âì'
2977
        db      '‘¢ï§ì '
2977
        db      '‘¢ï§ì '
2978
        db      'ˆáª âì'
2978
        db      'ˆáª âì'
2979
        db      'ˆáâ®à '
2979
        db      'ˆáâ®à '
2980
        db      '‚¨¤¥® '
2980
        db      '‚¨¤¥® '
2981
        db      '„¥à¥¢®'
2981
        db      '„¥à¥¢®'
2982
        db      'ˆáâà '
2982
        db      'ˆáâà '
2983
        db      'ˆá⏠¯'
2983
        db      'ˆá⏠¯'
2984
; Alt+Shift
2984
; Alt+Shift
2985
        db      '      '
2985
        db      '      '
2986
        db      '      '
2986
        db      '      '
2987
        db      '      '
2987
        db      '      '
2988
        db      '      '
2988
        db      '      '
2989
        db      '      '
2989
        db      '      '
2990
        db      '      '
2990
        db      '      '
2991
        db      '      '
2991
        db      '      '
2992
        db      '      '
2992
        db      '      '
2993
        db      'Š®­ä«'
2993
        db      'Š®­ä«'
2994
        db      '      '
2994
        db      '      '
2995
        db      '      '
2995
        db      '      '
2996
        db      '      '
2996
        db      '      '
2997
; Alt+Ctrl
2997
; Alt+Ctrl
2998
times 12 db     '      '
2998
times 12 db     '      '
2999
; Alt+Ctrl+Shift
2999
; Alt+Ctrl+Shift
3000
times 12 db     '      '
3000
times 12 db     '      '
3001
else
3001
else
3002
; No modificators
3002
; No modificators
3003
        db      'Help  '
3003
        db      'Help  '
3004
        db      'UserMn'
3004
        db      'UserMn'
3005
        db      'View  '
3005
        db      'View  '
3006
        db      'Edit  '
3006
        db      'Edit  '
3007
        db      'Copy  '
3007
        db      'Copy  '
3008
        db      'RenMov'
3008
        db      'RenMov'
3009
        db      'MkFold'
3009
        db      'MkFold'
3010
        db      'Delete'
3010
        db      'Delete'
3011
        db      'ConfMn'
3011
        db      'ConfMn'
3012
        db      'Quit  '
3012
        db      'Quit  '
3013
        db      'Plugin'
3013
        db      'Plugin'
3014
        db      'Screen'
3014
        db      'Screen'
3015
; Shift
3015
; Shift
3016
        db      'Add   '
3016
        db      'Add   '
3017
        db      'Extrct'
3017
        db      'Extrct'
3018
        db      'ArcCmd'
3018
        db      'ArcCmd'
3019
        db      'Edit..'
3019
        db      'Edit..'
3020
        db      'Copy  '
3020
        db      'Copy  '
3021
        db      'Rename'
3021
        db      'Rename'
3022
        db      '      '
3022
        db      '      '
3023
        db      'Delete'
3023
        db      'Delete'
3024
        db      'Save  '
3024
        db      'Save  '
3025
        db      'Last  '
3025
        db      'Last  '
3026
        db      'Group '
3026
        db      'Group '
3027
        db      'SelUp '
3027
        db      'SelUp '
3028
; Ctrl
3028
; Ctrl
3029
        db      'Left  '
3029
        db      'Left  '
3030
        db      'Right '
3030
        db      'Right '
3031
        db      'Name  '
3031
        db      'Name  '
3032
        db      'Extens'
3032
        db      'Extens'
3033
        db      'Modifn'
3033
        db      'Modifn'
3034
        db      'Size  '
3034
        db      'Size  '
3035
        db      'Unsort'
3035
        db      'Unsort'
3036
        db      'Creatn'
3036
        db      'Creatn'
3037
        db      'Access'
3037
        db      'Access'
3038
        db      'Descr '
3038
        db      'Descr '
3039
        db      'Owner '
3039
        db      'Owner '
3040
        db      'Sort  '
3040
        db      'Sort  '
3041
; Ctrl+Shift
3041
; Ctrl+Shift
3042
        db      '      '
3042
        db      '      '
3043
        db      '      '
3043
        db      '      '
3044
        db      'View  '
3044
        db      'View  '
3045
        db      'Edit  '
3045
        db      'Edit  '
3046
        db      '      '
3046
        db      '      '
3047
        db      '      '
3047
        db      '      '
3048
        db      '      '
3048
        db      '      '
3049
        db      '      '
3049
        db      '      '
3050
        db      '      '
3050
        db      '      '
3051
        db      '      '
3051
        db      '      '
3052
        db      '      '
3052
        db      '      '
3053
        db      '      '
3053
        db      '      '
3054
; Alt
3054
; Alt
3055
        db      'Left  '
3055
        db      'Left  '
3056
        db      'Right '
3056
        db      'Right '
3057
        db      'View..'
3057
        db      'View..'
3058
        db      'Edit..'
3058
        db      'Edit..'
3059
        db      'Print '
3059
        db      'Print '
3060
        db      'MkLink'
3060
        db      'MkLink'
3061
        db      'Find  '
3061
        db      'Find  '
3062
        db      'Histry'
3062
        db      'Histry'
3063
        db      'Video '
3063
        db      'Video '
3064
        db      'Tree  '
3064
        db      'Tree  '
3065
        db      'ViewHs'
3065
        db      'ViewHs'
3066
        db      'FoldHs'
3066
        db      'FoldHs'
3067
; Alt+Shift
3067
; Alt+Shift
3068
        db      '      '
3068
        db      '      '
3069
        db      '      '
3069
        db      '      '
3070
        db      '      '
3070
        db      '      '
3071
        db      '      '
3071
        db      '      '
3072
        db      '      '
3072
        db      '      '
3073
        db      '      '
3073
        db      '      '
3074
        db      '      '
3074
        db      '      '
3075
        db      '      '
3075
        db      '      '
3076
        db      'ConfPl'
3076
        db      'ConfPl'
3077
        db      '      '
3077
        db      '      '
3078
        db      '      '
3078
        db      '      '
3079
        db      '      '
3079
        db      '      '
3080
; Alt+Ctrl
3080
; Alt+Ctrl
3081
times 12 db     '      '
3081
times 12 db     '      '
3082
; Alt+Ctrl+Shift
3082
; Alt+Ctrl+Shift
3083
times 12 db     '      '
3083
times 12 db     '      '
3084
end if
3084
end if
3085
 
3085
 
3086
keybar_viewer:
3086
keybar_viewer:
3087
if lang eq ru
3087
if lang eq ru
3088
; ¡¥§ ª« ¢¨è-¬®¤¨ä¨ª â®à®¢
3088
; ¡¥§ ª« ¢¨è-¬®¤¨ä¨ª â®à®¢
3089
        db      '®¬®éì'
3089
        db      '®¬®éì'
3090
        db      ' §¢¥à'
3090
        db      ' §¢¥à'
3091
        db      '‚ë室 '
3091
        db      '‚ë室 '
3092
        db      'Š®¤   '
3092
        db      'Š®¤   '
3093
        db      '      '
3093
        db      '      '
3094
        db      '¥¤ ªâ'
3094
        db      '¥¤ ªâ'
3095
        db      '®¨áª '
3095
        db      '®¨áª '
3096
keybar_cp:
3096
keybar_cp:
3097
        db      'cp1251'
3097
        db      'cp1251'
3098
        db      '      '
3098
        db      '      '
3099
        db      '‚ë室 '
3099
        db      '‚ë室 '
3100
        db      'Œ®¤ã«¨'
3100
        db      'Œ®¤ã«¨'
3101
        db      'ªà ­ë'
3101
        db      'ªà ­ë'
3102
; Shift
3102
; Shift
3103
        db      '      '
3103
        db      '      '
3104
        db      '‘«®¢  '
3104
        db      '‘«®¢  '
3105
        db      '      '
3105
        db      '      '
3106
        db      '      '
3106
        db      '      '
3107
        db      '      '
3107
        db      '      '
3108
        db      '      '
3108
        db      '      '
3109
        db      '„ «ìè¥'
3109
        db      '„ «ìè¥'
3110
        db      '’ ¡«¨æ'
3110
        db      '’ ¡«¨æ'
3111
        db      '      '
3111
        db      '      '
3112
        db      '      '
3112
        db      '      '
3113
        db      '      '
3113
        db      '      '
3114
        db      '      '
3114
        db      '      '
3115
; Ctrl
3115
; Ctrl
3116
        db      '      '
3116
        db      '      '
3117
        db      '      '
3117
        db      '      '
3118
        db      '      '
3118
        db      '      '
3119
        db      '      '
3119
        db      '      '
3120
        db      '      '
3120
        db      '      '
3121
        db      '      '
3121
        db      '      '
3122
        db      '      '
3122
        db      '      '
3123
        db      '      '
3123
        db      '      '
3124
        db      '      '
3124
        db      '      '
3125
        db      '®§¨æ '
3125
        db      '®§¨æ '
3126
        db      '      '
3126
        db      '      '
3127
        db      '      '
3127
        db      '      '
3128
; Ctrl+Shift
3128
; Ctrl+Shift
3129
        db      '      '
3129
        db      '      '
3130
        db      '      '
3130
        db      '      '
3131
        db      '      '
3131
        db      '      '
3132
        db      '      '
3132
        db      '      '
3133
        db      '      '
3133
        db      '      '
3134
        db      '      '
3134
        db      '      '
3135
        db      '      '
3135
        db      '      '
3136
        db      '      '
3136
        db      '      '
3137
        db      '      '
3137
        db      '      '
3138
        db      '      '
3138
        db      '      '
3139
        db      '      '
3139
        db      '      '
3140
        db      '      '
3140
        db      '      '
3141
; Alt
3141
; Alt
3142
        db      '      '
3142
        db      '      '
3143
        db      '      '
3143
        db      '      '
3144
        db      '      '
3144
        db      '      '
3145
        db      '      '
3145
        db      '      '
3146
        db      '¥ç âì'
3146
        db      '¥ç âì'
3147
        db      '      '
3147
        db      '      '
3148
        db      ' § ¤ '
3148
        db      ' § ¤ '
3149
        db      '¥à¥©â'
3149
        db      '¥à¥©â'
3150
        db      '‚¨¤¥® '
3150
        db      '‚¨¤¥® '
3151
        db      '      '
3151
        db      '      '
3152
        db      'ˆáâà '
3152
        db      'ˆáâà '
3153
        db      '      '
3153
        db      '      '
3154
; Alt+Shift
3154
; Alt+Shift
3155
        db      '      '
3155
        db      '      '
3156
        db      '      '
3156
        db      '      '
3157
        db      '      '
3157
        db      '      '
3158
        db      '      '
3158
        db      '      '
3159
        db      '      '
3159
        db      '      '
3160
        db      '      '
3160
        db      '      '
3161
        db      '      '
3161
        db      '      '
3162
        db      '      '
3162
        db      '      '
3163
        db      'Š®­ä¨£'
3163
        db      'Š®­ä¨£'
3164
        db      '      '
3164
        db      '      '
3165
        db      '      '
3165
        db      '      '
3166
        db      '      '
3166
        db      '      '
3167
; Alt+Ctrl
3167
; Alt+Ctrl
3168
times 12 db     '      '
3168
times 12 db     '      '
3169
; Alt+Ctrl+Shift
3169
; Alt+Ctrl+Shift
3170
times 12 db     '      '
3170
times 12 db     '      '
3171
else
3171
else
3172
; No modificators
3172
; No modificators
3173
        db      'Help  '
3173
        db      'Help  '
3174
        db      'Unwrap'
3174
        db      'Unwrap'
3175
        db      'Quit  '
3175
        db      'Quit  '
3176
        db      'Hex   '
3176
        db      'Hex   '
3177
        db      '      '
3177
        db      '      '
3178
        db      'Edit  '
3178
        db      'Edit  '
3179
        db      'Search'
3179
        db      'Search'
3180
keybar_cp:
3180
keybar_cp:
3181
        db      'cp1251'
3181
        db      'cp1251'
3182
        db      '      '
3182
        db      '      '
3183
        db      'Quit  '
3183
        db      'Quit  '
3184
        db      'Plugin'
3184
        db      'Plugin'
3185
        db      'Screen'
3185
        db      'Screen'
3186
; Shift
3186
; Shift
3187
        db      '      '
3187
        db      '      '
3188
        db      'WWrap '
3188
        db      'WWrap '
3189
        db      '      '
3189
        db      '      '
3190
        db      '      '
3190
        db      '      '
3191
        db      '      '
3191
        db      '      '
3192
        db      '      '
3192
        db      '      '
3193
        db      'Next  '
3193
        db      'Next  '
3194
        db      'Table '
3194
        db      'Table '
3195
        db      '      '
3195
        db      '      '
3196
        db      '      '
3196
        db      '      '
3197
        db      '      '
3197
        db      '      '
3198
        db      '      '
3198
        db      '      '
3199
; Ctrl
3199
; Ctrl
3200
        db      '      '
3200
        db      '      '
3201
        db      '      '
3201
        db      '      '
3202
        db      '      '
3202
        db      '      '
3203
        db      '      '
3203
        db      '      '
3204
        db      '      '
3204
        db      '      '
3205
        db      '      '
3205
        db      '      '
3206
        db      '      '
3206
        db      '      '
3207
        db      '      '
3207
        db      '      '
3208
        db      '      '
3208
        db      '      '
3209
        db      'GoFile'
3209
        db      'GoFile'
3210
        db      '      '
3210
        db      '      '
3211
        db      '      '
3211
        db      '      '
3212
; Ctrl+Shift
3212
; Ctrl+Shift
3213
        db      '      '
3213
        db      '      '
3214
        db      '      '
3214
        db      '      '
3215
        db      '      '
3215
        db      '      '
3216
        db      '      '
3216
        db      '      '
3217
        db      '      '
3217
        db      '      '
3218
        db      '      '
3218
        db      '      '
3219
        db      '      '
3219
        db      '      '
3220
        db      '      '
3220
        db      '      '
3221
        db      '      '
3221
        db      '      '
3222
        db      '      '
3222
        db      '      '
3223
        db      '      '
3223
        db      '      '
3224
        db      '      '
3224
        db      '      '
3225
; Alt
3225
; Alt
3226
        db      '      '
3226
        db      '      '
3227
        db      '      '
3227
        db      '      '
3228
        db      '      '
3228
        db      '      '
3229
        db      '      '
3229
        db      '      '
3230
        db      'Print '
3230
        db      'Print '
3231
        db      '      '
3231
        db      '      '
3232
        db      'Prev  '
3232
        db      'Prev  '
3233
        db      'Goto  '
3233
        db      'Goto  '
3234
        db      'Video '
3234
        db      'Video '
3235
        db      '      '
3235
        db      '      '
3236
        db      'ViewHs'
3236
        db      'ViewHs'
3237
        db      '      '
3237
        db      '      '
3238
; Alt+Shift
3238
; Alt+Shift
3239
        db      '      '
3239
        db      '      '
3240
        db      '      '
3240
        db      '      '
3241
        db      '      '
3241
        db      '      '
3242
        db      '      '
3242
        db      '      '
3243
        db      '      '
3243
        db      '      '
3244
        db      '      '
3244
        db      '      '
3245
        db      '      '
3245
        db      '      '
3246
        db      '      '
3246
        db      '      '
3247
        db      'Config'
3247
        db      'Config'
3248
        db      '      '
3248
        db      '      '
3249
        db      '      '
3249
        db      '      '
3250
        db      '      '
3250
        db      '      '
3251
; Alt+Ctrl
3251
; Alt+Ctrl
3252
times 12 db     '      '
3252
times 12 db     '      '
3253
; Alt+Ctrl+Shift
3253
; Alt+Ctrl+Shift
3254
times 12 db     '      '
3254
times 12 db     '      '
3255
end if
3255
end if
3256
 
3256
 
3257
        align   4
3257
        align   4
3258
cur_width       dd      80
3258
cur_width       dd      80
3259
cur_height      dd      25
3259
cur_height      dd      25
3260
max_width = 256
3260
max_width = 256
3261
max_height = 256
3261
max_height = 256
3262
 
3262
 
3263
active_panel    dd      panel1_data
3263
active_panel    dd      panel1_data
3264
 
3264
 
3265
console_colors  dd      0x000000, 0x000080, 0x008000, 0x008080
3265
console_colors  dd      0x000000, 0x000080, 0x008000, 0x008080
3266
                dd      0x800000, 0x800080, 0x808000, 0xC0C0C0
3266
                dd      0x800000, 0x800080, 0x808000, 0xC0C0C0
3267
                dd      0x808080, 0x0000FF, 0x00FF00, 0x00FFFF
3267
                dd      0x808080, 0x0000FF, 0x00FF00, 0x00FFFF
3268
                dd      0xFF0000, 0xFF00FF, 0xFFFF00, 0xFFFFFF
3268
                dd      0xFF0000, 0xFF00FF, 0xFFFF00, 0xFFFFFF
3269
 
3269
 
3270
compare_fns     dd      compare_name
3270
compare_fns     dd      compare_name
3271
                dd      compare_name_rev
3271
                dd      compare_name_rev
3272
                dd      compare_ext
3272
                dd      compare_ext
3273
                dd      compare_ext_rev
3273
                dd      compare_ext_rev
3274
                dd      compare_modified
3274
                dd      compare_modified
3275
                dd      compare_modified_rev
3275
                dd      compare_modified_rev
3276
                dd      compare_size
3276
                dd      compare_size
3277
                dd      compare_size_rev
3277
                dd      compare_size_rev
3278
                dd      compare_unordered
3278
                dd      compare_unordered
3279
                dd      compare_unordered_rev
3279
                dd      compare_unordered_rev
3280
                dd      compare_created
3280
                dd      compare_created
3281
                dd      compare_created_rev
3281
                dd      compare_created_rev
3282
                dd      compare_accessed
3282
                dd      compare_accessed
3283
                dd      compare_accessed_rev
3283
                dd      compare_accessed_rev
3284
 
3284
 
3285
ctrlkey_tests   dd      ctrlkey_test0
3285
ctrlkey_tests   dd      ctrlkey_test0
3286
                dd      ctrlkey_test1
3286
                dd      ctrlkey_test1
3287
                dd      ctrlkey_test2
3287
                dd      ctrlkey_test2
3288
                dd      ctrlkey_test3
3288
                dd      ctrlkey_test3
3289
                dd      ctrlkey_test4
3289
                dd      ctrlkey_test4
3290
ctrlkey_tests_num = 5
3290
ctrlkey_tests_num = 5
3291
 
3291
 
3292
virtual at 0
3292
virtual at 0
3293
screen_vtable:
3293
screen_vtable:
3294
        .OnRedraw       dd      ?
3294
        .OnRedraw       dd      ?
3295
        .OnKey          dd      ?
3295
        .OnKey          dd      ?
3296
        .keybar         dd      ?
3296
        .keybar         dd      ?
3297
        .getname        dd      ?
3297
        .getname        dd      ?
3298
end virtual
3298
end virtual
3299
 
3299
 
3300
panels_vtable:
3300
panels_vtable:
3301
        dd      panels_OnRedraw
3301
        dd      panels_OnRedraw
3302
        dd      panels_OnKey
3302
        dd      panels_OnKey
3303
        dd      keybar_panels
3303
        dd      keybar_panels
3304
        dd      panels_getname
3304
        dd      panels_getname
3305
 
3305
 
3306
viewer_vtable:
3306
viewer_vtable:
3307
        dd      viewer_OnRedraw
3307
        dd      viewer_OnRedraw
3308
        dd      viewer_OnKey
3308
        dd      viewer_OnKey
3309
        dd      keybar_viewer
3309
        dd      keybar_viewer
3310
        dd      viewer_getname
3310
        dd      viewer_getname
3311
 
3311
 
3312
encodings:
3312
encodings:
3313
.cp866 = 0
3313
.cp866 = 0
3314
.cp1251 = 1
3314
.cp1251 = 1
3315
 
3315
 
3316
.names:
3316
.names:
3317
        db      'cp866   '
3317
        db      'cp866   '
3318
        db      'cp1251  '
3318
        db      'cp1251  '
3319
 
3319
 
3320
.tables:
3320
.tables:
3321
; cp866 - trivial map
3321
; cp866 - trivial map
3322
        times 128 db %+127
3322
        times 128 db %+127
3323
; cp1251
3323
; cp1251
3324
        db      0x3F,0x3F,0x27,0x3F,0x22,0x3A,0xC5,0xD8,0x3F,0x25,0x3F,0x3C,0x3F,0x3F,0x3F,0x3F
3324
        db      0x3F,0x3F,0x27,0x3F,0x22,0x3A,0xC5,0xD8,0x3F,0x25,0x3F,0x3C,0x3F,0x3F,0x3F,0x3F
3325
        db      0x3F,0x27,0x27,0x22,0x22,0x07,0x2D,0x2D,0x3F,0x54,0x3F,0x3E,0x3F,0x3F,0x3F,0x3F
3325
        db      0x3F,0x27,0x27,0x22,0x22,0x07,0x2D,0x2D,0x3F,0x54,0x3F,0x3E,0x3F,0x3F,0x3F,0x3F
3326
        db      0xFF,0xF6,0xF7,0x3F,0xFD,0x3F,0xB3,0x15,0xF0,0x63,0xF2,0x3C,0xBF,0x2D,0x52,0xF4
3326
        db      0xFF,0xF6,0xF7,0x3F,0xFD,0x3F,0xB3,0x15,0xF0,0x63,0xF2,0x3C,0xBF,0x2D,0x52,0xF4
3327
        db      0xF8,0x2B,0x49,0x69,0x3F,0xE7,0x14,0xFA,0xF1,0xFC,0xF3,0x3E,0x3F,0x3F,0x3F,0xF5
3327
        db      0xF8,0x2B,0x49,0x69,0x3F,0xE7,0x14,0xFA,0xF1,0xFC,0xF3,0x3E,0x3F,0x3F,0x3F,0xF5
3328
        times 0x30 db %-1+0x80
3328
        times 0x30 db %-1+0x80
3329
        times 0x10 db %-1+0xE0
3329
        times 0x10 db %-1+0xE0
3330
 
3330
 
3331
active_screen   dd      0
3331
active_screen   dd      0
3332
tabsize         dd      8
3332
tabsize         dd      8
3333
 
3333
 
3334
ascii2scan:
3334
ascii2scan:
3335
        times 32 db 0
3335
        times 32 db 0
3336
        db      0x39,0x02,0x03,0x04,0x05,0x06,0x08,0x28,0x0A,0x0B,0x09,0x0D,0x33,0x0C,0x34,0x35
3336
        db      0x39,0x02,0x03,0x04,0x05,0x06,0x08,0x28,0x0A,0x0B,0x09,0x0D,0x33,0x0C,0x34,0x35
3337
        db      0x0B,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x27,0x27,0x33,0x0D,0x34,0x35
3337
        db      0x0B,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x27,0x27,0x33,0x0D,0x34,0x35
3338
        db      0x03,0x1E,0x30,0x2E,0x20,0x12,0x21,0x22,0x23,0x17,0x24,0x25,0x26,0x32,0x31,0x18
3338
        db      0x03,0x1E,0x30,0x2E,0x20,0x12,0x21,0x22,0x23,0x17,0x24,0x25,0x26,0x32,0x31,0x18
3339
        db      0x19,0x10,0x13,0x1F,0x14,0x16,0x2F,0x11,0x2D,0x15,0x2C,0x1A,0x2B,0x1B,0x07,0x0C
3339
        db      0x19,0x10,0x13,0x1F,0x14,0x16,0x2F,0x11,0x2D,0x15,0x2C,0x1A,0x2B,0x1B,0x07,0x0C
3340
        db      0x29,0x1E,0x30,0x2E,0x20,0x12,0x21,0x22,0x23,0x17,0x24,0x25,0x26,0x32,0x31,0x18
3340
        db      0x29,0x1E,0x30,0x2E,0x20,0x12,0x21,0x22,0x23,0x17,0x24,0x25,0x26,0x32,0x31,0x18
3341
        db      0x19,0x10,0x13,0x1F,0x14,0x16,0x2F,0x11,0x2D,0x15,0x2C,0x1A,0x2B,0x1B,0x29,0x00
3341
        db      0x19,0x10,0x13,0x1F,0x14,0x16,0x2F,0x11,0x2D,0x15,0x2C,0x1A,0x2B,0x1B,0x29,0x00
3342
        db      0x21,0x33,0x20,0x16,0x26,0x14,0x27,0x19,0x30,0x10,0x13,0x25,0x2F,0x15,0x24,0x22
3342
        db      0x21,0x33,0x20,0x16,0x26,0x14,0x27,0x19,0x30,0x10,0x13,0x25,0x2F,0x15,0x24,0x22
3343
        db      0x23,0x2E,0x31,0x12,0x1E,0x1A,0x11,0x2D,0x17,0x18,0x1B,0x1F,0x32,0x28,0x34,0x2C
3343
        db      0x23,0x2E,0x31,0x12,0x1E,0x1A,0x11,0x2D,0x17,0x18,0x1B,0x1F,0x32,0x28,0x34,0x2C
3344
        db      0x21,0x33,0x20,0x16,0x26,0x14,0x27,0x19,0x30,0x10,0x13,0x25,0x2F,0x15,0x24,0x22
3344
        db      0x21,0x33,0x20,0x16,0x26,0x14,0x27,0x19,0x30,0x10,0x13,0x25,0x2F,0x15,0x24,0x22
3345
        times 48 db 0
3345
        times 48 db 0
3346
        db      0x23,0x2E,0x31,0x12,0x1E,0x1A,0x11,0x2D,0x17,0x18,0x1B,0x1F,0x32,0x28,0x34,0x2C
3346
        db      0x23,0x2E,0x31,0x12,0x1E,0x1A,0x11,0x2D,0x17,0x18,0x1B,0x1F,0x32,0x28,0x34,0x2C
3347
        db      0x29,0x29,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
3347
        db      0x29,0x29,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
3348
 
3348
 
3349
; Š« ¢¨è­ë¥ á®ç¥â ­¨ï
3349
; Š« ¢¨è­ë¥ á®ç¥â ­¨ï
3350
; db scancode, reserved
3350
; db scancode, reserved
3351
; dw ctrlstate
3351
; dw ctrlstate
3352
; dd handler
3352
; dd handler
3353
; ctrlstate: ¬« ¤è¨¥ 4 ¡¨â  - ¤«ï Shift, á«¥¤ãî騥 - ¤«ï Ctrl, á«¥¤ãî騥 - ¤«ï Alt
3353
; ctrlstate: ¬« ¤è¨¥ 4 ¡¨â  - ¤«ï Shift, á«¥¤ãî騥 - ¤«ï Ctrl, á«¥¤ãî騥 - ¤«ï Alt
3354
; 0 = ­¨ ®¤­  ª« ¢¨è  ­¥ ­ ¦ â 
3354
; 0 = ­¨ ®¤­  ª« ¢¨è  ­¥ ­ ¦ â 
3355
; 1 = ஢­® ®¤­  ­ ¦ â 
3355
; 1 = ஢­® ®¤­  ­ ¦ â 
3356
; 2 = ®¡¥ ­ ¦ âë
3356
; 2 = ®¡¥ ­ ¦ âë
3357
; 3 = «¥¢ ï ­ ¦ â , ¯à ¢ ï ­¥â
3357
; 3 = «¥¢ ï ­ ¦ â , ¯à ¢ ï ­¥â
3358
; 4 = ¯à ¢ ï ­ ¦ â , «¥¢ ï ­¥â
3358
; 4 = ¯à ¢ ï ­ ¦ â , «¥¢ ï ­¥â
3359
panels_ctrlkeys:
3359
panels_ctrlkeys:
3360
        dw      0x48, 0
3360
        dw      0x48, 0
3361
        dd      panels_OnKey.up
3361
        dd      panels_OnKey.up
3362
        dw      0x50, 0
3362
        dw      0x50, 0
3363
        dd      panels_OnKey.down
3363
        dd      panels_OnKey.down
3364
        dw      0x4B, 0
3364
        dw      0x4B, 0
3365
        dd      panels_OnKey.left
3365
        dd      panels_OnKey.left
3366
        dw      0x4D, 0
3366
        dw      0x4D, 0
3367
        dd      panels_OnKey.right
3367
        dd      panels_OnKey.right
3368
        dw      0xF, 0
3368
        dw      0xF, 0
3369
        dd      panels_OnKey.tab
3369
        dd      panels_OnKey.tab
3370
        dw      0x47, 0
3370
        dw      0x47, 0
3371
        dd      panels_OnKey.home
3371
        dd      panels_OnKey.home
3372
        dw      0x4F, 0
3372
        dw      0x4F, 0
3373
        dd      panels_OnKey.end
3373
        dd      panels_OnKey.end
3374
        dw      0x1C, 0
3374
        dw      0x1C, 0
3375
        dd      panels_OnKey.enter
3375
        dd      panels_OnKey.enter
3376
        dw      0x3D, 0
3376
        dw      0x3D, 0
3377
        dd      panels_OnKey.f3
3377
        dd      panels_OnKey.f3
3378
        dw      0x42, 0
3378
        dw      0x42, 0
3379
        dd      panels_OnKey.f8
3379
        dd      panels_OnKey.f8
3380
        dw      0x44, 0
3380
        dw      0x44, 0
3381
        dd      exit
3381
        dd      exit
3382
repeat 9-3+1
3382
repeat 9-3+1
3383
        dw      0x3D+%-1, 0x10
3383
        dw      0x3D+%-1, 0x10
3384
        dd      panels_OnKey.ctrl_f39
3384
        dd      panels_OnKey.ctrl_f39
3385
end repeat
3385
end repeat
3386
        dw      0x3B, 0x100
3386
        dw      0x3B, 0x100
3387
        dd      panels_OnKey.alt_f12
3387
        dd      panels_OnKey.alt_f12
3388
        dw      0x3C, 0x100
3388
        dw      0x3C, 0x100
3389
        dd      panels_OnKey.alt_f12
3389
        dd      panels_OnKey.alt_f12
3390
        dw      0x58, 0
3390
        dw      0x58, 0
3391
        dd      F12
3391
        dd      F12
3392
        dw      0x13, 0x10
3392
        dw      0x13, 0x10
3393
        dd      panels_OnKey.ctrl_r
3393
        dd      panels_OnKey.ctrl_r
3394
        db      0
3394
        db      0
3395
 
3395
 
3396
viewer_ctrlkeys:
3396
viewer_ctrlkeys:
3397
        dw      1, 0
3397
        dw      1, 0
3398
        dd      viewer_OnKey.exit
3398
        dd      viewer_OnKey.exit
3399
        dw      0x51, 0
3399
        dw      0x51, 0
3400
        dd      viewer_OnKey.pgdn
3400
        dd      viewer_OnKey.pgdn
3401
        dw      0x49, 0
3401
        dw      0x49, 0
3402
        dd      viewer_OnKey.pgup
3402
        dd      viewer_OnKey.pgup
3403
        dw      0x50, 0
3403
        dw      0x50, 0
3404
        dd      viewer_OnKey.down
3404
        dd      viewer_OnKey.down
3405
        dw      0x48, 0
3405
        dw      0x48, 0
3406
        dd      viewer_OnKey.up
3406
        dd      viewer_OnKey.up
3407
        dw      0x4B, 0
3407
        dw      0x4B, 0
3408
        dd      viewer_OnKey.left
3408
        dd      viewer_OnKey.left
3409
        dw      0x4B, 0x10
3409
        dw      0x4B, 0x10
3410
        dd      viewer_OnKey.ctrl_left
3410
        dd      viewer_OnKey.ctrl_left
3411
        dw      0x4B, 0x11
3411
        dw      0x4B, 0x11
3412
        dd      viewer_OnKey.ctrl_shift_left
3412
        dd      viewer_OnKey.ctrl_shift_left
3413
        dw      0x4C, 0
3413
        dw      0x4C, 0
3414
        dd      viewer_OnKey.exit
3414
        dd      viewer_OnKey.exit
3415
        dw      0x4D, 0
3415
        dw      0x4D, 0
3416
        dd      viewer_OnKey.right
3416
        dd      viewer_OnKey.right
3417
        dw      0x4D, 0x10
3417
        dw      0x4D, 0x10
3418
        dd      viewer_OnKey.ctrl_right
3418
        dd      viewer_OnKey.ctrl_right
3419
        dw      0x4D, 0x11
3419
        dw      0x4D, 0x11
3420
        dd      viewer_OnKey.ctrl_shift_right
3420
        dd      viewer_OnKey.ctrl_shift_right
3421
        dw      0x3C, 0
3421
        dw      0x3C, 0
3422
        dd      viewer_OnKey.f2
3422
        dd      viewer_OnKey.f2
3423
        dw      0x3D, 0
3423
        dw      0x3D, 0
3424
        dd      viewer_OnKey.exit
3424
        dd      viewer_OnKey.exit
3425
        dw      0x3E, 0
3425
        dw      0x3E, 0
3426
        dd      viewer_OnKey.f4
3426
        dd      viewer_OnKey.f4
3427
        dw      0x42, 0
3427
        dw      0x42, 0
3428
        dd      viewer_OnKey.f8
3428
        dd      viewer_OnKey.f8
3429
        dw      0x44, 0
3429
        dw      0x44, 0
3430
        dd      viewer_OnKey.exit
3430
        dd      viewer_OnKey.exit
3431
        dw      0x47, 0
3431
        dw      0x47, 0
3432
        dd      viewer_OnKey.home
3432
        dd      viewer_OnKey.home
3433
        dw      0x4F, 0
3433
        dw      0x4F, 0
3434
        dd      viewer_OnKey.end
3434
        dd      viewer_OnKey.end
3435
        dw      0x58, 0
3435
        dw      0x58, 0
3436
        dd      F12
3436
        dd      F12
3437
        db      0
3437
        db      0
3438
 
3438
 
3439
dirinfo:
3439
dirinfo:
3440
                dd      1
3440
                dd      1
3441
.first          dd      0
3441
.first          dd      0
3442
                dd      0
3442
                dd      0
3443
.size           dd      300
3443
.size           dd      300
3444
.dirdata        dd      0
3444
.dirdata        dd      0
3445
                db      0
3445
                db      0
3446
.name           dd      0
3446
.name           dd      0
3447
 
3447
 
3448
readinfo:
3448
readinfo:
3449
                dd      0
3449
                dd      0
3450
.first          dq      0
3450
.first          dq      0
3451
.size           dd      0
3451
.size           dd      0
3452
.data           dd      0
3452
.data           dd      0
3453
                db      0
3453
                db      0
3454
.name           dd      0
3454
.name           dd      0
3455
 
3455
 
3456
attrinfo:
3456
attrinfo:
3457
                dd      5
3457
                dd      5
3458
                dd      0
3458
                dd      0
3459
                dd      0
3459
                dd      0
3460
                dd      0
3460
                dd      0
3461
                dd      .attr
3461
                dd      .attr
3462
                db      0
3462
                db      0
3463
.name           dd      0
3463
.name           dd      0
3464
 
3464
 
3465
delinfo:
3465
delinfo:
3466
                dd      8
3466
                dd      8
3467
                dd      0
3467
                dd      0
3468
                dd      0
3468
                dd      0
3469
                dd      0
3469
                dd      0
3470
                dd      0
3470
                dd      0
3471
                db      0
3471
                db      0
3472
                dd      execdata
3472
                dd      execdata
3473
 
3473
 
3474
if lang eq ru
3474
if lang eq ru
3475
compare_names   db      '¨ˆà¬Œ €­á‘¤„'
3475
compare_names   db      '¨ˆà¬Œ €­á‘¤„'
3476
else
3476
else
3477
compare_names   db      'nNxXmMsSuUcCaA'
3477
compare_names   db      'nNxXmMsSuUcCaA'
3478
end if
3478
end if
3479
 
3479
 
3480
; ‡¤¥áì ­ ç¨­ îâáï ª®­ä¨£ãà æ¨®­­ë¥ ¤ ­­ë¥ - ¢ ⥪ã饩 ॠ«¨§ æ¨¨ ®­¨ § è¨âë ¢ ¡¨­ à­¨ª
3480
; ‡¤¥áì ­ ç¨­ îâáï ª®­ä¨£ãà æ¨®­­ë¥ ¤ ­­ë¥ - ¢ ⥪ã饩 ॠ«¨§ æ¨¨ ®­¨ § è¨âë ¢ ¡¨­ à­¨ª
3481
 
3481
 
3482
;  ­¥«ì
3482
;  ­¥«ì
3483
panel_normal_color      db      1Bh
3483
panel_normal_color      db      1Bh
3484
panel_border_color      db      1Bh
3484
panel_border_color      db      1Bh
3485
panel_cursor_color      db      30h
3485
panel_cursor_color      db      30h
3486
panel_header_color      db      1Bh
3486
panel_header_color      db      1Bh
3487
panel_active_header_color db    30h
3487
panel_active_header_color db    30h
3488
column_header_color     db      1Eh
3488
column_header_color     db      1Eh
3489
panel_nscreens_color    db      0Bh
3489
panel_nscreens_color    db      0Bh
3490
; „¨ «®£¨
3490
; „¨ «®£¨
3491
dialog_main_color       db      70h
3491
dialog_main_color       db      70h
3492
dialog_border_color     db      70h
3492
dialog_border_color     db      70h
3493
dialog_header_color     db      70h
3493
dialog_header_color     db      70h
3494
dialog_normal_btn_color db      70h
3494
dialog_normal_btn_color db      70h
3495
dialog_selected_btn_color db    30h
3495
dialog_selected_btn_color db    30h
3496
; Œ¥­î
3496
; Œ¥­î
3497
menu_normal_color       db      3Fh
3497
menu_normal_color       db      3Fh
3498
menu_selected_color     db      0Fh
3498
menu_selected_color     db      0Fh
3499
menu_highlight_color    db      3Eh
3499
menu_highlight_color    db      3Eh
3500
menu_selected_highlight_color db 0Eh
3500
menu_selected_highlight_color db 0Eh
3501
menu_border_color       db      3Fh
3501
menu_border_color       db      3Fh
3502
menu_header_color       db      3Fh
3502
menu_header_color       db      3Fh
3503
menu_scrollbar_color    db      3Fh
3503
menu_scrollbar_color    db      3Fh
3504
; ‹¨­¥©ª  ª« ¢¨è
3504
; ‹¨­¥©ª  ª« ¢¨è
3505
keybar_number_color     db      7
3505
keybar_number_color     db      7
3506
keybar_name_color       db      30h
3506
keybar_name_color       db      30h
3507
keybar_bgr_color        db      7
3507
keybar_bgr_color        db      7
3508
; Š®¬ ­¤­ ï áâப 
3508
; Š®¬ ­¤­ ï áâப 
3509
cmdbar_normal_color     db      7
3509
cmdbar_normal_color     db      7
3510
cmdbar_prefix_color     db      7
3510
cmdbar_prefix_color     db      7
3511
; à®á¬®âà騪
3511
; à®á¬®âà騪
3512
view_normal_color       db      1Bh
3512
view_normal_color       db      1Bh
3513
view_status_color       db      30h
3513
view_status_color       db      30h
3514
view_arrows_color       db      1Eh
3514
view_arrows_color       db      1Eh
3515
 
3515
 
3516
; ®¤á¢¥âª  ä ©«®¢
3516
; ®¤á¢¥âª  ä ©«®¢
3517
highlight_num_groups    dd      10
3517
highlight_num_groups    dd      10
3518
highlight_groups        dd      highlight_group0
3518
highlight_groups        dd      highlight_group0
3519
                dd      highlight_group1
3519
                dd      highlight_group1
3520
                dd      highlight_group2
3520
                dd      highlight_group2
3521
                dd      highlight_group3
3521
                dd      highlight_group3
3522
                dd      highlight_group4
3522
                dd      highlight_group4
3523
                dd      highlight_group5
3523
                dd      highlight_group5
3524
                dd      highlight_group6
3524
                dd      highlight_group6
3525
                dd      highlight_group7
3525
                dd      highlight_group7
3526
                dd      highlight_group8
3526
                dd      highlight_group8
3527
                dd      highlight_group9
3527
                dd      highlight_group9
3528
 
3528
 
3529
; ”®à¬ â ®¯¨á ­¨ï £àã¯¯ë ¯®¤á¢¥âª¨:
3529
; ”®à¬ â ®¯¨á ­¨ï £àã¯¯ë ¯®¤á¢¥âª¨:
3530
virtual at 0
3530
virtual at 0
3531
highlight:
3531
highlight:
3532
        .NormalColor            db ?
3532
        .NormalColor            db ?
3533
        .CursorColor            db ?
3533
        .CursorColor            db ?
3534
        .IncludeAttributes      db ?
3534
        .IncludeAttributes      db ?
3535
        .Mask:                  ; ASCIIZ-string
3535
        .Mask:                  ; ASCIIZ-string
3536
end virtual
3536
end virtual
3537
 
3537
 
3538
highlight_group0:
3538
highlight_group0:
3539
        db      13h
3539
        db      13h
3540
        db      38h
3540
        db      38h
3541
        db      2
3541
        db      2
3542
        db      '*',0
3542
        db      '*',0
3543
highlight_group1:
3543
highlight_group1:
3544
        db      13h
3544
        db      13h
3545
        db      38h
3545
        db      38h
3546
        db      4
3546
        db      4
3547
        db      '*',0
3547
        db      '*',0
3548
highlight_group2:
3548
highlight_group2:
3549
        db      1Fh
3549
        db      1Fh
3550
        db      3Fh
3550
        db      3Fh
3551
        db      10h
3551
        db      10h
3552
        db      '*|..',0
3552
        db      '*|..',0
3553
highlight_group3:
3553
highlight_group3:
3554
        db      0
3554
        db      0
3555
        db      0
3555
        db      0
3556
        db      10h
3556
        db      10h
3557
        db      '..',0
3557
        db      '..',0
3558
highlight_group4:
3558
highlight_group4:
3559
        db      1Ah
3559
        db      1Ah
3560
        db      3Ah
3560
        db      3Ah
3561
        db      0
3561
        db      0
3562
        db      '*.exe,*.com,*.bat,*.cmd',0
3562
        db      '*.exe,*.com,*.bat,*.cmd',0
3563
highlight_group5:
3563
highlight_group5:
3564
        db      1Ah
3564
        db      1Ah
3565
        db      3Ah
3565
        db      3Ah
3566
        db      0
3566
        db      0
3567
        db      '*|*.*',0
3567
        db      '*|*.*',0
3568
highlight_group6:
3568
highlight_group6:
3569
        db      1Dh
3569
        db      1Dh
3570
        db      3Dh
3570
        db      3Dh
3571
        db      0
3571
        db      0
3572
        db      '*.rar,*.zip,*.[zj],*.[bg7]z,*.[bg]zip,*.tar,*.t[ag]z,*.ar[cj],*.r[0-9][0-9],'
3572
        db      '*.rar,*.zip,*.[zj],*.[bg7]z,*.[bg]zip,*.tar,*.t[ag]z,*.ar[cj],*.r[0-9][0-9],'
3573
        db      '*.a[0-9][0-9],*.bz2,*.cab,*.msi,*.jar,*.lha,*.lzh,*.ha,*.ac[bei],*.pa[ck],'
3573
        db      '*.a[0-9][0-9],*.bz2,*.cab,*.msi,*.jar,*.lha,*.lzh,*.ha,*.ac[bei],*.pa[ck],'
3574
        db      '*.rk,*.cpio,*.rpm,*.zoo,*.hqx,*.sit,*.ice,*.uc2,*.ain,*.imp,*.777,*.ufa,*.boa,'
3574
        db      '*.rk,*.cpio,*.rpm,*.zoo,*.hqx,*.sit,*.ice,*.uc2,*.ain,*.imp,*.777,*.ufa,*.boa,'
3575
        db      '*.bs[2a],*.sea,*.hpk,*.ddi,*.x2,*.rkv,*.[lw]sz,*.h[ay]p,*.lim,*.sqz,*.chz',0
3575
        db      '*.bs[2a],*.sea,*.hpk,*.ddi,*.x2,*.rkv,*.[lw]sz,*.h[ay]p,*.lim,*.sqz,*.chz',0
3576
highlight_group7:
3576
highlight_group7:
3577
        db      16h
3577
        db      16h
3578
        db      36h
3578
        db      36h
3579
        db      0
3579
        db      0
3580
        db      '*.bak,*.tmp',0
3580
        db      '*.bak,*.tmp',0
3581
highlight_group8:
3581
highlight_group8:
3582
        db      17h
3582
        db      17h
3583
        db      37h
3583
        db      37h
3584
        db      0
3584
        db      0
3585
        db      '*.asm,*.inc',0
3585
        db      '*.asm,*.inc',0
3586
highlight_group9:
3586
highlight_group9:
3587
        db      1Fh
3587
        db      1Fh
3588
        db      3Fh
3588
        db      3Fh
3589
        db      10h
3589
        db      10h
3590
        db      '*',0
3590
        db      '*',0
3591
 
3591
 
3592
associations:
3592
associations:
3593
        dd      aAsm, tinypad
3593
        dd      aAsm, tinypad
3594
        dd      aInc, tinypad
3594
        dd      aInc, tinypad
3595
        dd      aTxt, tinypad
3595
        dd      aTxt, tinypad
3596
        dd      aJpg, jpegview
3596
        dd      aJpg, jpegview
3597
        dd      aJpeg, jpegview
3597
        dd      aJpeg, jpegview
3598
        dd      aGif, gifview
3598
        dd      aGif, gifview
3599
        dd      aWav, ac97wav
3599
        dd      aWav, ac97
3600
        dd      aMp3, ac97wav
3600
        dd      aMp3, ac97
3601
        dd      aMid, midamp
3601
        dd      aMid, midamp
3602
        dd      aBmp, mv
3602
        dd      aBmp, mv
3603
        dd      aPng, archer
3603
        dd      aPng, archer
3604
        dd      aRtf, rtfread
3604
        dd      aRtf, rtfread
-
 
3605
        dd      a3ds, view3ds
-
 
3606
        dd      aLif, life2
3605
associations_end:
3607
associations_end:
3606
 
3608
 
3607
aAsm db 'asm',0
3609
aAsm db 'asm',0
3608
aInc db 'inc',0
3610
aInc db 'inc',0
3609
aTxt db 'txt',0
3611
aTxt db 'txt',0
3610
tinypad db '/rd/1/TinyPad',0
3612
tinypad db '/rd/1/TinyPad',0
3611
 
3613
 
3612
aJpg db 'jpg',0
3614
aJpg db 'jpg',0
3613
aJpeg db 'jpeg',0
3615
aJpeg db 'jpeg',0
3614
jpegview db '/rd/1/JpegView',0
3616
jpegview db '/rd/1/JpegView',0
3615
 
3617
 
3616
aGif db 'gif',0
3618
aGif db 'gif',0
3617
gifview db '/rd/1/GIFVIEW',0
3619
gifview db '/rd/1/GIFVIEW',0
3618
 
3620
 
3619
aWav db 'wav',0
3621
aWav db 'wav',0
3620
aMp3 db 'mp3',0
3622
aMp3 db 'mp3',0
3621
ac97wav db '/rd/1/AC97WAV',0
3623
ac97 db '/rd/1/AC97SND',0
3622
 
3624
 
3623
aMid db 'mid',0
3625
aMid db 'mid',0
3624
midamp db '/rd/1/MIDAMP',0
3626
midamp db '/rd/1/MIDAMP',0
3625
 
3627
 
3626
aBmp db 'bmp',0
3628
aBmp db 'bmp',0
3627
mv db '/rd/1/MV',0
3629
mv db '/rd/1/MV',0
3628
 
3630
 
3629
aPng db 'png',0
3631
aPng db 'png',0
3630
archer db '/rd/1/@rcher',0
3632
archer db '/rd/1/@rcher',0
3631
 
3633
 
3632
aRtf db 'rtf',0
3634
aRtf db 'rtf',0
3633
rtfread db '/rd/1/RtfRead',0
3635
rtfread db '/rd/1/RtfRead',0
-
 
3636
 
-
 
3637
a3ds db '3ds',0
-
 
3638
view3ds db '/rd/1/3d/view3ds',0
-
 
3639
 
-
 
3640
aLif db 'lif',0
-
 
3641
life2 db '/rd/1/demos/life2',0
3634
 
3642
 
3635
bConfirmDelete  db      1
3643
bConfirmDelete  db      1
3636
 
3644
 
3637
; ‡¤¥áì § ª ­ç¨¢ îâáï ª®­ä¨£ãà æ¨®­­ë¥ ¤ ­­ë¥
3645
; ‡¤¥áì § ª ­ç¨¢ îâáï ª®­ä¨£ãà æ¨®­­ë¥ ¤ ­­ë¥
3638
 
3646
 
3639
bWasE0          db      0
3647
bWasE0          db      0
3640
ctrlstate       db      0
3648
ctrlstate       db      0
3641
MemForImage     dd      0
3649
MemForImage     dd      0
3642
 
3650
 
3643
align   4
3651
align   4
3644
f8_confirm_dlgdata:
3652
f8_confirm_dlgdata:
3645
        dd      0
3653
        dd      0
3646
.x      dd      -1
3654
.x      dd      -1
3647
.y      dd      -1
3655
.y      dd      -1
3648
.width  dd      ?
3656
.width  dd      ?
3649
.height dd      3
3657
.height dd      3
3650
        dd      4
3658
        dd      4
3651
        dd      2
3659
        dd      2
3652
        dd      aDeleteCaption
3660
        dd      aDeleteCaption
3653
.main_color db ?
3661
.main_color db ?
3654
.border_color db ?
3662
.border_color db ?
3655
.header_color db ?
3663
.header_color db ?
3656
        db      0
3664
        db      0
3657
        dd      0
3665
        dd      0
3658
        dd      0
3666
        dd      0
3659
        dd      4
3667
        dd      4
3660
; áâப  "‚ë å®â¨â¥ 㤠«¨âì ..."
3668
; áâப  "‚ë å®â¨â¥ 㤠«¨âì ..."
3661
        dd      1
3669
        dd      1
3662
        dd      1,0
3670
        dd      1,0
3663
.width2 dd      ?
3671
.width2 dd      ?
3664
        dd      0
3672
        dd      0
3665
        dd      aConfirmDeleteTextBuf
3673
        dd      aConfirmDeleteTextBuf
3666
        dd      1
3674
        dd      1
3667
; áâப  á ¨¬¥­¥¬ ä ©« /¯ ¯ª¨
3675
; áâப  á ¨¬¥­¥¬ ä ©« /¯ ¯ª¨
3668
        dd      1
3676
        dd      1
3669
        dd      1,1
3677
        dd      1,1
3670
.width3 dd      ?
3678
.width3 dd      ?
3671
        dd      1
3679
        dd      1
3672
.name   dd      ?
3680
.name   dd      ?
3673
        dd      1
3681
        dd      1
3674
; ª­®¯ª  "㤠«¨âì"
3682
; ª­®¯ª  "㤠«¨âì"
3675
.del_btn:
3683
.del_btn:
3676
        dd      2
3684
        dd      2
3677
.del_x1 dd      ?
3685
.del_x1 dd      ?
3678
        dd      2
3686
        dd      2
3679
.del_x2 dd      ?
3687
.del_x2 dd      ?
3680
        dd      2
3688
        dd      2
3681
        dd      aDelete
3689
        dd      aDelete
3682
.flags1 dd      4
3690
.flags1 dd      4
3683
; ª­®¯ª  "®â¬¥­¨âì"
3691
; ª­®¯ª  "®â¬¥­¨âì"
3684
        dd      2
3692
        dd      2
3685
.cnl_x1 dd      ?
3693
.cnl_x1 dd      ?
3686
        dd      2
3694
        dd      2
3687
.cnl_x2 dd      ?
3695
.cnl_x2 dd      ?
3688
        dd      2
3696
        dd      2
3689
        dd      aCancel
3697
        dd      aCancel
3690
.flags2 dd      0
3698
.flags2 dd      0
3691
 
3699
 
3692
if lang eq ru
3700
if lang eq ru
3693
aDeleteCaption          db      '“¤ «¥­¨¥',0
3701
aDeleteCaption          db      '“¤ «¥­¨¥',0
3694
aConfirmDeleteText      db      '‚ë å®â¨â¥ 㤠«¨âì ',0
3702
aConfirmDeleteText      db      '‚ë å®â¨â¥ 㤠«¨âì ',0
3695
aDeleteFolder           db      '¯ ¯ªã',0
3703
aDeleteFolder           db      '¯ ¯ªã',0
3696
aConfirmDeleteTextMax = $ - aConfirmDeleteText - 2
3704
aConfirmDeleteTextMax = $ - aConfirmDeleteText - 2
3697
aDeleteFile             db      'ä ©«',0
3705
aDeleteFile             db      'ä ©«',0
3698
aDelete                 db      ' “¤ «¨âì ',0
3706
aDelete                 db      ' “¤ «¨âì ',0
3699
aDeleteLength = $ - aDelete - 1
3707
aDeleteLength = $ - aDelete - 1
3700
aCancel                 db      ' Žâ¬¥­¨âì ',0
3708
aCancel                 db      ' Žâ¬¥­¨âì ',0
3701
aCancelLength = $ - aCancel - 1
3709
aCancelLength = $ - aCancel - 1
3702
else
3710
else
3703
aDeleteCaption          db      'Delete',0
3711
aDeleteCaption          db      'Delete',0
3704
aConfirmDeleteText      db      'Do you wish to delete ',0
3712
aConfirmDeleteText      db      'Do you wish to delete ',0
3705
aDeleteFolder           db      'the folder',0
3713
aDeleteFolder           db      'the folder',0
3706
aConfirmDeleteTextMax = $ - aConfirmDeleteText - 2
3714
aConfirmDeleteTextMax = $ - aConfirmDeleteText - 2
3707
aDeleteFile             db      'the file',0
3715
aDeleteFile             db      'the file',0
3708
aDelete                 db      ' Delete ',0
3716
aDelete                 db      ' Delete ',0
3709
aDeleteLength = $ - aDelete - 1
3717
aDeleteLength = $ - aDelete - 1
3710
aCancel                 db      ' Cancel ',0
3718
aCancel                 db      ' Cancel ',0
3711
aCancelLength = $ - aCancel - 1
3719
aCancelLength = $ - aCancel - 1
3712
end if
3720
end if
3713
 
3721
 
3714
execinfo:
3722
execinfo:
3715
        dd      7
3723
        dd      7
3716
        dd      0
3724
        dd      0
3717
execparams dd   0
3725
execparams dd   0
3718
        dd      0
3726
        dd      0
3719
        dd      0
3727
        dd      0
3720
        db      0
3728
        db      0
3721
execptr dd      ?
3729
execptr dd      ?
3722
 
3730
 
3723
IncludeIGlobals
3731
IncludeIGlobals
3724
 
3732
 
3725
i_end:
3733
i_end:
3726
 
3734
 
3727
IncludeUGlobals
3735
IncludeUGlobals
3728
 
3736
 
3729
execdata rb     1024
3737
execdata rb     1024
3730
        align   4
3738
        align   4
3731
attrinfo.attr   rb      40
3739
attrinfo.attr   rb      40
3732
 
3740
 
3733
panel1_data:
3741
panel1_data:
3734
panel1_left     dd      ?
3742
panel1_left     dd      ?
3735
panel1_top      dd      ?
3743
panel1_top      dd      ?
3736
panel1_width    dd      ?
3744
panel1_width    dd      ?
3737
panel1_height   dd      ?
3745
panel1_height   dd      ?
3738
panel1_index    dd      ?
3746
panel1_index    dd      ?
3739
panel1_start    dd      ?
3747
panel1_start    dd      ?
3740
panel1_colsz    dd      ?
3748
panel1_colsz    dd      ?
3741
panel1_colst    dd      ?
3749
panel1_colst    dd      ?
3742
panel1_sortmode db      ?
3750
panel1_sortmode db      ?
3743
                rb      3
3751
                rb      3
3744
panel1_nfa      dd      ?
3752
panel1_nfa      dd      ?
3745
panel1_numfiles dd      ?
3753
panel1_numfiles dd      ?
3746
panel1_files    dd      ?
3754
panel1_files    dd      ?
3747
panel1_dir      rb      1024
3755
panel1_dir      rb      1024
3748
 
3756
 
3749
panel2_data:
3757
panel2_data:
3750
panel2_left     dd      ?
3758
panel2_left     dd      ?
3751
panel2_top      dd      ?
3759
panel2_top      dd      ?
3752
panel2_width    dd      ?
3760
panel2_width    dd      ?
3753
panel2_height   dd      ?
3761
panel2_height   dd      ?
3754
panel2_index    dd      ?
3762
panel2_index    dd      ?
3755
panel2_start    dd      ?
3763
panel2_start    dd      ?
3756
panel2_colsz    dd      ?
3764
panel2_colsz    dd      ?
3757
panel2_colst    dd      ?
3765
panel2_colst    dd      ?
3758
panel2_sortmode db      ?
3766
panel2_sortmode db      ?
3759
                rb      3
3767
                rb      3
3760
panel2_nfa      dd      ?
3768
panel2_nfa      dd      ?
3761
panel2_numfiles dd      ?
3769
panel2_numfiles dd      ?
3762
panel2_files    dd      ?
3770
panel2_files    dd      ?
3763
panel2_dir      rb      1024
3771
panel2_dir      rb      1024
3764
 
3772
 
3765
console_data    rb      max_width*max_height*2
3773
console_data    rb      max_width*max_height*2
3766
 
3774
 
3767
cur_header      rb      max_width
3775
cur_header      rb      max_width
3768
tmp             dd      ?
3776
tmp             dd      ?
3769
 
3777
 
3770
skinh           dd      ?
3778
skinh           dd      ?
3771
std_colors      rd      10
3779
std_colors      rd      10
3772
 
3780
 
3773
column_left     dd      ?
3781
column_left     dd      ?
3774
column_top      dd      ?
3782
column_top      dd      ?
3775
column_width    dd      ?
3783
column_width    dd      ?
3776
column_height   dd      ?
3784
column_height   dd      ?
3777
column_index    dd      ?
3785
column_index    dd      ?
3778
 
3786
 
3779
scrpos          dq      ?
3787
scrpos          dq      ?
3780
viewer_right_side dq    ?
3788
viewer_right_side dq    ?
3781
 
3789
 
3782
saved_file_name:
3790
saved_file_name:
3783
procinfo        rb      1024
3791
procinfo        rb      1024
3784
 
3792
 
3785
driveinfo       rb      32+304
3793
driveinfo       rb      32+304
3786
tmpname         rb      32
3794
tmpname         rb      32
3787
 
3795
 
3788
screens         dd      ?
3796
screens         dd      ?
3789
num_screens     dd      ?
3797
num_screens     dd      ?
3790
active_screen_vtable dd ?
3798
active_screen_vtable dd ?
3791
active_screen_data dd   ?
3799
active_screen_data dd   ?
3792
 
3800
 
3793
aConfirmDeleteTextBuf   rb      aConfirmDeleteTextMax + 1
3801
aConfirmDeleteTextBuf   rb      aConfirmDeleteTextMax + 1
3794
 
3802
 
3795
; stack
3803
; stack
3796
        align   4
3804
        align   4
3797
        rb      512
3805
        rb      512
3798
stacktop:
3806
stacktop:
3799
; buffers for directory - may be resized dynamically
3807
; buffers for directory - may be resized dynamically
3800
buf1    rb      4*304 + 32 + 304*304
3808
buf1    rb      4*304 + 32 + 304*304
3801
buf2    rb      4*304 + 32 + 304*304
3809
buf2    rb      4*304 + 32 + 304*304
3802
 
3810
 
3803
mem:
3811
mem: