ATA read/write sectors: Difference between revisions
Jump to navigation
Jump to search
Generalized write description.
[unchecked revision] | [unchecked revision] |
(Generalized write description.) |
|||
Line 4:
==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 long-mode subroutine reads CH sectors to memory address indicated by RDI register.
<source lang="asm">
;=============================================================================
Line 83:
=ATA write sectors=
A write is mostly equivalent to performing a read operation. The only changes needed are a change in command (0x30 for chs write), and the direction of the data, which is written (rep outsw from *SI) to the data port rather than read (rep insw to *DI).
=See also=
|