2013-06-12 23:35:43 +02:00
|
|
|
; Search Additional Partition for KolibriOS applications
|
|
|
|
;
|
2014-03-04 08:18:01 +01:00
|
|
|
; Copyright (c) 2013-2014, Marat Zakiyanov aka Mario79, aka Mario
|
2013-06-12 23:35:43 +02:00
|
|
|
; All rights reserved.
|
|
|
|
;
|
|
|
|
; Redistribution and use in source and binary forms, with or without
|
|
|
|
; modification, are permitted provided that the following conditions are met:
|
|
|
|
; * Redistributions of source code must retain the above copyright
|
|
|
|
; notice, this list of conditions and the following disclaimer.
|
|
|
|
; * Redistributions in binary form must reproduce the above copyright
|
|
|
|
; notice, this list of conditions and the following disclaimer in the
|
|
|
|
; documentation and/or other materials provided with the distribution.
|
|
|
|
; * Neither the name of the <organization> nor the
|
|
|
|
; names of its contributors may be used to endorse or promote products
|
|
|
|
; derived from this software without specific prior written permission.
|
|
|
|
;
|
|
|
|
; THIS SOFTWARE IS PROVIDED BY Marat Zakiyanov ''AS IS'' AND ANY
|
|
|
|
; EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
|
|
|
; WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
|
|
; DISCLAIMED. IN NO EVENT SHALL <copyright holder> BE LIABLE FOR ANY
|
|
|
|
; DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
|
|
|
; (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
|
|
|
; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
|
|
|
; ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
|
|
; (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
|
|
|
; SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
|
|
;*****************************************************************************
|
|
|
|
use32
|
|
|
|
org 0x0
|
|
|
|
|
2013-10-25 09:27:40 +02:00
|
|
|
db 'MENUET01'
|
2013-06-12 23:35:43 +02:00
|
|
|
dd 0x01
|
|
|
|
dd START
|
|
|
|
dd IM_END
|
|
|
|
dd I_END
|
|
|
|
dd stacktop
|
2018-10-10 14:44:21 +02:00
|
|
|
params dd PARAMS
|
2013-06-12 23:35:43 +02:00
|
|
|
dd 0x0
|
2018-10-10 14:44:21 +02:00
|
|
|
;---------------------------------------------------------------------
|
2018-10-11 13:02:39 +02:00
|
|
|
delay dd 500
|
|
|
|
mount_attempt dd 0
|
2013-06-16 10:00:48 +02:00
|
|
|
;---------------------------------------------------------------------
|
|
|
|
fileinfo:
|
|
|
|
.subfunction dd 5
|
|
|
|
.Offset dd 0
|
|
|
|
.Offset_1 dd 0
|
|
|
|
.size dd 0
|
|
|
|
.return dd folder_data
|
|
|
|
db 0
|
|
|
|
.name: dd basic_file_path
|
|
|
|
;---------------------------------------------------------------------
|
|
|
|
read_folder:
|
|
|
|
.subfunction dd 1
|
|
|
|
.start dd 0
|
|
|
|
.flags dd 0
|
|
|
|
.size dd 32
|
|
|
|
.return dd folder_data
|
|
|
|
db 0
|
|
|
|
.name: dd read_folder_name
|
|
|
|
;---------------------------------------------------------------------
|
|
|
|
read_folder_1:
|
|
|
|
.subfunction dd 1
|
|
|
|
.start dd 0
|
|
|
|
.flags dd 0
|
|
|
|
.size dd 32
|
|
|
|
.return dd folder_data_1
|
|
|
|
db 0
|
|
|
|
.name: dd read_folder_1_name
|
|
|
|
;---------------------------------------------------------------------
|
|
|
|
start_dir:
|
|
|
|
db '/',0
|
|
|
|
;-------------------------------------------------------------------------------
|
|
|
|
basic_file_path:
|
2013-10-25 09:27:40 +02:00
|
|
|
db '/sys/settings/'
|
2013-06-16 10:00:48 +02:00
|
|
|
basic_file_name:
|
2020-11-23 17:39:52 +01:00
|
|
|
db 'kolibrios/res/system/kolibri.lbl',0
|
2013-06-16 10:00:48 +02:00
|
|
|
additional_dir_name:
|
2013-07-08 11:25:44 +02:00
|
|
|
db 'kolibrios',0
|
2013-06-17 22:58:44 +02:00
|
|
|
real_additional_dir:
|
|
|
|
db '/kolibrios',0
|
2013-06-12 23:35:43 +02:00
|
|
|
;-------------------------------------------------------------------------------
|
|
|
|
include '../../macros.inc'
|
2013-06-16 00:37:07 +02:00
|
|
|
|
2014-03-04 08:18:01 +01:00
|
|
|
define __DEBUG__ 1
|
|
|
|
define __DEBUG_LEVEL__ 2 ; 1 = verbose, 2 = main only
|
|
|
|
include "../../debug-fdo.inc"
|
2013-06-12 23:35:43 +02:00
|
|
|
;-------------------------------------------------------------------------------
|
|
|
|
START:
|
2018-10-10 14:44:21 +02:00
|
|
|
; process cmdline params
|
|
|
|
mov esi, [params]
|
|
|
|
test [esi], byte 0xFF
|
|
|
|
jz .params_done
|
|
|
|
cmp word[esi], '-d' ; delay
|
|
|
|
jne .params_done
|
|
|
|
add esi, 2
|
|
|
|
; str2uint(delay)
|
|
|
|
xor eax, eax
|
|
|
|
xor ecx, ecx
|
|
|
|
.convert:
|
|
|
|
lodsb
|
|
|
|
test al, al
|
|
|
|
jz .converted
|
|
|
|
lea ecx, [ecx + ecx * 4]
|
|
|
|
lea ecx, [eax + ecx * 2 - '0']
|
|
|
|
jmp .convert
|
|
|
|
.converted:
|
|
|
|
mov [delay], ecx
|
2020-03-27 21:18:44 +01:00
|
|
|
;--------------------------------------
|
|
|
|
DEBUGF 1, "Searchap: get basic file\n"
|
|
|
|
call load_file ; download the master file
|
|
|
|
xor eax,eax
|
|
|
|
cmp [fs_error],eax
|
|
|
|
jne exit
|
|
|
|
mov eax,[fileinfo.size]
|
|
|
|
mov [basic_file_size],eax
|
2018-10-10 14:44:21 +02:00
|
|
|
.params_done:
|
|
|
|
;--------------------------------------
|
2013-06-12 23:35:43 +02:00
|
|
|
mov ebx,start_dir
|
|
|
|
mov ax,[ebx]
|
|
|
|
mov ebx,read_folder_name
|
|
|
|
mov [ebx],ax
|
|
|
|
mov ebx,read_folder_1_name
|
|
|
|
mov [ebx],ax
|
|
|
|
call device_detect_f70
|
|
|
|
;--------------------------------------
|
2013-06-16 00:37:07 +02:00
|
|
|
call print_retrieved_devices_table
|
2013-06-12 23:35:43 +02:00
|
|
|
call search_and_load_pointer_file_label
|
|
|
|
;---------------------------------------------------------------------
|
|
|
|
exit:
|
2013-06-16 00:37:07 +02:00
|
|
|
;--------------------------------------
|
2014-03-04 08:18:01 +01:00
|
|
|
DEBUGF 1, "Searchap: just exit\n"
|
2013-06-16 00:37:07 +02:00
|
|
|
;--------------------------------------
|
2018-10-11 13:02:39 +02:00
|
|
|
cmp [mount_dir],1
|
|
|
|
je @f
|
|
|
|
cmp [mount_attempt], 1
|
|
|
|
je @f
|
|
|
|
mov [mount_attempt], 1 ;second mount attempt with delay
|
2020-03-27 21:18:44 +01:00
|
|
|
DEBUGF 2, "Searchap: second attempt after 5 seconds!\n"
|
2018-10-11 13:02:39 +02:00
|
|
|
mcall 5,[delay]
|
|
|
|
jmp START.params_done
|
2018-10-11 23:10:55 +02:00
|
|
|
@@:
|
2013-06-12 23:35:43 +02:00
|
|
|
mcall -1
|
|
|
|
;---------------------------------------------------------------------
|
|
|
|
device_detect_f70:
|
|
|
|
;--------------------------------------
|
2014-03-04 08:18:01 +01:00
|
|
|
DEBUGF 1, "Searchap: read_folder_name: %s\n",read_folder_name
|
2013-06-12 23:35:43 +02:00
|
|
|
;--------------------------------------
|
|
|
|
mcall 70,read_folder
|
|
|
|
test eax,eax
|
|
|
|
jz @f
|
|
|
|
cmp eax,6
|
|
|
|
je @f
|
2013-06-16 00:37:07 +02:00
|
|
|
;--------------------------------------
|
2014-03-04 08:18:01 +01:00
|
|
|
DEBUGF 1, "Searchap: read_folder_error\n"
|
2013-06-16 00:37:07 +02:00
|
|
|
;--------------------------------------
|
2013-06-12 23:35:43 +02:00
|
|
|
jmp exit
|
|
|
|
@@:
|
|
|
|
;--------------------------------------
|
|
|
|
call print_root_dir
|
2013-06-16 00:37:07 +02:00
|
|
|
;--------------------------------------
|
2013-06-12 23:35:43 +02:00
|
|
|
mov [left_folder_block],ebx
|
2013-06-16 00:37:07 +02:00
|
|
|
xor eax,eax
|
|
|
|
mov [temp_counter_1],eax
|
|
|
|
mov [retrieved_devices_table_counter],eax
|
2013-06-12 23:35:43 +02:00
|
|
|
.start_temp_counter_1:
|
|
|
|
imul esi,[temp_counter_1],304
|
|
|
|
add esi,[read_folder.return]
|
|
|
|
add esi,32+40
|
|
|
|
call copy_folder_name_1
|
2013-06-16 00:37:07 +02:00
|
|
|
;--------------------------------------
|
2014-03-04 08:18:01 +01:00
|
|
|
DEBUGF 1, "Searchap: read_folder_1_name: %s\n",read_folder_1_name
|
2013-06-16 00:37:07 +02:00
|
|
|
;--------------------------------------
|
2013-06-12 23:35:43 +02:00
|
|
|
mcall 70,read_folder_1
|
|
|
|
test eax,eax
|
|
|
|
jz @f
|
|
|
|
cmp eax,6
|
|
|
|
je @f
|
2013-06-16 00:37:07 +02:00
|
|
|
;--------------------------------------
|
2014-03-04 08:18:01 +01:00
|
|
|
DEBUGF 1, "Searchap: read_folder_error_1\n"
|
2013-06-16 00:37:07 +02:00
|
|
|
;--------------------------------------
|
2013-06-12 23:35:43 +02:00
|
|
|
jmp exit
|
|
|
|
@@:
|
|
|
|
mov eax,[read_folder_1.return]
|
|
|
|
cmp [eax+4],dword 0
|
|
|
|
je .continue
|
|
|
|
mov [right_folder_block],ebx
|
2013-06-16 00:37:07 +02:00
|
|
|
xor ebp,ebp
|
2013-06-12 23:35:43 +02:00
|
|
|
.start_copy_device_patch:
|
|
|
|
imul edi,[retrieved_devices_table_counter],10
|
|
|
|
add edi,retrieved_devices_table
|
|
|
|
mov [edi],byte '/'
|
|
|
|
inc edi
|
|
|
|
imul esi,[temp_counter_1],304
|
|
|
|
add esi,[read_folder.return]
|
|
|
|
add esi,32+40
|
|
|
|
call proc_copy_patch
|
|
|
|
imul esi,ebp,304
|
|
|
|
add esi,[read_folder_1.return]
|
|
|
|
add esi,32+40
|
|
|
|
mov [edi-1],byte '/'
|
|
|
|
call proc_copy_patch
|
|
|
|
inc [retrieved_devices_table_counter]
|
|
|
|
inc ebp
|
|
|
|
cmp ebp,[right_folder_block]
|
|
|
|
jb .start_copy_device_patch
|
|
|
|
.continue:
|
|
|
|
inc [temp_counter_1]
|
|
|
|
mov eax,[temp_counter_1]
|
|
|
|
cmp eax,[left_folder_block]
|
|
|
|
jb .start_temp_counter_1
|
|
|
|
mov esi,retrieved_devices_table+1
|
|
|
|
call copy_folder_name
|
|
|
|
mov esi,retrieved_devices_table+3
|
2013-06-16 00:37:07 +02:00
|
|
|
xor ecx,ecx
|
2013-06-12 23:35:43 +02:00
|
|
|
@@:
|
|
|
|
add esi,8
|
|
|
|
cld
|
|
|
|
lodsw
|
|
|
|
inc ecx
|
|
|
|
cmp ecx,[retrieved_devices_table_counter]
|
|
|
|
ja @f
|
|
|
|
cmp ax,'hd'
|
|
|
|
jne @r
|
|
|
|
sub esi,2
|
|
|
|
call copy_folder_name_1
|
|
|
|
ret
|
|
|
|
@@:
|
|
|
|
mov esi,retrieved_devices_table+1
|
|
|
|
call copy_folder_name_1
|
|
|
|
ret
|
|
|
|
;---------------------------------------------------------------------
|
|
|
|
load_file:
|
|
|
|
mov [fileinfo.subfunction],dword 5
|
|
|
|
xor eax,eax
|
|
|
|
mov [fileinfo.size],eax
|
|
|
|
mov [fs_error],eax
|
2013-06-16 00:37:07 +02:00
|
|
|
;--------------------------------------
|
2014-03-04 08:18:01 +01:00
|
|
|
DEBUGF 1, "Searchap: get file info\n"
|
2013-06-16 00:37:07 +02:00
|
|
|
;--------------------------------------
|
2013-06-28 09:31:50 +02:00
|
|
|
mcall 68,1
|
2013-06-12 23:35:43 +02:00
|
|
|
mcall 70,fileinfo
|
|
|
|
mov [fs_error],eax
|
|
|
|
test eax,eax
|
|
|
|
jnz .file_error
|
2013-06-16 00:37:07 +02:00
|
|
|
;--------------------------------------
|
2014-03-04 08:18:01 +01:00
|
|
|
DEBUGF 1, "Searchap: file info ok\n"
|
2013-06-16 00:37:07 +02:00
|
|
|
;--------------------------------------
|
|
|
|
xor eax,eax
|
|
|
|
mov [fileinfo.subfunction],eax ;dword 0
|
2013-06-12 23:35:43 +02:00
|
|
|
mov eax,[fileinfo.return]
|
|
|
|
mov ecx,[eax+32]
|
2013-06-16 00:37:07 +02:00
|
|
|
;--------------------------------------
|
2014-03-04 08:18:01 +01:00
|
|
|
DEBUGF 1, "Searchap: real file size: %d\n",ecx
|
2013-06-16 00:37:07 +02:00
|
|
|
;--------------------------------------
|
2013-06-12 23:35:43 +02:00
|
|
|
test ecx,ecx
|
|
|
|
jz .file_error
|
2013-06-16 00:37:07 +02:00
|
|
|
mov eax,304*32+32 ; 9 Kb
|
|
|
|
cmp ecx,eax
|
2013-06-12 23:35:43 +02:00
|
|
|
jbe @f
|
2013-06-16 00:37:07 +02:00
|
|
|
mov ecx,eax
|
2013-06-12 23:35:43 +02:00
|
|
|
;-----------------------------------
|
2013-07-08 11:25:44 +02:00
|
|
|
@@:
|
2013-06-12 23:35:43 +02:00
|
|
|
mov [fileinfo.size],ecx
|
2013-06-16 00:37:07 +02:00
|
|
|
;--------------------------------------
|
2014-03-04 08:18:01 +01:00
|
|
|
DEBUGF 1, "Searchap: get file\n"
|
2013-06-16 00:37:07 +02:00
|
|
|
;--------------------------------------
|
2013-06-28 09:31:50 +02:00
|
|
|
mcall 68,1
|
2013-06-12 23:35:43 +02:00
|
|
|
mcall 70,fileinfo
|
|
|
|
mov [fs_error],eax
|
|
|
|
test eax,eax
|
|
|
|
jz @f
|
|
|
|
; cmp eax,6
|
|
|
|
; jne .file_error
|
|
|
|
; xor eax,eax
|
|
|
|
; mov [fs_error],eax
|
|
|
|
; jmp @f
|
|
|
|
;-----------------------------------
|
|
|
|
.file_error:
|
2013-06-16 00:37:07 +02:00
|
|
|
;--------------------------------------
|
2014-03-04 08:18:01 +01:00
|
|
|
DEBUGF 1, "Searchap: read file - error!\n"
|
2013-06-16 00:37:07 +02:00
|
|
|
;--------------------------------------
|
2013-06-12 23:35:43 +02:00
|
|
|
ret
|
2013-07-08 11:25:44 +02:00
|
|
|
;-----------------------------------
|
2013-06-16 00:37:07 +02:00
|
|
|
@@:
|
|
|
|
;--------------------------------------
|
2014-03-04 08:18:01 +01:00
|
|
|
DEBUGF 1, "Searchap: read file corrected size: %d\n",[fileinfo.size]
|
2013-06-16 00:37:07 +02:00
|
|
|
;--------------------------------------
|
2013-06-12 23:35:43 +02:00
|
|
|
ret
|
|
|
|
;---------------------------------------------------------------------
|
|
|
|
search_and_load_pointer_file_label:
|
|
|
|
mov [fileinfo.return],dword folder_data_1
|
|
|
|
mov ecx,[retrieved_devices_table_counter]
|
|
|
|
dec ecx ; /rd/1/ no need to check
|
|
|
|
mov [fileinfo.name],dword read_folder_name
|
|
|
|
mov esi,retrieved_devices_table
|
|
|
|
; sub esi,10 ; deleted because /rd/1/ no need to check
|
|
|
|
.next_entry:
|
2013-06-16 00:37:07 +02:00
|
|
|
;--------------------------------------
|
2014-03-04 08:18:01 +01:00
|
|
|
DEBUGF 1, "\nSearchap: copy next entry\n"
|
2013-06-16 00:37:07 +02:00
|
|
|
;--------------------------------------
|
2013-06-12 23:35:43 +02:00
|
|
|
add esi,10
|
|
|
|
push esi
|
|
|
|
add esi,1
|
|
|
|
call copy_folder_name
|
|
|
|
mov esi,basic_file_name-1
|
|
|
|
dec edi
|
|
|
|
call copy_folder_name.1
|
|
|
|
pop esi
|
2013-06-16 00:37:07 +02:00
|
|
|
;--------------------------------------
|
2014-03-04 08:18:01 +01:00
|
|
|
DEBUGF 1, "Searchap: %s\n",dword[fileinfo.name]
|
2013-06-16 00:37:07 +02:00
|
|
|
;--------------------------------------
|
2013-06-12 23:35:43 +02:00
|
|
|
; mcall 5,10
|
|
|
|
push ecx
|
|
|
|
call load_file
|
|
|
|
pop ecx
|
|
|
|
|
|
|
|
xor eax,eax
|
|
|
|
cmp [fs_error],eax
|
|
|
|
jne @f
|
|
|
|
mov eax,[fileinfo.size]
|
|
|
|
cmp eax,[basic_file_size]
|
|
|
|
jae .sucess
|
|
|
|
@@:
|
|
|
|
dec ecx
|
|
|
|
jnz .next_entry
|
2013-06-16 00:37:07 +02:00
|
|
|
;--------------------------------------
|
2014-10-13 06:37:14 +02:00
|
|
|
DEBUGF 2, "Searchap: additional partition is not found!\n"
|
2013-06-16 00:37:07 +02:00
|
|
|
;--------------------------------------
|
2013-06-12 23:35:43 +02:00
|
|
|
ret
|
|
|
|
.sucess:
|
2020-03-27 21:18:44 +01:00
|
|
|
;call compare_files_and_mount
|
|
|
|
call compare_files_and_mount.mount_now ;no need to compare files content
|
2013-06-16 10:00:48 +02:00
|
|
|
cmp [compare_flag],byte 0
|
2013-06-12 23:35:43 +02:00
|
|
|
jne @b
|
2014-03-04 08:18:01 +01:00
|
|
|
cmp [mount_dir],1
|
|
|
|
je @f
|
|
|
|
DEBUGF 2, "Searchap: sorry, but the additional partition is not found!\n"
|
|
|
|
@@:
|
2013-06-12 23:35:43 +02:00
|
|
|
ret
|
|
|
|
;---------------------------------------------------------------------
|
|
|
|
compare_files_and_mount:
|
|
|
|
push ecx esi
|
|
|
|
mov ecx,[basic_file_size]
|
|
|
|
mov esi,folder_data
|
|
|
|
mov edi,folder_data_1
|
|
|
|
.next_char:
|
|
|
|
cld
|
|
|
|
lodsb
|
|
|
|
mov ah,[edi]
|
|
|
|
inc edi
|
|
|
|
cmp al,ah
|
|
|
|
jne .not_match
|
|
|
|
dec ecx
|
|
|
|
jnz .next_char
|
|
|
|
pop esi ecx
|
2020-03-27 21:18:44 +01:00
|
|
|
.mount_now:
|
|
|
|
mov [compare_flag],byte 0
|
2013-06-16 00:37:07 +02:00
|
|
|
;--------------------------------------
|
2014-10-13 06:37:14 +02:00
|
|
|
DEBUGF 2, "Searchap: compare files - success!\n"
|
2014-03-04 08:18:01 +01:00
|
|
|
DEBUGF 2, "Searchap: mount directory: %s\n",esi
|
|
|
|
mov [mount_dir],1
|
2013-06-16 00:37:07 +02:00
|
|
|
;--------------------------------------
|
|
|
|
; prepare real directory path for mounting
|
|
|
|
inc esi
|
|
|
|
mov edi,f30_3_work_area+64
|
|
|
|
call proc_copy_patch
|
2013-06-17 22:58:44 +02:00
|
|
|
dec edi
|
|
|
|
mov esi,real_additional_dir
|
|
|
|
call proc_copy_patch
|
2013-06-16 00:37:07 +02:00
|
|
|
; prepare fake directory name
|
|
|
|
mov esi,additional_dir_name
|
|
|
|
mov edi,f30_3_work_area
|
|
|
|
call proc_copy_patch
|
2013-06-12 23:35:43 +02:00
|
|
|
; here is call kernel function to mount the found partition
|
2013-07-08 11:25:44 +02:00
|
|
|
; as "/kolibrios" directory to root directory "/"
|
2013-06-16 00:37:07 +02:00
|
|
|
mcall 30,3,f30_3_work_area
|
2013-06-12 23:35:43 +02:00
|
|
|
ret
|
|
|
|
;--------------------------------------
|
|
|
|
.not_match:
|
|
|
|
mov [compare_flag],byte 1
|
|
|
|
pop esi ecx
|
2013-06-16 00:37:07 +02:00
|
|
|
;--------------------------------------
|
2014-10-13 06:37:14 +02:00
|
|
|
DEBUGF 1, "Searchap: compared files doesn't match!\n"
|
2013-06-16 00:37:07 +02:00
|
|
|
;--------------------------------------
|
2013-06-12 23:35:43 +02:00
|
|
|
ret
|
|
|
|
;---------------------------------------------------------------------
|
|
|
|
copy_folder_name:
|
|
|
|
mov edi,read_folder_name+1
|
|
|
|
.1:
|
2013-06-16 00:37:07 +02:00
|
|
|
proc_copy_patch:
|
2013-06-12 23:35:43 +02:00
|
|
|
cld
|
2013-06-16 00:37:07 +02:00
|
|
|
@@:
|
2013-06-12 23:35:43 +02:00
|
|
|
lodsb
|
|
|
|
stosb
|
2013-06-16 00:37:07 +02:00
|
|
|
test al,al
|
|
|
|
jnz @r
|
2013-06-12 23:35:43 +02:00
|
|
|
ret
|
|
|
|
;---------------------------------------------------------------------
|
|
|
|
copy_folder_name_1:
|
|
|
|
mov edi,read_folder_1_name+1
|
2013-06-16 00:37:07 +02:00
|
|
|
jmp proc_copy_patch
|
2013-06-12 23:35:43 +02:00
|
|
|
;---------------------------------------------------------------------
|
|
|
|
print_retrieved_devices_table:
|
|
|
|
mov ecx,[retrieved_devices_table_counter]
|
|
|
|
mov edx,retrieved_devices_table
|
2014-03-04 08:18:01 +01:00
|
|
|
DEBUGF 1, "Searchap: retrieved_devices_table:\n"
|
|
|
|
DEBUGF 1, "Searchap: ----------\n"
|
2013-06-12 23:35:43 +02:00
|
|
|
@@:
|
2014-03-04 08:18:01 +01:00
|
|
|
DEBUGF 1, "Searchap: %s\n",edx
|
2013-06-12 23:35:43 +02:00
|
|
|
add edx,10
|
|
|
|
dec ecx
|
|
|
|
jnz @b
|
2014-03-04 08:18:01 +01:00
|
|
|
DEBUGF 1, "\nSearchap: ----------\n"
|
2013-06-12 23:35:43 +02:00
|
|
|
ret
|
|
|
|
;---------------------------------------------------------------------
|
|
|
|
print_root_dir:
|
2014-03-04 08:18:01 +01:00
|
|
|
DEBUGF 1, "Searchap: ----------\n"
|
|
|
|
DEBUGF 1, "Searchap: root dir:\n"
|
|
|
|
DEBUGF 1, "Searchap: ----------\n"
|
2013-06-12 23:35:43 +02:00
|
|
|
pusha
|
|
|
|
mov ecx,ebx
|
|
|
|
mov edx,folder_data+32+40
|
|
|
|
@@:
|
2014-03-04 08:18:01 +01:00
|
|
|
DEBUGF 1, "Searchap: %s\n",edx
|
2013-06-12 23:35:43 +02:00
|
|
|
add edx,304
|
|
|
|
dec ecx
|
|
|
|
jnz @b
|
|
|
|
popa
|
2014-03-04 08:18:01 +01:00
|
|
|
DEBUGF 1, "\nSearchap: ----------\n"
|
2013-06-12 23:35:43 +02:00
|
|
|
ret
|
2014-03-04 08:18:01 +01:00
|
|
|
;-------------------------------------------------------------------------------
|
|
|
|
include_debug_strings
|
2013-06-12 23:35:43 +02:00
|
|
|
;-------------------------------------------------------------------------------
|
|
|
|
IM_END:
|
|
|
|
;-------------------------------------------------------------------------------
|
|
|
|
align 4
|
2018-10-10 14:44:21 +02:00
|
|
|
PARAMS: rb 256
|
|
|
|
align 4
|
2013-06-12 23:35:43 +02:00
|
|
|
left_folder_block rd 1
|
|
|
|
right_folder_block rd 1
|
|
|
|
temp_counter_1 rd 1
|
|
|
|
retrieved_devices_table_counter rd 1
|
|
|
|
basic_file_size rd 1
|
|
|
|
fs_error rd 1
|
|
|
|
compare_flag rb 1
|
2014-03-04 08:18:01 +01:00
|
|
|
mount_dir rb 1
|
2013-06-12 23:35:43 +02:00
|
|
|
;-------------------------------------------------------------------------------
|
|
|
|
align 4
|
2013-06-16 00:37:07 +02:00
|
|
|
f30_3_work_area:
|
|
|
|
rb 128
|
|
|
|
;-------------------------------------------------------------------------------
|
|
|
|
align 4
|
2013-06-12 23:35:43 +02:00
|
|
|
retrieved_devices_table:
|
|
|
|
rb 10*100
|
|
|
|
;-------------------------------------------------------------------------------
|
|
|
|
align 4
|
|
|
|
read_folder_name:
|
|
|
|
rb 256
|
|
|
|
;-------------------------------------------------------------------------------
|
|
|
|
align 4
|
|
|
|
read_folder_1_name:
|
|
|
|
rb 256
|
|
|
|
;-------------------------------------------------------------------------------
|
|
|
|
align 4
|
|
|
|
folder_data:
|
|
|
|
rb 304*32+32 ; 9 Kb
|
|
|
|
;-------------------------------------------------------------------------------
|
|
|
|
align 4
|
|
|
|
folder_data_1:
|
|
|
|
rb 304*32+32 ; 9 Kb
|
|
|
|
;-------------------------------------------------------------------------------
|
|
|
|
align 4
|
|
|
|
rb 512
|
|
|
|
stacktop:
|
|
|
|
;-------------------------------------------------------------------------------
|
|
|
|
I_END:
|
2013-07-08 11:25:44 +02:00
|
|
|
;-------------------------------------------------------------------------------
|