2007-05-11 21:38:23 +02:00
|
|
|
|
;-------------------------------------------------------------------------
|
|
|
|
|
;
|
|
|
|
|
; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> 䠩<EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
;
|
|
|
|
|
;
|
|
|
|
|
; SPraid
|
|
|
|
|
;
|
|
|
|
|
;-------------------------------------------------------------------------
|
|
|
|
|
|
2007-05-20 11:04:59 +02:00
|
|
|
|
full_file_name_table dd 0 ; 㪠<EFBFBD><EFBFBD>⥫<EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> ⠡<EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD>⥩ 4<EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 64 (32 - <EFBFBD><EFBFBD>ப<EFBFBD> 蠡<EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD>᪠, 32 - <EFBFBD><EFBFBD>ப<EFBFBD> 蠡<EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)
|
|
|
|
|
|
2007-05-11 21:38:23 +02:00
|
|
|
|
; <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
|
2007-05-20 12:01:18 +02:00
|
|
|
|
tmpsrc rb 260 ; <EFBFBD>६<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD>࠭<EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD>८<EFBFBD>ࠧ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
2007-05-16 21:12:34 +02:00
|
|
|
|
endl
|
2007-05-11 21:38:23 +02:00
|
|
|
|
pushad
|
|
|
|
|
mov esi,[sourc]
|
2007-05-20 11:04:59 +02:00
|
|
|
|
lea edi, [tmpsrc]
|
2007-05-16 21:12:34 +02:00
|
|
|
|
|
2007-05-11 21:38:23 +02:00
|
|
|
|
@@:
|
|
|
|
|
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
|
2007-05-16 21:12:34 +02:00
|
|
|
|
|
2007-05-11 21:38:23 +02:00
|
|
|
|
jmp full_file_name_exit
|
|
|
|
|
|
2007-05-16 21:12:34 +02:00
|
|
|
|
|
2007-05-11 21:38:23 +02:00
|
|
|
|
;--------------------------------
|
|
|
|
|
@use_replace:
|
2007-05-16 21:12:34 +02:00
|
|
|
|
|
2007-05-11 21:38:23 +02:00
|
|
|
|
xor eax,eax
|
|
|
|
|
.loop:
|
|
|
|
|
push eax
|
2007-05-20 11:04:59 +02:00
|
|
|
|
|
|
|
|
|
imul eax,eax,64
|
|
|
|
|
add eax,[full_file_name_table]
|
|
|
|
|
mov ebx,eax
|
|
|
|
|
add eax,32
|
|
|
|
|
|
|
|
|
|
mov cl,[ebx]
|
|
|
|
|
or cl,cl
|
2007-05-11 21:38:23 +02:00
|
|
|
|
jz .done
|
|
|
|
|
|
2007-05-20 11:04:59 +02:00
|
|
|
|
lea ecx, [tmpsrc]
|
2007-05-16 21:12:34 +02:00
|
|
|
|
mov edx,[dest]
|
2007-05-11 21:38:23 +02:00
|
|
|
|
|
2007-05-20 11:04:59 +02:00
|
|
|
|
stdcall full_file_name_parse, ecx,edx,ebx,eax
|
2007-05-16 21:12:34 +02:00
|
|
|
|
|
2007-05-11 21:38:23 +02:00
|
|
|
|
mov esi,[dest]
|
2007-05-16 21:12:34 +02:00
|
|
|
|
lea edi, [tmpsrc]
|
2007-05-11 21:38:23 +02:00
|
|
|
|
@@:
|
|
|
|
|
lodsb
|
|
|
|
|
stosb
|
|
|
|
|
or al,al
|
|
|
|
|
jnz @b
|
2007-05-16 21:12:34 +02:00
|
|
|
|
|
2007-05-11 21:38:23 +02:00
|
|
|
|
pop eax
|
|
|
|
|
inc eax
|
|
|
|
|
jmp .loop
|
2007-05-16 21:12:34 +02:00
|
|
|
|
|
|
|
|
|
.done:
|
2007-05-11 21:38:23 +02:00
|
|
|
|
pop eax
|
|
|
|
|
full_file_name_exit:
|
|
|
|
|
|
2007-05-16 21:12:34 +02:00
|
|
|
|
lea eax, [tmpsrc]
|
2007-05-11 21:38:23 +02:00
|
|
|
|
stdcall full_file_name_parse , eax , [dest], sysdir_ , sys_path
|
|
|
|
|
popad
|
|
|
|
|
ret
|
|
|
|
|
endp
|
|
|
|
|
|
|
|
|
|
;
|
|
|
|
|
; <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
|
2007-05-16 21:12:34 +02:00
|
|
|
|
|
2007-05-11 21:38:23 +02:00
|
|
|
|
or cl,0x20
|
|
|
|
|
or dl,0x20
|
|
|
|
|
cmp cl,dl
|
|
|
|
|
jne @@bad
|
|
|
|
|
|
|
|
|
|
inc eax
|
|
|
|
|
inc ebx
|
|
|
|
|
jmp @b
|
|
|
|
|
|
|
|
|
|
@@bad_s:
|
|
|
|
|
cmp dl,0
|
2007-05-16 21:12:34 +02:00
|
|
|
|
je @@good
|
|
|
|
|
|
2007-05-11 21:38:23 +02:00
|
|
|
|
@@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
|
2007-05-16 21:12:34 +02:00
|
|
|
|
jnz @b
|
2007-05-11 21:38:23 +02:00
|
|
|
|
|
2007-05-16 21:12:34 +02:00
|
|
|
|
@@goodl:
|
2007-05-11 21:38:23 +02:00
|
|
|
|
pop esi
|
|
|
|
|
dec edi
|
|
|
|
|
@@:
|
|
|
|
|
lodsb
|
2007-05-16 21:12:34 +02:00
|
|
|
|
stosb
|
2007-05-11 21:38:23 +02:00
|
|
|
|
or al,al
|
2007-05-16 21:12:34 +02:00
|
|
|
|
jnz @b
|
2007-05-11 21:38:23 +02:00
|
|
|
|
|
|
|
|
|
@@ret_ok:
|
|
|
|
|
popad
|
|
|
|
|
ret
|
|
|
|
|
|
2007-05-16 21:12:34 +02:00
|
|
|
|
endp
|
|
|
|
|
|
2007-05-11 21:38:23 +02:00
|
|
|
|
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
|
2007-05-18 15:41:21 +02:00
|
|
|
|
mov ax,[OS_BASE+0x10000+bx_from_load]
|
2007-05-11 21:38:23 +02:00
|
|
|
|
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
|
2007-05-16 21:12:34 +02:00
|
|
|
|
|
2007-05-11 21:38:23 +02:00
|
|
|
|
.done:
|
|
|
|
|
popad
|
|
|
|
|
ret
|
2007-05-20 11:04:59 +02:00
|
|
|
|
|
|
|
|
|
proc load_file_parse_table
|
|
|
|
|
pushad
|
|
|
|
|
stdcall kernel_alloc,0x1000
|
|
|
|
|
mov [full_file_name_table],eax
|
|
|
|
|
|
|
|
|
|
invoke ini.enum_keys,conf_fname,conf_path_sect,get_every_key
|
|
|
|
|
|
|
|
|
|
mov eax,[loading_counter]
|
|
|
|
|
imul eax,eax,64
|
|
|
|
|
add eax,[full_file_name_table]
|
|
|
|
|
mov [eax],byte 0
|
|
|
|
|
popad
|
|
|
|
|
ret
|
|
|
|
|
endp
|
|
|
|
|
|
|
|
|
|
loading_counter dd 0
|
|
|
|
|
def_val_1 db 0
|
|
|
|
|
|
|
|
|
|
proc get_every_key stdcall,f_name, sec_name, key_name
|
|
|
|
|
pushad
|
|
|
|
|
mov esi,[key_name]
|
|
|
|
|
mov edi,[loading_counter]
|
|
|
|
|
imul edi,edi,64
|
|
|
|
|
add edi,[full_file_name_table]
|
|
|
|
|
@@:
|
|
|
|
|
lodsb
|
|
|
|
|
stosb
|
|
|
|
|
or al,al
|
|
|
|
|
jnz @b
|
|
|
|
|
|
|
|
|
|
mov eax,[loading_counter]
|
|
|
|
|
imul eax,eax,64
|
|
|
|
|
add eax,[full_file_name_table]
|
|
|
|
|
add eax,32
|
|
|
|
|
mov ebx,[key_name]
|
|
|
|
|
invoke ini.get_str,conf_fname,conf_path_sect,ebx,eax,32,def_val_1
|
|
|
|
|
|
|
|
|
|
inc dword [loading_counter]
|
|
|
|
|
|
|
|
|
|
popad
|
|
|
|
|
mov eax,1
|
|
|
|
|
ret
|
|
|
|
|
endp
|
2007-05-16 21:12:34 +02:00
|
|
|
|
|