Rev 3755 | Go to most recent revision | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 3755 | Rev 4314 | ||
---|---|---|---|
1 | device_detect: ; f1811 |
1 | device_detect: ; f1811 |
2 | mcall 18,11,1,device_present_buffer |
2 | mcall 18,11,1,device_present_buffer |
3 | mov [device_present.rd],1 |
3 | mov [device_present.rd],1 |
4 | cmp [device_present_buffer.fd],0 |
4 | cmp [device_present_buffer.fd],0 |
5 | je @f |
5 | je @f |
6 | mov [device_present.fd],1 |
6 | mov [device_present.fd],1 |
7 | @@: |
7 | @@: |
8 | mov al,[device_present_buffer.hd_cd] |
8 | mov al,[device_present_buffer.hd_cd] |
9 | test al,10b |
9 | test al,10b |
10 | je @f |
10 | je @f |
11 | mov [device_present.cd3],1 |
11 | mov [device_present.cd3],1 |
12 | jmp .ide2 |
12 | jmp .ide2 |
13 | @@: |
13 | @@: |
14 | test al,1b |
14 | test al,1b |
15 | je @f |
15 | je @f |
16 | mov [device_present.hd3],1 |
16 | mov [device_present.hd3],1 |
17 | .ide2: |
17 | .ide2: |
18 | @@: |
18 | @@: |
19 | test al,1000b |
19 | test al,1000b |
20 | je @f |
20 | je @f |
21 | mov [device_present.cd2],1 |
21 | mov [device_present.cd2],1 |
22 | jmp .ide1 |
22 | jmp .ide1 |
23 | @@: |
23 | @@: |
24 | test al,100b |
24 | test al,100b |
25 | je @f |
25 | je @f |
26 | mov [device_present.hd2],1 |
26 | mov [device_present.hd2],1 |
27 | .ide1: |
27 | .ide1: |
28 | @@: |
28 | @@: |
29 | test al,100000b |
29 | test al,100000b |
30 | je @f |
30 | je @f |
31 | mov [device_present.cd1],1 |
31 | mov [device_present.cd1],1 |
32 | jmp .ide0 |
32 | jmp .ide0 |
33 | @@: |
33 | @@: |
34 | test al,10000b |
34 | test al,10000b |
35 | je @f |
35 | je @f |
36 | mov [device_present.hd1],1 |
36 | mov [device_present.hd1],1 |
37 | .ide0: |
37 | .ide0: |
38 | @@: |
38 | @@: |
39 | test al,10000000b |
39 | test al,10000000b |
40 | je @f |
40 | je @f |
41 | mov [device_present.cd0],1 |
41 | mov [device_present.cd0],1 |
42 | jmp .end |
42 | jmp .end |
43 | @@: |
43 | @@: |
44 | test al,1000000b |
44 | test al,1000000b |
45 | je @f |
45 | je @f |
46 | mov [device_present.hd0],1 |
46 | mov [device_present.hd0],1 |
47 | .end: |
47 | .end: |
48 | @@: |
48 | @@: |
49 | ret |
49 | ret |
50 | ;--------------------------------------------------------------------- |
50 | ;--------------------------------------------------------------------- |
51 | device_detect_f70: |
51 | device_detect_f70: |
52 | mov ax,[select_disk_char] |
52 | mov ax,[select_disk_char] |
53 | mov [read_folder_2_name],ax |
53 | mov [read_folder_2_name],ax |
54 | mov [read_folder_3_name],ax |
54 | mov [read_folder_3_name],ax |
55 | ; mov eax,left_folder_data_1 |
55 | ; mov eax,left_folder_data_1 |
56 | ; mov [read_folder_2.return],eax |
56 | ; mov [read_folder_2.return],eax |
57 | mcall 70, read_folder_2 |
57 | mcall 70, read_folder_2 |
58 | test eax,eax |
58 | test eax,eax |
59 | jz @f |
59 | jz @f |
60 | cmp eax,6 |
60 | cmp eax,6 |
61 | jne read_folder_error |
61 | jne read_folder_error |
62 | @@: |
62 | @@: |
63 | mov [left_folder_block_1],ebx |
63 | mov [left_folder_block_1],ebx |
64 | mov [temp_counter_1],0 |
64 | mov [temp_counter_1],0 |
65 | mov [retrieved_devices_table_counter],0 |
65 | mov [retrieved_devices_table_counter],0 |
66 | .start_temp_counter_1: |
66 | .start_temp_counter_1: |
67 | imul esi,[temp_counter_1],304 |
67 | imul esi,[temp_counter_1],304 |
68 | add esi,left_folder_data_1 |
68 | add esi,left_folder_data_1 |
69 | add esi,32+40 ;[eax+32+40] |
69 | add esi,32+40 ;[eax+32+40] |
70 | call copy_folder_name_3 |
70 | call copy_folder_name_3 |
71 | ; mov eax,right_folder_data_1 |
71 | ; mov eax,right_folder_data_1 |
72 | ; mov [read_folder_3.return],eax |
72 | ; mov [read_folder_3.return],eax |
73 | mcall 70, read_folder_3 |
73 | mcall 70, read_folder_3 |
74 | test eax,eax |
74 | test eax,eax |
75 | jz @f |
75 | jz @f |
76 | cmp eax,6 |
76 | cmp eax,6 |
77 | jne read_folder_1_error |
77 | jne read_folder_1_error |
78 | @@: |
78 | @@: |
79 | mov eax,right_folder_data_1 |
79 | mov eax,right_folder_data_1 |
80 | cmp [eax+4],dword 0 |
80 | cmp [eax+4],dword 0 |
81 | je .continue |
81 | je .continue |
82 | mov [right_folder_block_1],ebx |
82 | mov [right_folder_block_1],ebx |
83 | mov ebp,0 |
83 | mov ebp,0 |
84 | .start_copy_device_patch: |
84 | .start_copy_device_patch: |
85 | imul edi,[retrieved_devices_table_counter],10 |
85 | imul edi,[retrieved_devices_table_counter],10 |
86 | add edi,retrieved_devices_table |
86 | add edi,retrieved_devices_table |
87 | mov [edi],byte '/' |
87 | mov [edi],byte '/' |
88 | inc edi |
88 | inc edi |
89 | imul esi,[temp_counter_1],304 |
89 | imul esi,[temp_counter_1],304 |
90 | add esi,left_folder_data_1 |
90 | add esi,left_folder_data_1 |
91 | add esi,32+40 ;[eax+32+40] |
91 | add esi,32+40 ;[eax+32+40] |
92 | call proc_copy_patch |
92 | call proc_copy_patch |
93 | imul esi,ebp,304 |
93 | imul esi,ebp,304 |
94 | add esi,right_folder_data_1 |
94 | add esi,right_folder_data_1 |
95 | add esi,32+40 ;[eax+32+40] |
95 | add esi,32+40 ;[eax+32+40] |
96 | mov [edi-1],byte '/' |
96 | mov [edi-1],byte '/' |
97 | call proc_copy_patch |
97 | call proc_copy_patch |
98 | inc [retrieved_devices_table_counter] |
98 | inc [retrieved_devices_table_counter] |
99 | inc ebp |
99 | inc ebp |
100 | cmp ebp,[right_folder_block_1] |
100 | cmp ebp,[right_folder_block_1] |
101 | jb .start_copy_device_patch |
101 | jb .start_copy_device_patch |
102 | .continue: |
102 | .continue: |
103 | inc [temp_counter_1] |
103 | inc [temp_counter_1] |
104 | mov eax,[temp_counter_1] |
104 | mov eax,[temp_counter_1] |
105 | cmp eax,[left_folder_block_1] |
105 | cmp eax,[left_folder_block_1] |
106 | jb .start_temp_counter_1 |
106 | jb .start_temp_counter_1 |
- | 107 | ret |
|
- | 108 | ;--------------------------------------------------------------------- |
|
- | 109 | select_starting_directories: |
|
107 | mov esi,retrieved_devices_table+1 |
110 | mov esi,retrieved_devices_table+1 |
108 | call copy_folder_name |
111 | call copy_folder_name |
109 | mov esi,retrieved_devices_table+3 |
112 | mov esi,retrieved_devices_table+3 |
110 | mov ecx,0 |
113 | mov ecx,0 |
111 | @@: |
114 | @@: |
112 | add esi,8 |
115 | add esi,8 |
113 | cld |
116 | cld |
114 | lodsw |
117 | lodsw |
115 | inc ecx |
118 | inc ecx |
116 | cmp ecx,[retrieved_devices_table_counter] |
119 | cmp ecx,[retrieved_devices_table_counter] |
117 | ja @f |
120 | ja @f |
118 | cmp ax,'hd' |
121 | cmp ax,'hd' |
119 | jne @r |
122 | jne @r |
120 | sub esi,2 |
123 | sub esi,2 |
121 | call copy_folder_name_1 |
124 | call copy_folder_name_1 |
122 | ret |
125 | ret |
123 | @@: |
126 | @@: |
124 | ; mov [read_folder_1.name+1],dword 0 |
127 | ; mov [read_folder_1.name+1],dword 0 |
125 | ; mov [read_folder_1_name+1],dword 0 |
128 | ; mov [read_folder_1_name+1],dword 0 |
126 | mov esi,retrieved_devices_table+1 |
129 | mov esi,retrieved_devices_table+1 |
127 | call copy_folder_name_1 |
130 | call copy_folder_name_1 |
128 | ; mov [read_folder_1_name],dword '/rd/' |
131 | ; mov [read_folder_1_name],dword '/rd/' |
129 | ; mov [read_folder_1_name+4],word '1/' |
132 | ; mov [read_folder_1_name+4],word '1/' |
130 | ; mov [read_folder_1_name+6],byte 0 |
133 | ; mov [read_folder_1_name+6],byte 0 |
131 | ret |
134 | ret |
132 | ;--------------------------------------------------------------------- |
135 | ;--------------------------------------------------------------------- |
133 | proc_copy_patch: |
136 | proc_copy_patch: |
134 | @@: |
137 | @@: |
135 | cld |
138 | cld |
136 | lodsb |
139 | lodsb |
137 | stosb |
140 | stosb |
138 | cmp al,0 |
141 | cmp al,0 |
139 | jne @r |
142 | jne @r |
140 | ret |
143 | ret |