14d07f569799aaae0d7fccf8e76386d450664987fJun Nakajima#################### 24d07f569799aaae0d7fccf8e76386d450664987fJun Nakajima# Read Disk Sector # 34d07f569799aaae0d7fccf8e76386d450664987fJun Nakajima#################### 44d07f569799aaae0d7fccf8e76386d450664987fJun Nakajima 54d07f569799aaae0d7fccf8e76386d450664987fJun NakajimaSystem programming: 64d07f569799aaae0d7fccf8e76386d450664987fJun Nakajima------------------- 74d07f569799aaae0d7fccf8e76386d450664987fJun Nakajima 84d07f569799aaae0d7fccf8e76386d450664987fJun Nakajima(Int 13h, ah=2) 94d07f569799aaae0d7fccf8e76386d450664987fJun Nakajimain 1f7 until BSY cleared 104d07f569799aaae0d7fccf8e76386d450664987fJun Nakajimaout 1f2, AL # number of sectors 114d07f569799aaae0d7fccf8e76386d450664987fJun Nakajimaout 1f3, cl (bits 0-5) # starting sector number 124d07f569799aaae0d7fccf8e76386d450664987fJun Nakajimaout 1f4, ch # cylinder number bits 0..7, 0 based 134d07f569799aaae0d7fccf8e76386d450664987fJun Nakajimaout 1f5, cl (bits 6,7) & dh (bits 6,7) # cyl, bits 8..9, 10..11 144d07f569799aaae0d7fccf8e76386d450664987fJun Nakajimaout 1f6, dh (bits 0..3) --> bits 0..3 # head number 154d07f569799aaae0d7fccf8e76386d450664987fJun Nakajima dh (bits 4..5) --> ??? # head number 164d07f569799aaae0d7fccf8e76386d450664987fJun Nakajima dl (bit 0) --> bit 4 # drive number 174d07f569799aaae0d7fccf8e76386d450664987fJun Nakajimaout 1f7, 0x20 # read sectors command normal 184d07f569799aaae0d7fccf8e76386d450664987fJun Nakajima 194d07f569799aaae0d7fccf8e76386d450664987fJun Nakajima 204d07f569799aaae0d7fccf8e76386d450664987fJun Nakajima 214d07f569799aaae0d7fccf8e76386d450664987fJun NakajimaDrive response: 224d07f569799aaae0d7fccf8e76386d450664987fJun Nakajima--------------- 234d07f569799aaae0d7fccf8e76386d450664987fJun Nakajima 244d07f569799aaae0d7fccf8e76386d450664987fJun Nakajima* drive sets the busy bit in Status Reg to 1 254d07f569799aaae0d7fccf8e76386d450664987fJun Nakajima* if command parameters are wrong: 264d07f569799aaae0d7fccf8e76386d450664987fJun Nakajima > drive sets the aborted-command bit in the Error register and 274d07f569799aaae0d7fccf8e76386d450664987fJun Nakajima error bit in the Status register to 1. 284d07f569799aaae0d7fccf8e76386d450664987fJun Nakajima > Drive also sets the busy bit in the Status register to 0. 294d07f569799aaae0d7fccf8e76386d450664987fJun Nakajima > Drive then generates an interrupt to the system. 304d07f569799aaae0d7fccf8e76386d450664987fJun Nakajima* else: 314d07f569799aaae0d7fccf8e76386d450664987fJun Nakajima > drive executes an implied seek to desired track and 324d07f569799aaae0d7fccf8e76386d450664987fJun Nakajima reads sectors into sector buffer 334d07f569799aaae0d7fccf8e76386d450664987fJun Nakajima > when sector buffer is filled and the data is ready to be 344d07f569799aaae0d7fccf8e76386d450664987fJun Nakajima transferred, the drive sets the data-request bit to 1, sets 354d07f569799aaae0d7fccf8e76386d450664987fJun Nakajima the busy bit to 0, and generates an interrupt. 364d07f569799aaae0d7fccf8e76386d450664987fJun Nakajima > on a single-sector transfer, after the system has transferred 374d07f569799aaae0d7fccf8e76386d450664987fJun Nakajima the data, the drive sets the data-request bit and the busy bit to 0. 384d07f569799aaae0d7fccf8e76386d450664987fJun Nakajima > on a multiple-sector transfer, after the system has transferred 394d07f569799aaae0d7fccf8e76386d450664987fJun Nakajima the first sector of data, the drive sets the data-request bit to 0, 404d07f569799aaae0d7fccf8e76386d450664987fJun Nakajima and the busy bit to 1. When each subsequent sector is ready to be 414d07f569799aaae0d7fccf8e76386d450664987fJun Nakajima transferred, the drive sets the data-request bit to 1, the busy bit to 0, 424d07f569799aaae0d7fccf8e76386d450664987fJun Nakajima and generates an interrupt. When the system has tranferred the last sector, 434d07f569799aaae0d7fccf8e76386d450664987fJun Nakajima the drive sets the data-request bit and busy bit to 0. 444d07f569799aaae0d7fccf8e76386d450664987fJun Nakajima 45