1) The search HDD is improved, earlier by search was made reset only CD, now is made reset and HDD also.

2) Are deleted CLI and STI from procedures of reading and writing of sector on HDD. These of commands are replaced by operation with a port [hdbase]+206h, which disables only interruption for IDE.

git-svn-id: svn://kolibrios.org@136 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
Marat Zakiyanov (Mario79)
2006-08-26 16:50:41 +00:00
parent 65cbed8f0d
commit 334f7721de
2 changed files with 36 additions and 32 deletions

View File

@@ -11,42 +11,25 @@ FindHDD:
mov [ChannelNumber],1
mov [DiskNumber],0
call FindHDD_3
; mov ax,[Sector512+176]
; mov [0x40006],ax
; mov ax,[Sector512+126]
; mov [0x40008],ax
; mov ax,[Sector512+128]
; mov [0x40008],ax
mov [DiskNumber],1
call FindHDD_3
; mov al,[Sector512+176]
; mov [0x40007],al
inc [ChannelNumber]
mov [DiskNumber],0
call FindHDD_3
; mov al,[Sector512+176]
; mov [0x40008],al
mov [DiskNumber],1
call FindHDD_1
; mov al,[Sector512+176]
; mov [0x40009],al
jmp EndFindHDD
FindHDD_1:
call ReadHDD_ID
cmp [DevErrorCode],0
jne FindHDD_2
cmp [Sector512+6],word 16
ja FindHDD_2
cmp [Sector512+12],word 255
ja FindHDD_2
inc byte [0x40001]
jmp FindHDD_2_2
FindHDD_2:
call DeviceReset
cmp [DevErrorCode],0
jne FindHDD_2_2
call ReadHDD_ID
cmp [DevErrorCode],0
jne FindHDD_2
inc byte [0x40001]
ret
FindHDD_2:
call ReadCD_ID
cmp [DevErrorCode],0
jne FindHDD_2_2