ATA read/write sectors: Difference between revisions

Jump to navigation Jump to search
m
no edit summary
[unchecked revision][unchecked revision]
mNo edit summary
Line 3:
=ATA read sectors=
 
==Read in CHS mode==
Accessing disk using CHS (cylinder,head,sector) indexes seem to be kinda old type but is the base for LBA access. The following NASM subroutine reads CH sectors to memory address indicated by RDI register.
<source lang="asm">
Line 79:
</source>
 
==Read in LBA mode==
 
=ATA write sectors=
 
==Write in CHS mode==
As noted by Dex (aka 'qark') in this [http://forum.osdev.org/viewtopic.php?f=1&t=12268 forum topic], the only difference to ata_chs_read is 30h is sent to command register instead of 20h, and using OUTSW instead of INSW, and of course from [RSI] instead of [RDI]. So code for ata_chs_write can be obtained this way.
 
==Write in LBA mode==
Similar to 'read in LBA readmode'.
 
=See also=
25

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.

Navigation menu