Rev 4314 | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
1792 | yogev_ezra | 1 | ;--------------------------------------------------------------------- |
2 | device_detect_f70: |
||
3755 | mario79 | 3 | mov ax,[select_disk_char] |
4 | mov [read_folder_2_name],ax |
||
5 | mov [read_folder_3_name],ax |
||
6 | ; mov eax,left_folder_data_1 |
||
7 | ; mov [read_folder_2.return],eax |
||
8 | mcall 70, read_folder_2 |
||
1792 | yogev_ezra | 9 | test eax,eax |
10 | jz @f |
||
11 | cmp eax,6 |
||
12 | jne read_folder_error |
||
13 | @@: |
||
3755 | mario79 | 14 | mov [left_folder_block_1],ebx |
1792 | yogev_ezra | 15 | mov [temp_counter_1],0 |
16 | mov [retrieved_devices_table_counter],0 |
||
17 | .start_temp_counter_1: |
||
18 | imul esi,[temp_counter_1],304 |
||
3755 | mario79 | 19 | add esi,left_folder_data_1 |
1792 | yogev_ezra | 20 | add esi,32+40 ;[eax+32+40] |
3755 | mario79 | 21 | call copy_folder_name_3 |
22 | ; mov eax,right_folder_data_1 |
||
23 | ; mov [read_folder_3.return],eax |
||
24 | mcall 70, read_folder_3 |
||
1792 | yogev_ezra | 25 | test eax,eax |
26 | jz @f |
||
27 | cmp eax,6 |
||
28 | jne read_folder_1_error |
||
29 | @@: |
||
3755 | mario79 | 30 | mov eax,right_folder_data_1 |
1792 | yogev_ezra | 31 | cmp [eax+4],dword 0 |
32 | je .continue |
||
3755 | mario79 | 33 | mov [right_folder_block_1],ebx |
1792 | yogev_ezra | 34 | mov ebp,0 |
35 | .start_copy_device_patch: |
||
36 | imul edi,[retrieved_devices_table_counter],10 |
||
37 | add edi,retrieved_devices_table |
||
38 | mov [edi],byte '/' |
||
39 | inc edi |
||
40 | imul esi,[temp_counter_1],304 |
||
3755 | mario79 | 41 | add esi,left_folder_data_1 |
1792 | yogev_ezra | 42 | add esi,32+40 ;[eax+32+40] |
43 | call proc_copy_patch |
||
44 | imul esi,ebp,304 |
||
3755 | mario79 | 45 | add esi,right_folder_data_1 |
1792 | yogev_ezra | 46 | add esi,32+40 ;[eax+32+40] |
47 | mov [edi-1],byte '/' |
||
48 | call proc_copy_patch |
||
49 | inc [retrieved_devices_table_counter] |
||
50 | inc ebp |
||
3755 | mario79 | 51 | cmp ebp,[right_folder_block_1] |
1792 | yogev_ezra | 52 | jb .start_copy_device_patch |
53 | .continue: |
||
54 | inc [temp_counter_1] |
||
55 | mov eax,[temp_counter_1] |
||
3755 | mario79 | 56 | cmp eax,[left_folder_block_1] |
1792 | yogev_ezra | 57 | jb .start_temp_counter_1 |
4314 | mario79 | 58 | ret |
59 | ;--------------------------------------------------------------------- |
||
60 | select_starting_directories: |
||
1792 | yogev_ezra | 61 | mov esi,retrieved_devices_table+1 |
62 | call copy_folder_name |
||
63 | mov esi,retrieved_devices_table+3 |
||
64 | mov ecx,0 |
||
65 | @@: |
||
66 | add esi,8 |
||
67 | cld |
||
68 | lodsw |
||
69 | inc ecx |
||
70 | cmp ecx,[retrieved_devices_table_counter] |
||
71 | ja @f |
||
72 | cmp ax,'hd' |
||
73 | jne @r |
||
74 | sub esi,2 |
||
75 | call copy_folder_name_1 |
||
76 | ret |
||
77 | @@: |
||
78 | ; mov [read_folder_1.name+1],dword 0 |
||
79 | ; mov [read_folder_1_name+1],dword 0 |
||
80 | mov esi,retrieved_devices_table+1 |
||
81 | call copy_folder_name_1 |
||
82 | ; mov [read_folder_1_name],dword '/rd/' |
||
83 | ; mov [read_folder_1_name+4],word '1/' |
||
84 | ; mov [read_folder_1_name+6],byte 0 |
||
85 | ret |
||
86 | ;--------------------------------------------------------------------- |
||
87 | proc_copy_patch: |
||
88 | @@: |
||
89 | cld |
||
90 | lodsb |
||
91 | stosb |
||
92 | cmp al,0 |
||
93 | jne @r |
||
94 | ret |