K3achas wrote:
Thanks. After printing the registers of the ATA controller, I found out that I hadn't actually output one of the registers. Good luck on your osdev journey.
It now reads on[e] sector just fine, but with the second sector I try to read, it aborts the command.
Abort usually means that there is an error in the parameters, which could mean it is in the middle of the last command. Did you read all of the sector or sectors requested? For example, if you think you are reading only one sector (256 words) but actually requested more, it may abort. (may, depending on the current status and command)
Also, note that the interrupt is fired for each sector read, not at the beginning of all sectors requested. For example, if you request two sectors, you will read 256 words and expect an interrupt before the next sector is to be read, reading the STATUS register to clear the interrupt. If you do not acknowledge the interrupt, an abort might take place.
Without looking at your code in more detail, I just threw this out there. However, I must ask why you are writing in assembly instead of C or another high level language. In my opinion, coding in assembly makes it much more error prone.
Ben
-http://www.fysnet.net/osdesign_book_series.htm