forked from KolibriOS/kolibrios
183 lines
2.9 KiB
PHP
183 lines
2.9 KiB
PHP
|
;-------------------------------------------------------------------------
|
|||
|
;
|
|||
|
; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> 䠩<EFBFBD><EFBFBD><EFBFBD>
|
|||
|
;
|
|||
|
;
|
|||
|
; SPraid
|
|||
|
;
|
|||
|
;-------------------------------------------------------------------------
|
|||
|
|
|||
|
; <EFBFBD><EFBFBD>ॡ<EFBFBD>ࠥ<EFBFBD> <EFBFBD><EFBFBD> 䠩<EFBFBD><EFBFBD> <EFBFBD><EFBFBD>ਠ<EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
proc full_file_name stdcall,sourc,dest
|
|||
|
locals
|
|||
|
param rb 60
|
|||
|
val rb 60
|
|||
|
tmpsrc rb 60 ; <EFBFBD>६<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD>࠭<EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD>८<EFBFBD>ࠧ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
endl
|
|||
|
pushad
|
|||
|
|
|||
|
|
|||
|
mov esi,[sourc]
|
|||
|
mov edi,ebp
|
|||
|
add edi,tmpsrc-ebp
|
|||
|
@@:
|
|||
|
lodsb
|
|||
|
stosb
|
|||
|
or al,al
|
|||
|
jnz @b
|
|||
|
|
|||
|
mov al,[conf_file_loaded] ; <EFBFBD>ॡ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>饭<EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD>ࢮ<EFBFBD><EFBFBD> 䠩<EFBFBD><EFBFBD> (<EFBFBD><EFBFBD><EFBFBD>䨣<EFBFBD>)
|
|||
|
or al,al
|
|||
|
jnz @use_replace
|
|||
|
|
|||
|
jmp full_file_name_exit
|
|||
|
|
|||
|
|
|||
|
;--------------------------------
|
|||
|
@use_replace:
|
|||
|
|
|||
|
xor eax,eax
|
|||
|
.loop:
|
|||
|
push eax
|
|||
|
mov ebx,ebp
|
|||
|
add ebx,param-ebp
|
|||
|
mov ecx,ebp
|
|||
|
add ecx,val-ebp
|
|||
|
invoke ini.get_par,sect, ebx, ecx, eax
|
|||
|
|
|||
|
mov bl,[param]
|
|||
|
or bl,bl
|
|||
|
jz .done
|
|||
|
|
|||
|
mov eax,ebp
|
|||
|
add eax,tmpsrc-ebp
|
|||
|
mov ebx,ebp
|
|||
|
add ebx,param-ebp
|
|||
|
mov ecx,ebp
|
|||
|
add ecx,val-ebp
|
|||
|
mov edx,[dest]
|
|||
|
|
|||
|
stdcall full_file_name_parse, eax,edx,ebx,ecx
|
|||
|
|
|||
|
mov esi,[dest]
|
|||
|
mov edi,ebp
|
|||
|
add edi,tmpsrc-ebp
|
|||
|
@@:
|
|||
|
lodsb
|
|||
|
stosb
|
|||
|
or al,al
|
|||
|
jnz @b
|
|||
|
|
|||
|
pop eax
|
|||
|
inc eax
|
|||
|
jmp .loop
|
|||
|
|
|||
|
.done:
|
|||
|
pop eax
|
|||
|
full_file_name_exit:
|
|||
|
|
|||
|
mov eax,ebp
|
|||
|
add eax,tmpsrc-ebp
|
|||
|
stdcall full_file_name_parse , eax , [dest], sysdir_ , sys_path
|
|||
|
popad
|
|||
|
ret
|
|||
|
endp
|
|||
|
|
|||
|
sect: db 'path',0
|
|||
|
|
|||
|
;
|
|||
|
; <EFBFBD>८<EFBFBD>ࠧ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>. <EFBFBD> <EFBFBD> <EFBFBD><EFBFBD>砫<EFBFBD> <EFBFBD>⮨<EFBFBD>
|
|||
|
; sourc - <EFBFBD><EFBFBD>뫪<EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD>ப<EFBFBD>...
|
|||
|
; dest - <EFBFBD><EFBFBD>뫪<EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD>㤠 १<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
; def - <EFBFBD><EFBFBD>ப<EFBFBD> 蠡<EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD>᪠
|
|||
|
; dval - <EFBFBD> 祬<EFBFBD> <EFBFBD><EFBFBD><EFBFBD>ࠢ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 蠡<EFBFBD><EFBFBD><EFBFBD>
|
|||
|
proc full_file_name_parse stdcall,sourc,dest,def,dval
|
|||
|
; <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
pushad
|
|||
|
|
|||
|
mov eax,[sourc]
|
|||
|
mov ebx,[def]
|
|||
|
@@:
|
|||
|
mov dl,[ebx]
|
|||
|
mov cl,[eax]
|
|||
|
cmp cl,0
|
|||
|
je @@bad_s
|
|||
|
cmp dl,0
|
|||
|
je @@good
|
|||
|
|
|||
|
or cl,0x20
|
|||
|
or dl,0x20
|
|||
|
cmp cl,dl
|
|||
|
jne @@bad
|
|||
|
|
|||
|
inc eax
|
|||
|
inc ebx
|
|||
|
jmp @b
|
|||
|
|
|||
|
@@bad_s:
|
|||
|
cmp dl,0
|
|||
|
je @@good
|
|||
|
|
|||
|
@@bad:
|
|||
|
mov edi,[dest]
|
|||
|
mov esi,[sourc]
|
|||
|
@@:
|
|||
|
lodsb
|
|||
|
stosb
|
|||
|
or al,al
|
|||
|
jnz @b
|
|||
|
jmp @@ret_ok
|
|||
|
|
|||
|
@@good:
|
|||
|
push eax
|
|||
|
mov edi,[dest]
|
|||
|
mov esi,[dval]
|
|||
|
@@:
|
|||
|
lodsb
|
|||
|
stosb
|
|||
|
or al,al
|
|||
|
jnz @b
|
|||
|
|
|||
|
@@goodl:
|
|||
|
pop esi
|
|||
|
dec edi
|
|||
|
@@:
|
|||
|
lodsb
|
|||
|
stosb
|
|||
|
or al,al
|
|||
|
jnz @b
|
|||
|
|
|||
|
@@ret_ok:
|
|||
|
popad
|
|||
|
ret
|
|||
|
|
|||
|
endp
|
|||
|
|
|||
|
sys_dir_mess: db 'System dir is '
|
|||
|
sys_path: db '/HD0/1/KOLIBRI',0,0
|
|||
|
sysdir_ db '%sys%',0
|
|||
|
|
|||
|
; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD>ࠬ<EFBFBD><EFBFBD><EFBFBD><EFBFBD> bx_from_load <EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 䠩<EFBFBD> <EFBFBD><EFBFBD><EFBFBD>䨣<EFBFBD><EFBFBD><EFBFBD>樨
|
|||
|
Parser_params:
|
|||
|
pushad
|
|||
|
mov ax,[BOOT_VAR+bx_from_load]
|
|||
|
cmp al,'r' ; ࠬ <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
jnz @f
|
|||
|
mov [sys_path],dword '/RD/'
|
|||
|
mov [sys_path+4],byte ah
|
|||
|
mov [sys_path+5],word 0 ;0x002F
|
|||
|
jmp .done
|
|||
|
@@:
|
|||
|
sub al,49
|
|||
|
mov [sys_path],dword '/HDa'
|
|||
|
mov [sys_path+3],byte al
|
|||
|
mov [sys_path+4],byte '/'
|
|||
|
mov [sys_path+5],byte ah
|
|||
|
mov [sys_path+6],dword '/KOL'
|
|||
|
mov [sys_path+10],dword 'IBRI'
|
|||
|
mov [sys_path+14],word 0 ;0x002F
|
|||
|
|
|||
|
.done:
|
|||
|
popad
|
|||
|
ret
|
|||
|
|