I saw someone program IDE hard disk I/O directly, I don't know how he can do that
since I just know using BIOS rutinues or system APIs
How can i get some information on this aspect ?
since I just know using BIOS rutinues or system APIs
How can i get some information on this aspect ?
Im seeking it too. Tell me if you have.
Dion: kalo ada tolong terjemahin yah.:grin:
Dion: kalo ada tolong terjemahin yah.:grin:
Or read Solar OS source code, there is a sample application inside (made by Hawk) that does just that: reads HDD via IN/OUT from ports, using LBA extensions
I hope it was not because Im stupid, I cannot understand. Here is my code
It failed, it only give me a value -1 al. Any advice?
HDReadSector32 proc ; lpBuff,H&d,cyl,sect num,sect count
pop d.[ebp+#16]
pop d.[ebp+#12] ; Sector Count
pop d.[ebp+#8] ; Sector Number
pop d.[ebp+#4] ; Cylinder
pop d.[ebp] ; Head and drive
pop edi ; Buffer address
push d.[ebp+#16]
mov edx,1f2 ; 1f2
mov al,1 ;
out ; Sector Count send.
inc dx ; 1f3
mov eax,[ebp+#8] ; Sector number.
out
inc dx ; Cylinder
mov eax,[ebp+#4]
out
inc dx
mov al,ah
out
inc dx ; 1f6
mov eax,[ebp]
out
inc dx ; 1f7
mov al,#20
out
hdrs32 data ; label for jump
in
test al,8
jz hdrs32
mov ecx,512
mov edx,1f0
rep insb
ret
HDReadSector32 endp
It failed, it only give me a value -1 al. Any advice?
Hi,
I attach complete port listing. Included some details. I don't sure but i think firstly you must set data or status register port for R/W operation.
Regards,
I attach complete port listing. Included some details. I don't sure but i think firstly you must set data or status register port for R/W operation.
Regards,
littlebob1: i hope you are working on an interesting h/w project (s/w one isnt so fun).
CYDONIA, could u tell me where do you got those numbers from?
btw, i googling a while with keyword = programming hard disk controller, and found:
http://www.visopsys.org/osdev/
(check the "Programming the PC's hard disk controller").
as a note, harddisk controller sometimes mentioned in abbreviationed fashion, it is HDC, while FDC for floppy, which is i have some experience programming it directly :)
but, i dont find what the diff in h/w between IDE-SCSI? and where is ATA play its role? (just to make you more curious, littlebob1. dont be rush, take a course on yourself the technique to search the inet, because its not easy to find one :)
realvampire: i dont see any wierd result there, or i am wrong too :P
oh, to mod, i think this thread is better put on OS section.
CYDONIA, could u tell me where do you got those numbers from?
btw, i googling a while with keyword = programming hard disk controller, and found:
http://www.visopsys.org/osdev/
(check the "Programming the PC's hard disk controller").
as a note, harddisk controller sometimes mentioned in abbreviationed fashion, it is HDC, while FDC for floppy, which is i have some experience programming it directly :)
but, i dont find what the diff in h/w between IDE-SCSI? and where is ATA play its role? (just to make you more curious, littlebob1. dont be rush, take a course on yourself the technique to search the inet, because its not easy to find one :)
realvampire: i dont see any wierd result there, or i am wrong too :P
oh, to mod, i think this thread is better put on OS section.
I've got some information from follow url:
http://www.nondot.org/sabre/os/articles/
someone must be interested in it
http://www.nondot.org/sabre/os/articles/
someone must be interested in it
Do you mean it working? how can it be working ?:confused:
Hi all friends,
Below link asm example about r/w hdd with hardware ports and comments.
http://www.nondot.org/sabre/os/files/Disk/HD_PORTS.asm
or complete tutor :
http://www.nondot.org/sabre/os/articles/DiskandDiscDrives/
Regards,
Below link asm example about r/w hdd with hardware ports and comments.
http://www.nondot.org/sabre/os/files/Disk/HD_PORTS.asm
or complete tutor :
http://www.nondot.org/sabre/os/articles/DiskandDiscDrives/
Regards,