forked from KolibriOS/kolibrios
File Browser control - some code optimization for r9682
git-svn-id: svn://kolibrios.org@9690 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
2e3c29de7d
commit
8f544cdd1d
@ -517,6 +517,21 @@ align 4
|
||||
mov [ebx],dl
|
||||
jmp .size_convert_end
|
||||
;-----------------------------------------
|
||||
.qword_div:
|
||||
mov eax,[edx-40+32]
|
||||
mov ebx,[edx-40+32+4]
|
||||
@@: ; /1024
|
||||
shrd eax,ebx,5 ; /32
|
||||
shr ebx,5 ; /32
|
||||
shrd eax,ebx,5 ; /32
|
||||
shr ebx,5 ; /32
|
||||
dec ecx
|
||||
jnz @b
|
||||
; /(1024*1024)
|
||||
shr eax,20
|
||||
test eax,eax
|
||||
ret
|
||||
;-----------------------------------------
|
||||
align 4
|
||||
.copy_size:
|
||||
;/0x1000000000000000 - EB
|
||||
@ -528,88 +543,34 @@ align 4
|
||||
mov [eax+6],dword ' '
|
||||
mov [eax+6+4],word ' '
|
||||
push ebx edx
|
||||
mov eax,[edx-40+32]
|
||||
mov ebx,[edx-40+32+4]
|
||||
; /1024
|
||||
shrd eax,ebx,5 ; /32
|
||||
shr ebx,5 ; /32
|
||||
shrd eax,ebx,5 ; /32
|
||||
shr ebx,5 ; /32
|
||||
; /1024
|
||||
shrd eax,ebx,5 ; /32
|
||||
shr ebx,5 ; /32
|
||||
shrd eax,ebx,5 ; /32
|
||||
shr ebx,5 ; /32
|
||||
; /1024
|
||||
shrd eax,ebx,5 ; /32
|
||||
shr ebx,5 ; /32
|
||||
shrd eax,ebx,5 ; /32
|
||||
shr ebx,5 ; /32
|
||||
; /1024
|
||||
shrd eax,ebx,5 ; /32
|
||||
shr ebx,5 ; /32
|
||||
shrd eax,ebx,5 ; /32
|
||||
shr ebx,5 ; /32
|
||||
; /(1024*1024)
|
||||
shr eax,20
|
||||
test eax,eax
|
||||
push ecx
|
||||
mov ecx,4
|
||||
call .qword_div
|
||||
pop ecx
|
||||
jz @f
|
||||
mov dl,byte 'E' ; Exa Byte
|
||||
jmp .call_decimal_string
|
||||
@@:
|
||||
mov eax,[edx-40+32]
|
||||
mov ebx,[edx-40+32+4]
|
||||
; /1024
|
||||
shrd eax,ebx,5 ; /32
|
||||
shr ebx,5 ; /32
|
||||
shrd eax,ebx,5 ; /32
|
||||
shr ebx,5 ; /32
|
||||
; /1024
|
||||
shrd eax,ebx,5 ; /32
|
||||
shr ebx,5 ; /32
|
||||
shrd eax,ebx,5 ; /32
|
||||
shr ebx,5 ; /32
|
||||
; /1024
|
||||
shrd eax,ebx,5 ; /32
|
||||
shr ebx,5 ; /32
|
||||
shrd eax,ebx,5 ; /32
|
||||
shr ebx,5 ; /32
|
||||
; /(1024*1024)
|
||||
shr eax,20
|
||||
test eax,eax
|
||||
push ecx
|
||||
mov ecx,3
|
||||
call .qword_div
|
||||
pop ecx
|
||||
jz @f
|
||||
mov dl,byte 'P' ; Peta Byte
|
||||
jmp .call_decimal_string
|
||||
@@:
|
||||
mov eax,[edx-40+32]
|
||||
mov ebx,[edx-40+32+4]
|
||||
; /1024
|
||||
shrd eax,ebx,5 ; /32
|
||||
shr ebx,5 ; /32
|
||||
shrd eax,ebx,5 ; /32
|
||||
shr ebx,5 ; /32
|
||||
; /1024
|
||||
shrd eax,ebx,5 ; /32
|
||||
shr ebx,5 ; /32
|
||||
shrd eax,ebx,5 ; /32
|
||||
shr ebx,5 ; /32
|
||||
; /(1024*1024)
|
||||
shr eax,20
|
||||
test eax,eax
|
||||
push ecx
|
||||
mov ecx,2
|
||||
call .qword_div
|
||||
pop ecx
|
||||
jz @f
|
||||
mov dl,byte 'T' ; Tera Byte
|
||||
jmp .call_decimal_string
|
||||
@@:
|
||||
mov eax,[edx-40+32]
|
||||
mov ebx,[edx-40+32+4]
|
||||
; /1024
|
||||
shrd eax,ebx,5 ; /32
|
||||
shr ebx,5 ; /32
|
||||
shrd eax,ebx,5 ; /32
|
||||
shr ebx,5 ; /32
|
||||
; /(1024*1024)
|
||||
shr eax,20
|
||||
test eax,eax
|
||||
push ecx
|
||||
mov ecx,1
|
||||
call .qword_div
|
||||
pop ecx
|
||||
jz @f
|
||||
mov dl,byte 'G' ; Giga Byte
|
||||
jmp .call_decimal_string
|
||||
|
Loading…
Reference in New Issue
Block a user