Added: Function 70/05 for ISO9660 - get file/directory attributes structure.

Fix: small error - incorrect allocation in the code of string mov [window_minimize], 2

git-svn-id: svn://kolibrios.org@90 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
Marat Zakiyanov (Mario79) 2006-06-25 19:28:15 +00:00
parent 6cc0b12acb
commit 3ac6e40242
3 changed files with 58 additions and 18 deletions

View File

@ -492,8 +492,8 @@ fs_OnCd:
mov edx, [ebx+16] mov edx, [ebx+16]
add edx, std_application_base_address add edx, std_application_base_address
mov eax, [ebx] mov eax, [ebx]
cmp eax, 1 cmp eax,fs_NumCdServices
ja .not_impl jae .not_impl
add ebx, 4 add ebx, 4
call dword [fs_CdServices + eax*4] call dword [fs_CdServices + eax*4]
and [cd_status], 0 and [cd_status], 0
@ -508,6 +508,13 @@ fs_OnCd:
fs_CdServices: fs_CdServices:
dd fs_CdRead dd fs_CdRead
dd fs_CdReadFolder dd fs_CdReadFolder
dd fs_NotImplemented
dd fs_NotImplemented
dd fs_NotImplemented
dd fs_CdGetFileInfo
dd fs_NotImplemented
fs_NumCdServices = ($ - fs_CdServices)/4
;******************************************************* ;*******************************************************
fs_HasRamdisk: fs_HasRamdisk:

View File

@ -276,7 +276,7 @@ fs_CdReadFolder:
jb .ansi jb .ansi
.cd_get_parameters_of_file_1: .cd_get_parameters_of_file_1:
mov [edi],byte 0 mov [edi],byte 0
call .cd_get_parameters_of_file call cd_get_parameters_of_file
add [cd_mem_location],304 add [cd_mem_location],304
jmp .get_names_from_buffer_1 jmp .get_names_from_buffer_1
@ -313,7 +313,7 @@ fs_CdReadFolder:
jb .unicode jb .unicode
.cd_get_parameters_of_file_2: .cd_get_parameters_of_file_2:
mov [edi],word 0 mov [edi],word 0
call .cd_get_parameters_of_file call cd_get_parameters_of_file
add [cd_mem_location],560 add [cd_mem_location],560
jmp .get_names_from_buffer_1 jmp .get_names_from_buffer_1
@ -328,8 +328,13 @@ fs_CdReadFolder:
add edi,4 add edi,4
jmp .cd_get_parameters_of_file_2 jmp .cd_get_parameters_of_file_2
.cd_get_parameters_of_file: .end_buffer:
pop edx edi esi eax
ret
cd_get_parameters_of_file:
mov edi,[cd_mem_location] mov edi,[cd_mem_location]
cd_get_parameters_of_file_1:
; ïîëó÷àåì àòðèáóòû ôàéëà ; ïîëó÷àåì àòðèáóòû ôàéëà
xor eax,eax xor eax,eax
; ôàéë íå àðõèâèðîâàëñÿ ; ôàéë íå àðõèâèðîâàëñÿ
@ -400,10 +405,43 @@ fs_CdReadFolder:
mov [edi+32],eax mov [edi+32],eax
ret ret
.end_buffer: ;----------------------------------------------------------------
pop edx edi esi eax ;
ret ; fs_CdGetFileInfo - LFN variant for CD
; get file/directory attributes structure
;
;----------------------------------------------------------------
fs_CdGetFileInfo:
cmp byte [esi], 0
jnz @f
mov eax, 2
ret
@@:
push edi ebp
call cd_find_lfn
pushfd
cmp [DevErrorCode], 0
jz @f
popfd
pop ebp edi
mov eax, 11
ret
@@:
popfd
jnc @f
pop ebp edi
mov eax, ERROR_FILE_NOT_FOUND
ret
@@:
mov edi, edx
call cd_get_parameters_of_file_1
and dword [edi+4], 0
pop ebp
pop ebp edi
xor eax, eax
ret
cd_find_lfn: cd_find_lfn:
; in: esi->name ; in: esi->name
; out: CF=1 - file not found ; out: CF=1 - file not found

View File

@ -63,7 +63,7 @@ use16
jmp start_of_code jmp start_of_code
; mike.dld { ; mike.dld {
org $+0x10000 org $+0x10000
db 0 db 0
dd servetable-0x10000 dd servetable-0x10000
draw_line dd __sys_draw_line draw_line dd __sys_draw_line
@ -2180,6 +2180,9 @@ sysfn_terminate2:
ret ret
sysfn_activate: ; 18.3 = ACTIVATE WINDOW sysfn_activate: ; 18.3 = ACTIVATE WINDOW
;* start code - get active process (1) - Mario79
mov [window_minimize],2
;* end code - get active process (1) - Mario79
cmp ebx,2 cmp ebx,2
jb nowindowactivate jb nowindowactivate
cmp ebx,[0x3004] cmp ebx,[0x3004]
@ -2194,14 +2197,6 @@ sysfn_activate: ; 18.3 = ACTIVATE WINDOW
cmp esi, [0x3004] ; number of processes cmp esi, [0x3004] ; number of processes
jz nowindowactivate ; continue if window_stack_value != number_of_processes jz nowindowactivate ; continue if window_stack_value != number_of_processes
; i.e. if window is not already active ; i.e. if window is not already active
;* start code - get active process (1) - Mario79
; cli
mov [window_minimize],2
; mov [active_process],edi
; sti
;* end code - get active process (1) - Mario79
mov [0xff01],edi ; activate mov [0xff01],edi ; activate
nowindowactivate: nowindowactivate:
ret ret