Reading more sectors than there are on a track with int 13h

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
PhantomR
Posts: 18
Joined: Wed Oct 31, 2018 6:15 am

Reading more sectors than there are on a track with int 13h

Post by PhantomR »

What is the order int 13h with ah=02h will read, say, 19 sectors starting at (C, H, S) = (0, 0, 1) provided a (floppy) disk geometry of 2 heads, 18 sectors per track and 80 tracks per side.

Or, more generally, what happens when it reaches the end of track 0, head 0? Does it go to track 1 (+ head 0, sector1) or head 1 (+ track 1, sector 1)? Does it even work properly in this case?

EDIT: Wait.. is this actually like hours, minutes, seconds? If we reach the end of the track (S is greater than 17), then H is increased?
PhantomR
Posts: 18
Joined: Wed Oct 31, 2018 6:15 am

Re: Reading more sectors than there are on a track with int

Post by PhantomR »

I received an answer here: https://stackoverflow.com/questions/543 ... th-int-13h .

To summarize, my edit above was confirmed (in that it works similar to the hours, minutes, seconds system). I was also told that modern BIOSes can handle reading (or writing) beyond the starting track, but for best compatibility I should avoid it.
User avatar
iansjack
Member
Member
Posts: 4706
Joined: Sat Mar 31, 2012 3:07 am
Location: Chichester, UK

Re: Reading more sectors than there are on a track with int

Post by iansjack »

You could easily find the answer to this, for your particular BIOS, with a little experimentation.
PhantomR
Posts: 18
Joined: Wed Oct 31, 2018 6:15 am

Re: Reading more sectors than there are on a track with int

Post by PhantomR »

Sure :), I actually thought I could try some things, but it felt quite complicated and I wasn't in the mood (nor felt I had enough time for it). Still, I'm curious, how would you proceed to find out this information?
nullplan
Member
Member
Posts: 1801
Joined: Wed Aug 30, 2017 8:24 am

Re: Reading more sectors than there are on a track with int

Post by nullplan »

PhantomR wrote:Sure :), I actually thought I could try some things, but it felt quite complicated and I wasn't in the mood (nor felt I had enough time for it). Still, I'm curious, how would you proceed to find out this information?
For my personal PC: Prepare floppy image, create test program, run program, evaluate result.

More general: Immerse myself in Ralf Brown's Interrupt List until I think I know what would happen. Then confirm on my own PC as above.
Carpe diem!
Post Reply