Subversion Repositories Kolibri OS

Rev

Rev 4314 | Only display areas with differences | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

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