forked from KolibriOS/kolibrios
small optimization
git-svn-id: svn://kolibrios.org@1229 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
778c4291b7
commit
9aef4d69df
@ -55,7 +55,8 @@ bdds:
|
|||||||
inc ax
|
inc ax
|
||||||
cmp word [si], 170h
|
cmp word [si], 170h
|
||||||
jz @f
|
jz @f
|
||||||
mov ax, -1
|
or ax,-1
|
||||||
|
; mov ax, -1
|
||||||
@@:
|
@@:
|
||||||
stosw
|
stosw
|
||||||
pop ds
|
pop ds
|
||||||
@ -63,10 +64,14 @@ bdds:
|
|||||||
bddl:
|
bddl:
|
||||||
mov al, dl
|
mov al, dl
|
||||||
stosb
|
stosb
|
||||||
mov al, 0
|
xor ax,ax
|
||||||
stosb
|
stosb
|
||||||
mov ax, -1
|
dec ax
|
||||||
stosw
|
stosw
|
||||||
|
; mov al, 0
|
||||||
|
; stosb
|
||||||
|
; mov ax, -1
|
||||||
|
; stosw
|
||||||
bddc2:
|
bddc2:
|
||||||
cmp cl, [es:0x475]
|
cmp cl, [es:0x475]
|
||||||
jae bdde
|
jae bdde
|
||||||
|
@ -24,7 +24,7 @@ $Revision$
|
|||||||
mov cx,0xff
|
mov cx,0xff
|
||||||
wait_cmos:
|
wait_cmos:
|
||||||
dec cx
|
dec cx
|
||||||
cmp cx,0
|
test cx,cx
|
||||||
jne wait_cmos
|
jnz wait_cmos
|
||||||
in al,0x71
|
in al,0x71
|
||||||
mov [DRIVE_DATA],al
|
mov [DRIVE_DATA],al
|
||||||
|
@ -88,26 +88,29 @@ fr_do_1:
|
|||||||
shl ecx,9
|
shl ecx,9
|
||||||
cld
|
cld
|
||||||
rep movsb
|
rep movsb
|
||||||
mov eax,0 ; ok read
|
xor eax,eax
|
||||||
mov ebx,0
|
xor ebx,ebx
|
||||||
mov [flp_status],0
|
; mov eax,0 ; ok read
|
||||||
|
; mov ebx,0
|
||||||
|
mov [flp_status],eax
|
||||||
ret
|
ret
|
||||||
fdc_status_error_1:
|
fdc_status_error_1:
|
||||||
mov [flp_status],0
|
xor eax,eax
|
||||||
|
mov [flp_status],eax
|
||||||
mov eax,10
|
mov eax,10
|
||||||
mov ebx,-1
|
or ebx,-1
|
||||||
ret
|
ret
|
||||||
|
|
||||||
fr_noroot_1:
|
fr_noroot_1:
|
||||||
sub esp,32
|
sub esp,32
|
||||||
call expand_filename
|
call expand_filename
|
||||||
frfloppy_1:
|
frfloppy_1:
|
||||||
cmp ebx,0
|
test ebx,ebx
|
||||||
jne frfl5_1
|
jnz frfl5_1
|
||||||
mov ebx,1
|
mov ebx,1
|
||||||
frfl5_1:
|
frfl5_1:
|
||||||
cmp ecx,0
|
test ecx,ecx
|
||||||
jne frfl6_1
|
jnz frfl6_1
|
||||||
mov ecx,1
|
mov ecx,1
|
||||||
frfl6_1:
|
frfl6_1:
|
||||||
dec ebx
|
dec ebx
|
||||||
@ -137,14 +140,14 @@ l.21_1:
|
|||||||
add ecx,21
|
add ecx,21
|
||||||
add edi, ecx ;Advance to next entry
|
add edi, ecx ;Advance to next entry
|
||||||
dec dl
|
dec dl
|
||||||
cmp dl,0
|
test dl,dl
|
||||||
jne l.21_1
|
jnz l.21_1
|
||||||
dec dh
|
dec dh
|
||||||
cmp dh,0
|
test dh,dh
|
||||||
jne l.20_1
|
jnz l.20_1
|
||||||
fdc_status_error_3:
|
fdc_status_error_3:
|
||||||
mov eax,5 ; file not found ?
|
mov eax,5 ; file not found ?
|
||||||
mov ebx,-1
|
or ebx,-1
|
||||||
add esp,32+28
|
add esp,32+28
|
||||||
mov [flp_status],0
|
mov [flp_status],0
|
||||||
ret
|
ret
|
||||||
@ -232,8 +235,8 @@ frnoread_1:
|
|||||||
add esp,4
|
add esp,4
|
||||||
pop ebx ; ebx <- eax : size of file
|
pop ebx ; ebx <- eax : size of file
|
||||||
add esp,36
|
add esp,36
|
||||||
mov eax,0
|
xor eax,eax
|
||||||
mov [flp_status],0
|
mov [flp_status],eax
|
||||||
ret
|
ret
|
||||||
|
|
||||||
fdc_status_error_5:
|
fdc_status_error_5:
|
||||||
@ -499,8 +502,8 @@ calculate_chs:
|
|||||||
div ebx
|
div ebx
|
||||||
mov [FDD_Track],al
|
mov [FDD_Track],al
|
||||||
mov [FDD_Head],0
|
mov [FDD_Head],0
|
||||||
cmp edx,0
|
test edx,edx
|
||||||
je no_head_2
|
jz no_head_2
|
||||||
inc [FDD_Head]
|
inc [FDD_Head]
|
||||||
no_head_2:
|
no_head_2:
|
||||||
mov dl,[old_track]
|
mov dl,[old_track]
|
||||||
|
Loading…
Reference in New Issue
Block a user