Rev 1792 | Rev 4314 | Go to most recent revision | Only display areas with differences | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1792 | Rev 3755 | ||
---|---|---|---|
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] |
|
- | 53 | mov [read_folder_2_name],ax |
|
- | 54 | mov [read_folder_3_name],ax |
|
52 | mov eax,[left_folder_data] |
55 | ; mov eax,left_folder_data_1 |
53 | mov [read_folder.return],eax |
56 | ; mov [read_folder_2.return],eax |
54 | mcall 70, read_folder |
57 | mcall 70, read_folder_2 |
55 | test eax,eax |
58 | test eax,eax |
56 | jz @f |
59 | jz @f |
57 | cmp eax,6 |
60 | cmp eax,6 |
58 | jne read_folder_error |
61 | jne read_folder_error |
59 | @@: |
62 | @@: |
60 | mov [left_folder_block],ebx |
63 | mov [left_folder_block_1],ebx |
61 | mov [temp_counter_1],0 |
64 | mov [temp_counter_1],0 |
62 | mov [retrieved_devices_table_counter],0 |
65 | mov [retrieved_devices_table_counter],0 |
63 | .start_temp_counter_1: |
66 | .start_temp_counter_1: |
64 | imul esi,[temp_counter_1],304 |
67 | imul esi,[temp_counter_1],304 |
65 | add esi,[left_folder_data] |
68 | add esi,left_folder_data_1 |
66 | add esi,32+40 ;[eax+32+40] |
69 | add esi,32+40 ;[eax+32+40] |
67 | call copy_folder_name_1 |
70 | call copy_folder_name_3 |
68 | mov eax,[right_folder_data] |
71 | ; mov eax,right_folder_data_1 |
69 | mov [read_folder_1.return],eax |
72 | ; mov [read_folder_3.return],eax |
70 | mcall 70, read_folder_1 |
73 | mcall 70, read_folder_3 |
71 | test eax,eax |
74 | test eax,eax |
72 | jz @f |
75 | jz @f |
73 | cmp eax,6 |
76 | cmp eax,6 |
74 | jne read_folder_1_error |
77 | jne read_folder_1_error |
75 | @@: |
78 | @@: |
76 | mov eax,[right_folder_data] |
79 | mov eax,right_folder_data_1 |
77 | cmp [eax+4],dword 0 |
80 | cmp [eax+4],dword 0 |
78 | je .continue |
81 | je .continue |
79 | mov [right_folder_block],ebx |
82 | mov [right_folder_block_1],ebx |
80 | mov ebp,0 |
83 | mov ebp,0 |
81 | .start_copy_device_patch: |
84 | .start_copy_device_patch: |
82 | imul edi,[retrieved_devices_table_counter],10 |
85 | imul edi,[retrieved_devices_table_counter],10 |
83 | add edi,retrieved_devices_table |
86 | add edi,retrieved_devices_table |
84 | mov [edi],byte '/' |
87 | mov [edi],byte '/' |
85 | inc edi |
88 | inc edi |
86 | imul esi,[temp_counter_1],304 |
89 | imul esi,[temp_counter_1],304 |
87 | add esi,[left_folder_data] |
90 | add esi,left_folder_data_1 |
88 | add esi,32+40 ;[eax+32+40] |
91 | add esi,32+40 ;[eax+32+40] |
89 | call proc_copy_patch |
92 | call proc_copy_patch |
90 | imul esi,ebp,304 |
93 | imul esi,ebp,304 |
91 | add esi,[right_folder_data] |
94 | add esi,right_folder_data_1 |
92 | add esi,32+40 ;[eax+32+40] |
95 | add esi,32+40 ;[eax+32+40] |
93 | mov [edi-1],byte '/' |
96 | mov [edi-1],byte '/' |
94 | call proc_copy_patch |
97 | call proc_copy_patch |
95 | inc [retrieved_devices_table_counter] |
98 | inc [retrieved_devices_table_counter] |
96 | inc ebp |
99 | inc ebp |
97 | cmp ebp,[right_folder_block] |
100 | cmp ebp,[right_folder_block_1] |
98 | jb .start_copy_device_patch |
101 | jb .start_copy_device_patch |
99 | .continue: |
102 | .continue: |
100 | inc [temp_counter_1] |
103 | inc [temp_counter_1] |
101 | mov eax,[temp_counter_1] |
104 | mov eax,[temp_counter_1] |
102 | cmp eax,[left_folder_block] |
105 | cmp eax,[left_folder_block_1] |
103 | jb .start_temp_counter_1 |
106 | jb .start_temp_counter_1 |
104 | mov esi,retrieved_devices_table+1 |
107 | mov esi,retrieved_devices_table+1 |
105 | call copy_folder_name |
108 | call copy_folder_name |
106 | mov esi,retrieved_devices_table+3 |
109 | mov esi,retrieved_devices_table+3 |
107 | mov ecx,0 |
110 | mov ecx,0 |
108 | @@: |
111 | @@: |
109 | add esi,8 |
112 | add esi,8 |
110 | cld |
113 | cld |
111 | lodsw |
114 | lodsw |
112 | inc ecx |
115 | inc ecx |
113 | cmp ecx,[retrieved_devices_table_counter] |
116 | cmp ecx,[retrieved_devices_table_counter] |
114 | ja @f |
117 | ja @f |
115 | cmp ax,'hd' |
118 | cmp ax,'hd' |
116 | jne @r |
119 | jne @r |
117 | sub esi,2 |
120 | sub esi,2 |
118 | call copy_folder_name_1 |
121 | call copy_folder_name_1 |
119 | ret |
122 | ret |
120 | @@: |
123 | @@: |
121 | ; mov [read_folder_1.name+1],dword 0 |
124 | ; mov [read_folder_1.name+1],dword 0 |
122 | ; mov [read_folder_1_name+1],dword 0 |
125 | ; mov [read_folder_1_name+1],dword 0 |
123 | mov esi,retrieved_devices_table+1 |
126 | mov esi,retrieved_devices_table+1 |
124 | call copy_folder_name_1 |
127 | call copy_folder_name_1 |
125 | ; mov [read_folder_1_name],dword '/rd/' |
128 | ; mov [read_folder_1_name],dword '/rd/' |
126 | ; mov [read_folder_1_name+4],word '1/' |
129 | ; mov [read_folder_1_name+4],word '1/' |
127 | ; mov [read_folder_1_name+6],byte 0 |
130 | ; mov [read_folder_1_name+6],byte 0 |
128 | ret |
131 | ret |
129 | ;--------------------------------------------------------------------- |
132 | ;--------------------------------------------------------------------- |
130 | proc_copy_patch: |
133 | proc_copy_patch: |
131 | @@: |
134 | @@: |
132 | cld |
135 | cld |
133 | lodsb |
136 | lodsb |
134 | stosb |
137 | stosb |
135 | cmp al,0 |
138 | cmp al,0 |
136 | jne @r |
139 | jne @r |
137 | ret |
140 | ret |