OSDev.org
https://forum.osdev.org/

Reading more sectors than there are on a track with int 13h
https://forum.osdev.org/viewtopic.php?f=1&t=33456
Page 1 of 1

Author:  PhantomR [ Tue Jan 22, 2019 11:57 am ]
Post subject:  Reading more sectors than there are on a track with int 13h

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?

Author:  PhantomR [ Tue Jan 22, 2019 12:23 pm ]
Post subject:  Re: Reading more sectors than there are on a track with int

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.

Author:  iansjack [ Tue Jan 22, 2019 12:27 pm ]
Post subject:  Re: Reading more sectors than there are on a track with int

You could easily find the answer to this, for your particular BIOS, with a little experimentation.

Author:  PhantomR [ Tue Jan 22, 2019 12:38 pm ]
Post subject:  Re: Reading more sectors than there are on a track with int

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?

Author:  nullplan [ Tue Jan 22, 2019 1:22 pm ]
Post subject:  Re: Reading more sectors than there are on a track with int

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.

Page 1 of 1 All times are UTC - 6 hours
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/