Subversion Repositories Kolibri OS

Compare Revisions

Regard whitespace Rev 9690 → Rev 9691

/programs/fs/kfm/trunk/build.bat
1,4 → 1,5
@echo lang fix en >lang.inc
@fasm -m 16384 kfm.asm kfm
@kpack kfm
@erase lang.inc
@pause
/programs/fs/kfm/trunk/draw.inc
399,57 → 399,103
mov [size_table+4],word '- '
jmp .date
;--------------------------------------
.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
;--------------------------------------
.copy_size:
;/0x40000000 - Gb
;/0x100000 - Mb
;/0x400 Kb
;/0x1000000000000000 - EB
;/0x4000000000000 - PB
;/0x10000000000 - TB
;/0x40000000 - GB
;/0x100000 - MB
;/0x400 - KB
mov [size_table],dword ' '
mov [size_table+4],word ' '
push ebx
push edx
mov eax,[edx-40+32]
mov ebx,0x40000000
xor edx,edx
div ebx
cmp eax,0
je @f
push ebx edx
push ecx
mov ecx,4
call .qword_div
pop ecx
jz @f
 
mov ebx,size_table
call decimal_string_4
mov [ebx],byte 'G'
mov [ebx],byte 'E' ; Exa Byte
jmp .size_convert_end
;--------------------------------------
@@:
mov edx,[esp]
mov eax,[edx-40+32]
mov ebx,0x100000
xor edx,edx
div ebx
cmp eax,0
je @f
push ecx
mov ecx,3
call .qword_div
pop ecx
jz @f
 
mov ebx,size_table
call decimal_string_4
mov [ebx],byte 'M'
mov [ebx],byte 'P' ; Peta Byte
jmp .size_convert_end
;--------------------------------------
@@:
mov edx,[esp]
push ecx
mov ecx,2
call .qword_div
pop ecx
jz @f
 
mov ebx,size_table
call decimal_string_4
mov [ebx],byte 'T' ; Tera Byte
jmp .size_convert_end
;--------------------------------------
@@:
push ecx
mov ecx,1
call .qword_div
pop ecx
jz @f
 
mov ebx,size_table
call decimal_string_4
mov [ebx],byte 'G' ; Giga Byte
jmp .size_convert_end
;--------------------------------------
@@:
mov eax,[edx-40+32]
mov ebx,0x400
xor edx,edx
div ebx
cmp eax,0
je @f
mov ebx,eax
shr eax,20 ; /(1024*1024)
test eax,eax
jz @f
 
mov ebx,size_table
call decimal_string_4
mov [ebx],byte 'K'
mov [ebx],byte 'M' ; Mega Byte
jmp .size_convert_end
;--------------------------------------
@@:
mov edx,[esp]
mov eax,[edx-40+32]
mov eax,ebx
shr eax,10 ; /1024
test eax,eax
jz @f
 
mov ebx,size_table
call decimal_string_4
mov [ebx],byte 'K' ; Kilo Byte
jmp .size_convert_end
;--------------------------------------
@@:
mov eax,ebx
;.size_convert:
mov ebx,size_table
call decimal_string_4
473,8 → 519,7
jmp @r
;--------------------------------------
@@:
pop edx
pop ebx
pop edx ebx
;--------------------------------------
.date:
xor eax,eax
/programs/fs/kfm/trunk/file_inf.inc
60,7 → 60,7
@@:
; show file or directory size
add edx,INF_LINEH
mcall 47,0x80140001,files_size
mcall 47,0xc0140001,files_size
;--------------------------------------
mov ebp,date.create
call show_date_and_time_of_files_information
/programs/fs/kfm/trunk/kfm.asm
391,8 → 391,8
;---------------------------------------------------------------------
include 'text.inc'
;---------------------------------------------------------------------
;include_debug_strings
I_END:
;include_debug_strings
;---------------------------------------------------------------------
include 'data.inc'
;---------------------------------------------------------------------