diff --git a/kernel/trunk/detect/biosdisk.inc b/kernel/trunk/detect/biosdisk.inc index 5f3d19eb2a..2fc98039bf 100644 --- a/kernel/trunk/detect/biosdisk.inc +++ b/kernel/trunk/detect/biosdisk.inc @@ -55,7 +55,8 @@ bdds: inc ax cmp word [si], 170h jz @f - mov ax, -1 + or ax,-1 +; mov ax, -1 @@: stosw pop ds @@ -63,10 +64,14 @@ bdds: bddl: mov al, dl stosb - mov al, 0 - stosb - mov ax, -1 - stosw + xor ax,ax + stosb + dec ax + stosw +; mov al, 0 +; stosb +; mov ax, -1 +; stosw bddc2: cmp cl, [es:0x475] jae bdde diff --git a/kernel/trunk/detect/dev_fd.inc b/kernel/trunk/detect/dev_fd.inc index 0bf633582f..41bedcbdc2 100644 --- a/kernel/trunk/detect/dev_fd.inc +++ b/kernel/trunk/detect/dev_fd.inc @@ -24,7 +24,7 @@ $Revision$ mov cx,0xff wait_cmos: dec cx - cmp cx,0 - jne wait_cmos + test cx,cx + jnz wait_cmos in al,0x71 mov [DRIVE_DATA],al diff --git a/kernel/trunk/fs/fat12.inc b/kernel/trunk/fs/fat12.inc index 5866494d00..08e4858b70 100644 --- a/kernel/trunk/fs/fat12.inc +++ b/kernel/trunk/fs/fat12.inc @@ -88,26 +88,29 @@ fr_do_1: shl ecx,9 cld rep movsb - mov eax,0 ; ok read - mov ebx,0 - mov [flp_status],0 + xor eax,eax + xor ebx,ebx +; mov eax,0 ; ok read +; mov ebx,0 + mov [flp_status],eax ret fdc_status_error_1: - mov [flp_status],0 + xor eax,eax + mov [flp_status],eax mov eax,10 - mov ebx,-1 + or ebx,-1 ret fr_noroot_1: sub esp,32 call expand_filename frfloppy_1: - cmp ebx,0 - jne frfl5_1 + test ebx,ebx + jnz frfl5_1 mov ebx,1 frfl5_1: - cmp ecx,0 - jne frfl6_1 + test ecx,ecx + jnz frfl6_1 mov ecx,1 frfl6_1: dec ebx @@ -137,14 +140,14 @@ l.21_1: add ecx,21 add edi, ecx ;Advance to next entry dec dl - cmp dl,0 - jne l.21_1 + test dl,dl + jnz l.21_1 dec dh - cmp dh,0 - jne l.20_1 + test dh,dh + jnz l.20_1 fdc_status_error_3: mov eax,5 ; file not found ? - mov ebx,-1 + or ebx,-1 add esp,32+28 mov [flp_status],0 ret @@ -232,8 +235,8 @@ frnoread_1: add esp,4 pop ebx ; ebx <- eax : size of file add esp,36 - mov eax,0 - mov [flp_status],0 + xor eax,eax + mov [flp_status],eax ret fdc_status_error_5: @@ -499,8 +502,8 @@ calculate_chs: div ebx mov [FDD_Track],al mov [FDD_Head],0 - cmp edx,0 - je no_head_2 + test edx,edx + jz no_head_2 inc [FDD_Head] no_head_2: mov dl,[old_track]