Rev 9691 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 9691 | Rev 9726 | ||
---|---|---|---|
Line 37... | Line 37... | ||
37 | ret |
37 | ret |
38 | ;------------------------------------------------------------------------------ |
38 | ;------------------------------------------------------------------------------ |
39 | draw_left_sort_button: |
39 | draw_left_sort_button: |
40 | mov bx,[left_panel_x.start_x] |
40 | mov bx,[left_panel_x.start_x] |
41 | add bx,[left_panel_x.size_x] |
41 | add bx,[left_panel_x.size_x] |
42 | sub ebx,50+15 |
42 | sub ebx,50+15+12 |
43 | mov cx,[left_panel_y.start_y] |
43 | mov cx,[left_panel_y.start_y] |
44 | call calclulate_sort_button_1 |
44 | call calclulate_sort_button_1 |
45 | mov edx,145 |
45 | mov edx,145 |
46 | ;-------------------------------------- |
46 | ;-------------------------------------- |
47 | .start: |
47 | .start: |
Line 78... | Line 78... | ||
78 | shl eax,16 |
78 | shl eax,16 |
79 | add ebx,eax |
79 | add ebx,eax |
80 | cmp ebp,4 |
80 | cmp ebp,4 |
81 | jne @f |
81 | jne @f |
Line 82... | Line 82... | ||
82 | 82 | ||
83 | mov bx,15 |
83 | mov bx,15+12 |
84 | jmp .continue |
84 | jmp .continue |
85 | ;-------------------------------------- |
85 | ;-------------------------------------- |
86 | @@: |
86 | @@: |
87 | mov bx,1 |
87 | mov bx,1 |
Line 127... | Line 127... | ||
127 | ret |
127 | ret |
128 | ;------------------------------------------------------------------------------ |
128 | ;------------------------------------------------------------------------------ |
129 | draw_right_sort_button: |
129 | draw_right_sort_button: |
130 | mov bx,[right_panel_x.start_x] |
130 | mov bx,[right_panel_x.start_x] |
131 | add bx,[right_panel_x.size_x] |
131 | add bx,[right_panel_x.size_x] |
132 | sub ebx,50+15 |
132 | sub ebx,50+15+12 |
133 | mov cx,[right_panel_y.start_y] |
133 | mov cx,[right_panel_y.start_y] |
134 | call calclulate_sort_button_1 |
134 | call calclulate_sort_button_1 |
135 | mov edx,149 |
135 | mov edx,149 |
136 | ;-------------------------------------- |
136 | ;-------------------------------------- |
137 | .start: |
137 | .start: |
Line 281... | Line 281... | ||
281 | inc ebx |
281 | inc ebx |
282 | loop .p4 |
282 | loop .p4 |
283 | pop edx ecx ebx eax |
283 | pop edx ecx ebx eax |
284 | ret |
284 | ret |
285 | ;------------------------------------------------------------------------------ |
285 | ;------------------------------------------------------------------------------ |
286 | decimal_string_4: |
286 | decimal_string: |
287 | push eax ecx edx |
287 | push eax ebx ecx edx |
288 | xor ecx,ecx |
288 | mov ecx,10 |
289 | mov [ebx],byte '0' |
- | |
290 | inc ebx |
- | |
291 | ;-------------------------------------- |
289 | ;-------------------------------------- |
292 | .p3: |
290 | .p3: |
293 | xor edx,edx |
291 | xor edx,edx |
294 | push ebx |
- | |
295 | mov ebx,10 |
- | |
296 | div ebx |
292 | div ecx |
297 | pop ebx |
- | |
298 | add edx,48 |
293 | add edx,48 |
299 | push edx |
- | |
300 | inc ecx |
- | |
301 | cmp eax,0 |
- | |
302 | jne .p3 |
- | |
303 | - | ||
304 | cmp ecx,3 |
- | |
305 | jbe .p4 |
- | |
306 | - | ||
307 | mov ecx,4 |
- | |
308 | dec ebx |
- | |
309 | ;-------------------------------------- |
- | |
310 | .p4: |
- | |
311 | pop edx |
- | |
312 | mov [ebx],dl |
294 | mov [ebx],dl |
313 | inc ebx |
295 | dec ebx |
- | 296 | test eax,eax |
|
314 | loop .p4 |
297 | jnz .p3 |
Line 315... | Line 298... | ||
315 | 298 | ||
316 | pop edx ecx eax |
299 | pop edx ecx ebx eax |
317 | ret |
300 | ret |
318 | ;------------------------------------------------------------------------------ |
301 | ;------------------------------------------------------------------------------ |
319 | draw_type_size_date: |
302 | draw_type_size_date: |
320 | pusha |
303 | pusha |
Line 428... | Line 411... | ||
428 | mov ecx,4 |
411 | mov ecx,4 |
429 | call .qword_div |
412 | call .qword_div |
430 | pop ecx |
413 | pop ecx |
431 | jz @f |
414 | jz @f |
Line 432... | Line 415... | ||
432 | 415 | ||
433 | mov ebx,size_table |
416 | mov ebx,size_table+3 |
434 | call decimal_string_4 |
417 | call decimal_string |
435 | mov [ebx],byte 'E' ; Exa Byte |
418 | mov [ebx+1],byte 'E' ; Exa Byte |
436 | jmp .size_convert_end |
419 | jmp .size_convert_end |
437 | ;-------------------------------------- |
420 | ;-------------------------------------- |
438 | @@: |
421 | @@: |
439 | push ecx |
422 | push ecx |
440 | mov ecx,3 |
423 | mov ecx,3 |
441 | call .qword_div |
424 | call .qword_div |
442 | pop ecx |
425 | pop ecx |
Line 443... | Line 426... | ||
443 | jz @f |
426 | jz @f |
444 | 427 | ||
445 | mov ebx,size_table |
428 | mov ebx,size_table+3 |
446 | call decimal_string_4 |
429 | call decimal_string |
447 | mov [ebx],byte 'P' ; Peta Byte |
430 | mov [ebx+1],byte 'P' ; Peta Byte |
448 | jmp .size_convert_end |
431 | jmp .size_convert_end |
449 | ;-------------------------------------- |
432 | ;-------------------------------------- |
450 | @@: |
433 | @@: |
451 | push ecx |
434 | push ecx |
452 | mov ecx,2 |
435 | mov ecx,2 |
453 | call .qword_div |
436 | call .qword_div |
Line 454... | Line 437... | ||
454 | pop ecx |
437 | pop ecx |
455 | jz @f |
438 | jz @f |
456 | 439 | ||
457 | mov ebx,size_table |
440 | mov ebx,size_table+3 |
458 | call decimal_string_4 |
441 | call decimal_string |
459 | mov [ebx],byte 'T' ; Tera Byte |
442 | mov [ebx+1],byte 'T' ; Tera Byte |
460 | jmp .size_convert_end |
443 | jmp .size_convert_end |
461 | ;-------------------------------------- |
444 | ;-------------------------------------- |
462 | @@: |
445 | @@: |
463 | push ecx |
446 | push ecx |
464 | mov ecx,1 |
447 | mov ecx,1 |
Line 465... | Line 448... | ||
465 | call .qword_div |
448 | call .qword_div |
466 | pop ecx |
449 | pop ecx |
467 | jz @f |
450 | jz @f |
468 | 451 | ||
469 | mov ebx,size_table |
452 | mov ebx,size_table+3 |
470 | call decimal_string_4 |
453 | call decimal_string |
471 | mov [ebx],byte 'G' ; Giga Byte |
454 | mov [ebx+1],byte 'G' ; Giga Byte |
472 | jmp .size_convert_end |
455 | jmp .size_convert_end |
473 | ;-------------------------------------- |
456 | ;-------------------------------------- |
474 | @@: |
457 | @@: |
475 | mov eax,[edx-40+32] |
458 | mov eax,[edx-40+32] |
Line 476... | Line 459... | ||
476 | mov ebx,eax |
459 | mov ebx,eax |
477 | shr eax,20 ; /(1024*1024) |
460 | shr eax,20 ; /(1024*1024) |
478 | test eax,eax |
461 | test eax,eax |
479 | jz @f |
462 | jz @f |
480 | 463 | ||
481 | mov ebx,size_table |
464 | mov ebx,size_table+3 |
482 | call decimal_string_4 |
465 | call decimal_string |
483 | mov [ebx],byte 'M' ; Mega Byte |
466 | mov [ebx+1],byte 'M' ; Mega Byte |
484 | jmp .size_convert_end |
467 | jmp .size_convert_end |
485 | ;-------------------------------------- |
468 | ;-------------------------------------- |
Line 486... | Line 469... | ||
486 | @@: |
469 | @@: |
487 | mov eax,ebx |
470 | mov eax,ebx |
488 | shr eax,10 ; /1024 |
471 | shr eax,10 ; /1024 |
489 | test eax,eax |
472 | test eax,eax |
490 | jz @f |
473 | jz @f |
491 | 474 | ||
492 | mov ebx,size_table |
475 | mov ebx,size_table+3 |
493 | call decimal_string_4 |
476 | call decimal_string |
494 | mov [ebx],byte 'K' ; Kilo Byte |
477 | mov [ebx+1],byte 'K' ; Kilo Byte |
495 | jmp .size_convert_end |
478 | jmp .size_convert_end |
496 | ;-------------------------------------- |
479 | ;-------------------------------------- |
497 | @@: |
480 | @@: |
498 | mov eax,ebx |
- | |
499 | ;.size_convert: |
481 | mov eax,ebx |
500 | mov ebx,size_table |
- | |
501 | call decimal_string_4 |
- | |
502 | ;-------------------------------------- |
482 | ;.size_convert: |
503 | .size_convert_end: |
483 | mov ebx,size_table+4 |
504 | cmp [size_table],byte '0' |
484 | call decimal_string |
505 | jne @f |
485 | ;-------------------------------------- |
Line 506... | Line -... | ||
506 | - | ||
507 | mov [size_table],byte ' ' |
486 | .size_convert_end: |
508 | ;-------------------------------------- |
- | |
509 | @@: |
- | |
510 | cmp [size_table+4],byte ' ' |
- | |
511 | jne @f |
487 | pop edx ebx |
512 | - | ||
513 | mov esi,size_table+3 |
- | |
514 | mov edi,esi |
488 | ;-------------------------------------- |
515 | inc edi |
- | |
516 | mov ecx,5 |
- | |
517 | std |
- | |
518 | rep movsb |
489 | .date: |
519 | jmp @r |
490 | cmp [edx],word '..' |
520 | ;-------------------------------------- |
491 | jne @f |
521 | @@: |
492 | |
522 | pop edx ebx |
493 | cmp [edx+2],byte 0 |
523 | ;-------------------------------------- |
494 | je .not_show_date |
524 | .date: |
495 | @@: |
525 | xor eax,eax |
496 | xor eax,eax |
526 | mov al,[edx-40+28] |
497 | mov al,[edx-40+28] |
527 | push ebx |
498 | push ebx |
- | 499 | mov ebx,date_table |
|
- | 500 | call decimal_string_2 |
|
528 | mov ebx,date_table |
501 | mov al,[edx-40+29] |
529 | call decimal_string_2 |
502 | mov ebx,date_table+3 |
530 | mov al,[edx-40+29] |
503 | call decimal_string_2 |
531 | mov ebx,date_table+3 |
504 | mov ax,[edx-40+30] |
532 | call decimal_string_2 |
505 | lea ebx,[year_table+4] |
533 | mov ax,[edx-40+30] |
506 | mov [ebx-4], dword '0000' |
534 | mov ebx,year_table |
507 | mov [ebx], byte '0' |
535 | call decimal_string_4 |
508 | call decimal_string |
536 | mov ax,[year_table+2] |
509 | mov eax,[year_table+1] |
537 | mov [date_table+6],ax |
510 | mov [date_table+6],eax |
538 | pop ebx |
511 | pop ebx |
Line 539... | Line 512... | ||
539 | ror ebx,16 |
512 | ror ebx,16 |
540 | add bx,[left_panel_x.size_x] |
513 | add bx,[left_panel_x.size_x] |
541 | sub ebx,122+12+15 |
514 | sub ebx,161 ;122+12+15 |
542 | rol ebx,16 |
515 | rol ebx,16 |
- | 516 | mov ecx,0 |
|
- | 517 | cmp [marked_file],byte 0 |
|
543 | mov ecx,0 |
518 | je @f |
544 | cmp [marked_file],byte 0 |
519 | |
545 | je @f |
520 | mov ecx,0xff0000 |
546 | 521 | ;-------------------------------------- |
|
547 | mov ecx,0xff0000 |
522 | @@: |
Line 658... | Line 633... | ||
658 | push ebx edx |
633 | push ebx edx |
659 | mov ebx,6 |
634 | mov ebx,6 |
660 | xor edx,edx |
635 | xor edx,edx |
661 | div ebx |
636 | div ebx |
662 | pop edx ebx |
637 | pop edx ebx |
663 | sub eax,23+2+2 |
638 | sub eax,23+2+2+2 |
664 | mov esi,[file_name_length] |
639 | mov esi,[file_name_length] |
665 | mov [temp_counter_1],0 |
640 | mov [temp_counter_1],0 |
666 | cmp esi,eax |
641 | cmp esi,eax |
667 | jbe @f |
642 | jbe @f |