INT 13h Question

Programming, for all ages and all languages.
Post Reply
renovatio
Member
Member
Posts: 57
Joined: Fri May 23, 2008 5:13 am

INT 13h Question

Post by renovatio »

Hello, I would like to know how many continuous sectors can int 13h read and why is it limited?

Thanks in advance.
User avatar
Combuster
Member
Member
Posts: 9301
Joined: Wed Oct 18, 2006 3:45 am
Libera.chat IRC: [com]buster
Location: On the balcony, where I can actually keep 1½m distance
Contact:

Re: INT 13h Question

Post by Combuster »

In general the following may fail:
- Accessing the disk across track boundaries
- Crossing a 64k boundary in RAM
- Reading/writing from unaligned RAM
- The first few read attempts after the disk motor was stopped.
- Anything, if there was no reset between the attempt and the last failed attempt.

Most of it is because the bios is often too stupid to do more than one transaction per bios call.
"Certainly avoid yourself. He is a newbie and might not realize it. You'll hate his code deeply a few years down the road." - Sortie
[ My OS ] [ VDisk/SFS ]
Casm
Member
Member
Posts: 221
Joined: Sun Oct 17, 2010 2:21 pm
Location: United Kingdom

Re: INT 13h Question

Post by Casm »

renovatio wrote:Hello, I would like to know how many continuous sectors can int 13h read and why is it limited?

Thanks in advance.
If you use ah=42h you can in principle read up to 127 sectors. However, the input buffer cannot straddle a 64kb boundary in RAM because of the daft way IBM implemented DMA in the originaal PC - at least that limitation applies to floppies. Hard disks nowadays implement their own DMA.
Post Reply