//ATA I/O port functions and address definitions
//Control block registers
//		   		 		  	   RESET
//							   |DIOW
//							   ||DIOR
//							   |||DA0
//							   ||||DA1
//							   |||||DA2
//							   ||||||CS0
//							   |||||||CS1
//							   ||||||||	
#define ATA_IO_HIZ		 	 		 0b11111111
#define ATA_IO_ASTAT				 	 0b11101110
#define ATA_IO_DEVICECNTL				 0b11101110
//Command block register addresses
#define ATA_IO_DATA				 	 0b11100001
#define ATA_IO_ERROR				 	 0b11110001
#define ATA_IO_FEATURES				  	 0b11110001
#define ATA_IO_SECTORCNT				 0b11101001
#define ATA_IO_SECTORNUM				 0b11111001
#define ATA_IO_CYL_L				 	 0b11100101
#define ATA_IO_CYL_H				 	 0b11110101
#define ATA_IO_DEVICE_HEAD				 0b11101101
#define ATA_IO_STATUS				 	 0b11111101
#define ATA_IO_CMD				 	 0b11111101


Listing 1—A core set of registers is the gateway to the hard drive platters. Everything needed to access a particular 
 data point on the hard drive is represented here.