Subversion Repositories Kolibri OS

Compare Revisions

Regard whitespace Rev 1689 → Rev 3487

/kernel/branches/Kolibri-A/trunk/fs/fat12.inc
File deleted
Property changes:
Deleted: svn:keywords
-Rev
\ No newline at end of property
/kernel/branches/Kolibri-A/trunk/fs/fat32.inc
2934,3 → 2934,50
ret
 
; \end{diamond}
 
 
; \begin{diamond}
fat_find_lfn:
; in: esi->name
; [esp+4] = next
; [esp+8] = first
; [esp+C]... - possibly parameters for first and next
; out: CF=1 - file not found
; else CF=0, esi->next name component, edi->direntry
pusha
lea eax, [esp+0Ch+20h]
call dword [eax-4]
jc .reterr
sub esp, 262*2 ; reserve place for LFN
mov ebp, esp
push 0 ; for fat_get_name: read ASCII name
.l1:
call fat_get_name
jc .l2
call fat_compare_name
jz .found
.l2:
lea eax, [esp+0Ch+20h+262*2+4]
call dword [eax-8]
jnc .l1
add esp, 262*2+4
.reterr:
stc
popa
ret
.found:
add esp, 262*2+4
; if this is LFN entry, advance to true entry
cmp byte [edi+11], 0xF
jnz @f
lea eax, [esp+0Ch+20h]
call dword [eax-8]
jc .reterr
@@:
add esp, 8 ; CF=0
push esi
push edi
popa
ret
 
 
/kernel/branches/Kolibri-A/trunk/fs/fs.inc
268,49 → 268,49
 
;********************************************************************
mov eax,[edi+1]
cmp eax,'FD '
je fs_yesflpdisk
cmp eax,'FLOP'
; cmp eax,'FD '
; je fs_yesflpdisk
; cmp eax,'FLOP'
jne fs_noflpdisk
 
fs_yesflpdisk:
call reserve_flp
; fs_yesflpdisk:
; call reserve_flp
 
cmp byte [edi+1+11],0
je fs_give_dir1
; cmp byte [edi+1+11],0
; je fs_give_dir1
 
mov eax,[edi+1+12]
cmp eax,'1 '
je fs_yesflpdisk_first
cmp eax,'FIRS'
je fs_yesflpdisk_first
cmp eax,'2 '
je fs_yesflpdisk_second
cmp eax,'SECO'
jne fs_noflpdisk
jmp fs_yesflpdisk_second
; mov eax,[edi+1+12]
; cmp eax,'1 '
; je fs_yesflpdisk_first
; cmp eax,'FIRS'
; je fs_yesflpdisk_first
; cmp eax,'2 '
; je fs_yesflpdisk_second
; cmp eax,'SECO'
; jne fs_noflpdisk
; jmp fs_yesflpdisk_second
 
fs_yesflpdisk_first:
mov [flp_number],1
jmp fs_yesflpdisk_start
fs_yesflpdisk_second:
mov [flp_number],2
fs_yesflpdisk_start:
cmp dword [esp+20],0 ; READ
jne fs_noflpdisk_read
; fs_yesflpdisk_first:
; mov [flp_number],1
; jmp fs_yesflpdisk_start
; fs_yesflpdisk_second:
; mov [flp_number],2
; fs_yesflpdisk_start:
; cmp dword [esp+20],0 ; READ
; jne fs_noflpdisk_read
 
mov eax,[esp+4] ; fname
add eax,2*12+1
mov ebx,[esp+16] ; block start
inc ebx
mov ecx,[esp+12] ; block count
mov edx,[esp+8] ; return
mov esi,[esp+0]
sub esi,eax
add esi,12+1 ; file name length
call floppy_fileread
; mov eax,[esp+4] ; fname
; add eax,2*12+1
; mov ebx,[esp+16] ; block start
; inc ebx
; mov ecx,[esp+12] ; block count
; mov edx,[esp+8] ; return
; mov esi,[esp+0]
; sub esi,eax
; add esi,12+1 ; file name length
; call floppy_fileread
 
jmp file_system_return
; jmp file_system_return
 
 
fs_noflpdisk_read:
/kernel/branches/Kolibri-A/trunk/fs/fs_lfn.inc
22,12 → 22,6
db 7,'ramdisk'
dd fs_OnRamdisk
dd fs_NextRamdisk
db 2,'fd'
dd fs_OnFloppy
dd fs_NextFloppy
db 10,'floppydisk'
dd fs_OnFloppy
dd fs_NextFloppy
db 3,'hd0'
dd fs_OnHd0
dd fs_NextHd0
441,37 → 435,6
dd fs_RamdiskCreateFolder
fs_NumRamdiskServices = ($ - fs_RamdiskServices)/4
 
fs_OnFloppy:
cmp ecx, 2
ja file_system_lfn.notfound
mov eax, [ebx]
cmp eax, fs_NumFloppyServices
jae fs_OnRamdisk.not_impl
call reserve_flp
mov [flp_number], cl
mov ecx, [ebx+12]
mov edx, [ebx+16]
; add edx, std_application_base_address
add ebx, 4
call dword [fs_FloppyServices + eax*4]
and [flp_status], 0
mov [image_of_eax], eax
mov [image_of_ebx], ebx
ret
 
fs_FloppyServices:
dd fs_FloppyRead
dd fs_FloppyReadFolder
dd fs_FloppyRewrite
dd fs_FloppyWrite
dd fs_FloppySetFileEnd
dd fs_FloppyGetFileInfo
dd fs_FloppySetFileInfo
dd 0
dd fs_FloppyDelete
dd fs_FloppyCreateFolder
fs_NumFloppyServices = ($ - fs_FloppyServices)/4
 
fs_OnHd0:
call reserve_hd1
mov [hdbase], 0x1F0