I was reading lot of posts here and I think this forum is great. I'm preparing myself to create semi-os for data recovery. I was looking answer in specifications of ATA and PCI and ISA arch.
Code: Select all
mov dx,1f6h ;Drive and head port
mov al,0a0h ;Drive 0, head 0
out dx,al
mov dx,1f2h ;Sector count port
mov al,1 ;Read one sector
out dx,al
mov dx,1f3h ;Sector number port
mov al,1 ;Read sector one
out dx,al
mov dx,1f4h ;Cylinder low port
mov al,0 ;Cylinder 0
out dx,al
mov dx,1f5h ;Cylinder high port
mov al,0 ;The rest of the cylinder 0
out dx,al
mov dx,1f7h ;Command port
mov al,20h ;Read with retry.
out dx,al
still_going:
in al,dx
test al,8 ;This means the sector buffer requires
;servicing.
jz still_going ;Don't continue until the sector buffer
;is ready.
mov ecx,512 ;One sector /2
;mov edi,offset buffer
mov dx,1f0h ;Data port - data comes in and out of here.
rep insd
Any one have a clue what i've done wrong?
Cheers,
WA