Subversion Repositories Kolibri OS

Compare Revisions

Ignore whitespace Rev 364 → Rev 379

/kernel/trunk/fs/fat12.inc
31,9 → 31,9
reserve_flp_ok:
 
push eax
mov eax,[0x3000]
mov eax,[CURRENT_TASK]
shl eax,5
mov eax,[eax+0x3000+TASKDATA.pid]
mov eax,[eax+CURRENT_TASK+TASKDATA.pid]
mov [flp_status],eax
pop eax
sti
/kernel/trunk/fs/fat32.inc
16,7 → 16,7
;; 27.05.2006 LFN create/rewrite file - diamond ;;
;; 04.05.2006 LFN read folder - diamond ;;
;; 29.04.2006 Elimination of hangup after the ;;
;; expiration hd_wait_timeout - Mario79 ;;
;; expiration hd_wait_timeout - Mario79 ;;
;; 23.04.2006 LFN read file - diamond ;;
;; 28.01.2006 find all Fat16/32 partition in all input point ;;
;; to MBR, see file part_set.inc - Mario79 ;;
124,9 → 124,9
reserve_ok1:
 
push eax
mov eax,[0x3000]
mov eax,[CURRENT_TASK]
shl eax,5
mov eax,[eax+0x3000+TASKDATA.pid]
mov eax,[eax+CURRENT_TASK+TASKDATA.pid]
mov [hd1_status],eax
pop eax
sti
184,7 → 184,7
mov [IDE_Channel_2],0
ret
;********************************************
problem_partition db 0 ; used for partitions search
problem_partition db 0 ; used for partitions search
 
include 'part_set.inc'
 
225,8 → 225,8
call hd_read
cmp [hd_error],0
jne sfc_error
 
 
sfc_in_cache:
cmp [fs_type],16
jne sfc_test32
632,7 → 632,7
gdcl1:
call hd_read
cmp [hd_error],0
jne gdc_error
jne gdc_error
 
add ebx,512 ; update pointer
dec edx
1329,7 → 1329,7
mov ebx,buffer
call hd_read ; read previous sector
cmp [hd_error],0
jne delete_name_end
jne delete_name_end
 
mov ebx,buffer+0x1e0 ; start from last entry
 
1400,7 → 1400,7
ret
 
info_access_denied:
add esp,4
add esp,4
xor edx,edx
xor ebx,ebx
xor ecx,ecx
1556,7 → 1556,7
or ebx, -1
mov eax, ERROR_ACCESS_DENIED
ret
 
.noaccess_3:
add esp,4
.noaccess_1:
1629,7 → 1629,7
mov ebx, edx
call hd_read
cmp [hd_error],0
jne .noaccess_1
jne .noaccess_1
pop ebx
add edx, 512
sub ecx, 512
/kernel/trunk/fs/fs.inc
85,7 → 85,7
cmp dword [eax+0],15 ; GET_DISK_INFO
je fs_info
 
cmp dword [0x3000],1 ; no memory checks for kernel requests
cmp dword [CURRENT_TASK],1 ; no memory checks for kernel requests
jz no_checks_for_kernel
mov edx,eax
cmp dword [eax+0],1
96,7 → 96,7
call check_region
test eax,eax
jnz area_in_app_mem
 
.error_output:
mov esi,buffer_failed
call sys_msg_board_str
105,7 → 105,7
ret
iglobal
buffer_failed db 'K : Buffer check failed',13,10,0
endg
endg
.usual_check:
cmp dword [eax+0],0
mov ecx,512
274,7 → 274,7
 
fs_noramdisk_write:
fs_noramdisk:
 
;********************************************************************
mov eax,[edi+1]
cmp eax,'FD '
289,7 → 289,7
je fs_give_dir1
 
mov eax,[edi+1+12]
cmp eax,'1 '
cmp eax,'1 '
je fs_yesflpdisk_first
cmp eax,'FIRS'
je fs_yesflpdisk_first
342,7 → 342,7
 
fs_noflpdisk:
;*****************************************************************
 
mov eax,[edi+1]
cmp eax,'HD0 '
je fs_yesharddisk_IDE0
378,8 → 378,8
mov [hdpos],4
fs_yesharddisk_partition:
call reserve_hd_channel
; call choice_necessity_partition
; jmp fs_yesharddisk_all
; call choice_necessity_partition
; jmp fs_yesharddisk_all
jmp fs_for_new_semantic
 
choice_necessity_partition:
429,7 → 429,7
je fs_give_dir1
call reserve_hd1
fs_for_new_semantic:
call choice_necessity_partition
call choice_necessity_partition
 
fs_yesharddisk_all:
mov eax,1
792,7 → 792,7
mov [partition_string],eax
mov edi,partition_string
xor cx,cx
i1:
i1:
mov al,[edi]
cmp al,32 ;13
je i_exit
/kernel/trunk/fs/iso9660.inc
23,9 → 23,9
reserve_ok2:
 
push eax
mov eax,[0x3000]
mov eax,[CURRENT_TASK]
shl eax,5
mov eax,[eax+0x3000+TASKDATA.pid]
mov eax,[eax+CURRENT_TASK+TASKDATA.pid]
mov [cd_status],eax
pop eax
sti
59,13 → 59,13
cmp [ChannelNumber],1
jne .IDE_Channel_2
.IDE_Channel_1:
mov [IDE_Channel_1],0
mov [IDE_Channel_1],0
ret
.IDE_Channel_2:
mov [IDE_Channel_2],0
ret
 
uglobal
uglobal
cd_status dd 0
endg
 
93,7 → 93,7
or ebx, -1
mov eax, ERROR_ACCESS_DENIED
ret
 
.noaccess_3:
pop eax edx ecx edi
jmp .noaccess_2
161,7 → 161,7
mov [CDDataBuf_pointer],CDDataBuf
call ReadCDWRetr ; ÷èòàåì ñåêòîð ôàéëà
cmp [DevErrorCode],0
jne .noaccess_3
jne .noaccess_3
push ecx
add ecx, ebx
cmp ecx, 2048
180,7 → 180,7
pop ecx
xor ebx, ebx
jmp .next
 
.done:
mov ebx, edx
pop eax edx ecx edi
240,7 → 240,7
pop ecx eax
mov byte [edx], 1 ; version
mov [cd_mem_location], edx
add [cd_mem_location], 32
add [cd_mem_location], 32
; íà÷èíàåì ïåðåáðîñêó ÁÄÂÊ â ÓÑÂÊ
;.mainloop:
mov [cd_counter_block], dword 0
282,7 → 282,7
test ecx, ecx
jz .get_names_from_buffer_1
mov edi,[cd_counter_block]
mov [edx+4],edi
mov [edx+4],edi
dec ecx
mov esi,ebp
mov edi,[cd_mem_location]
377,7 → 377,7
cd_get_parameters_of_file_1:
; ïîëó÷àåì àòðèáóòû ôàéëà
xor eax,eax
; ôàéë íå àðõèâèðîâàëñÿ
; ôàéë íå àðõèâèðîâàëñ
inc al
shl eax,1
; ýòî êàòàëîã?
449,7 → 449,7
;
; fs_CdGetFileInfo - LFN variant for CD
; get file/directory attributes structure
;
;
;----------------------------------------------------------------
fs_CdGetFileInfo:
cmp byte [esi], 0
554,7 → 554,7
cmp [eax+8],dword 0
jne @f
mov ecx,[eax+4]
inc dword [eax+4]
inc dword [eax+4]
mov [CDSectorAddress],ecx
mov [CDDataBuf_pointer],CDDataBuf ;edi
call ReadCDWRetr
564,7 → 564,7
push esi edi ecx
mov esi,512
imul esi,[eax+8]
add esi,CDDataBuf
add esi,CDDataBuf
mov ecx,512/4
cld
rep movsd
599,7 → 599,7
.err:
popad
mov eax, 11
ret
ret
 
cd_find_lfn:
; in: esi->name
621,10 → 621,10
jne .access_denied
; ñåêòîð ÿâëÿåòñÿ òåðìèíàòîðîì íàáîð äåñêðèïòîðîâ òîìîâ?
cmp [CDDataBuf],byte 0xff
je .access_denied
je .access_denied
; ñåêòîð ÿâëÿåòñÿ äîïîëíèòåëüíûì è óëó÷øåííûì äåñêðèïòîðîì òîìà?
cmp [CDDataBuf],byte 0x2
jne .start
jne .start
; ñåêòîð ÿâëÿåòñÿ äîïîëíèòåëüíûì äåñêðèïòîðîì òîìà?
cmp [CDDataBuf+6],byte 0x1
jne .start
672,7 → 672,7
pop esi eax
clc
ret
 
cd_find_name_in_buffer:
mov [cd_current_pointer_of_input_2],CDDataBuf
.start:
680,9 → 680,9
jc .not_found
call cd_compare_name
jc .start
.found:
.found:
clc
ret
ret
.not_found:
stc
ret
713,7 → 713,7
; out: if names match: ZF=1 and esi->next component of name
; else: ZF=0, esi is not changed
; destroys eax
push esi eax edi
push esi eax edi
mov edi,ebp
.loop:
cld
729,7 → 729,7
call char_toupper
call ansi2uni_char
xchg ah,al
cld
cld
sub edi,2
scasw
jne .name_not_coincide
752,7 → 752,7
add eax,ebp
sub eax,34
cmp edi,eax
je .done_1
je .done_1
; ïðîâåðêà êîíöà ïàïêè
movzx eax,byte [ebp-1]
add eax,ebp
764,7 → 764,7
inc esi
clc
ret
 
char_todown:
; convert character to uppercase, using cp866 encoding
; in: al=symbol
788,7 → 788,7
.az:
add al, 0x20
ret
 
uni2ansi_char:
; convert UNICODE character in al to ANSI character in ax, using cp866 encoding
; in: ax=UNICODE character