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