OSDev.org

The Place to Start for Operating System Developers
It is currently Tue Jun 18, 2019 7:52 pm

All times are UTC - 6 hours




Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: Reading more sectors than there are on a track with int 13h
PostPosted: Tue Jan 22, 2019 11:57 am 
Offline

Joined: Wed Oct 31, 2018 6:15 am
Posts: 18
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?


Top
 Profile  
 
 Post subject: Re: Reading more sectors than there are on a track with int
PostPosted: Tue Jan 22, 2019 12:23 pm 
Offline

Joined: Wed Oct 31, 2018 6:15 am
Posts: 18
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.


Top
 Profile  
 
 Post subject: Re: Reading more sectors than there are on a track with int
PostPosted: Tue Jan 22, 2019 12:27 pm 
Offline
Member
Member
User avatar

Joined: Sat Mar 31, 2012 3:07 am
Posts: 3368
Location: Chichester, UK
You could easily find the answer to this, for your particular BIOS, with a little experimentation.


Top
 Profile  
 
 Post subject: Re: Reading more sectors than there are on a track with int
PostPosted: Tue Jan 22, 2019 12:38 pm 
Offline

Joined: Wed Oct 31, 2018 6:15 am
Posts: 18
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?


Top
 Profile  
 
 Post subject: Re: Reading more sectors than there are on a track with int
PostPosted: Tue Jan 22, 2019 1:22 pm 
Offline
Member
Member

Joined: Wed Aug 30, 2017 8:24 am
Posts: 201
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.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: No registered users and 10 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group