Subversion Repositories Kolibri OS

Rev

Rev 150 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 150 Rev 154
Line 137... Line 137...
137
.new_sector:
137
.new_sector:
138
    test    ecx, ecx
138
    test    ecx, ecx
139
    jz    .done
139
    jz    .done
140
    sub    ebx, 2048
140
    sub    ebx, 2048
141
    jae    .new_sector
141
    jae    .next
142
    add    ebx, 2048
142
    add    ebx, 2048
143
    jnz    .incomplete_sector
143
    jnz    .incomplete_sector
144
    cmp    ecx, 2048
144
    cmp    ecx, 2048
145
    jb    .incomplete_sector
145
    jb    .incomplete_sector
146
; we may read and memmove complete sector
146
; we may read and memmove complete sector
147
    mov  [CDDataBuf_pointer],edx
147
    mov  [CDDataBuf_pointer],edx
148
    call ReadCDWRetr      ; ÷èòàåì ñåêòîð ôàéëà
148
    call ReadCDWRetr      ; ÷èòàåì ñåêòîð ôàéëà
149
    cmp   [DevErrorCode],0
149
    cmp   [DevErrorCode],0
150
    jne   .noaccess_3
150
    jne   .noaccess_3
151
    inc  dword [CDSectorAddress]
151
    add    edx, 2048
152
    add    edx, 2048
-
 
153
    sub    ecx, 2048
152
    sub    ecx, 2048
154
    jmp    .new_sector
153
.next:
-
 
154
    inc  dword [CDSectorAddress]
-
 
155
    jmp    .new_sector
155
.incomplete_sector:
156
.incomplete_sector:
156
; we must read and memmove incomplete sector
157
; we must read and memmove incomplete sector
157
    mov  [CDDataBuf_pointer],CDDataBuf
158
    mov  [CDDataBuf_pointer],CDDataBuf
158
    call ReadCDWRetr      ; ÷èòàåì ñåêòîð ôàéëà
159
    call ReadCDWRetr      ; ÷èòàåì ñåêòîð ôàéëà
159
    cmp   [DevErrorCode],0
160
    cmp   [DevErrorCode],0
160
    jne   .noaccess_3 
161
    jne   .noaccess_3 
161
    inc  dword [CDSectorAddress]
162
    push    ecx
162
    mov    eax,CDDataBuf
-
 
163
    add    eax, ebx
-
 
164
    push    ecx
-
 
165
    add    ecx, ebx
163
    add    ecx, ebx
166
    cmp    ecx, 2048
164
    cmp    ecx, 2048
167
    jbe    @f
165
    jbe    @f
168
    mov    ecx, 2048
166
    mov    ecx, 2048
169
@@:
167
@@:
170
    sub    ecx, ebx
168
    sub    ecx, ebx
171
     push edi esi ecx
169
     push edi esi ecx
172
     mov edi,edx
170
     mov edi,edx
173
     mov esi,eax ;0x7000   ; CD data buffer
171
        lea     esi, [CDDataBuf + ebx]
174
     cld
172
     cld
175
     rep movsb
173
     rep movsb
176
     pop ecx esi edi
174
     pop ecx esi edi
177
    add    edx, ecx
175
    add    edx, ecx
178
    sub    [esp], ecx
176
    sub    [esp], ecx
179
    pop    ecx
177
    pop    ecx
180
    xor    ebx, ebx
178
    xor    ebx, ebx
181
    jmp    .new_sector
179
    jmp    .next
182
     
180
     
Line 183... Line 181...
183
.done:
181
.done:
184
        mov     ebx, edx
182
        mov     ebx, edx
185
        pop     eax edx ecx edi
183
        pop     eax edx ecx edi
186
        sub     ebx, edx
184
        sub     ebx, edx