ableos/sysdata/programs/diskio_driver/src/regs.hb

23 lines
914 B
Plaintext
Raw Normal View History

$ATA_PRIMARY_DATA := @intcast(0x1F0)
$ATA_PRIMARY_ERR := @intcast(0x1F1)
$ATA_PRIMARY_SECCOUNT := @intcast(0x1F2)
$ATA_PRIMARY_LBA_LO := @intcast(0x1F3)
$ATA_PRIMARY_LBA_MID := @intcast(0x1F4)
$ATA_PRIMARY_LBA_HI := @intcast(0x1F5)
$ATA_PRIMARY_DRIVE_HEAD := @intcast(0x1F6)
$ATA_PRIMARY_COMM_REGSTAT := @intcast(0x1F7)
$ATA_PRIMARY_ALTSTAT_DCR := @intcast(0x3F6)
// Indicates an error occurred. Send a new command to clear it
STAT_ERR := 1 << 0
// Set when the drive has PIO data to transfer, or is ready to accept PIO data.
STAT_DRQ := 1 << 3
// Overlapped Mode Service Request.
STAT_SRV := 1 << 4
// Drive Fault Error (does not set ERR).
STAT_DF := 1 << 5
// Bit is clear when drive is spun down, or after an error. Set otherwise.
STAT_RDY := 1 << 6
// Indicates the drive is preparing to send/receive data (wait for it to clear).
// In case of 'hang' (it never clears), do a software reset.
STAT_BSY := 1 << 7