Page 1 of 1
int 13h overlapping sectors
Posted: Fri Jan 28, 2011 5:27 pm
by norfavrell
Hey.
Let's say that we want to read 5 segments. The first of those segments is on absolute track 1 and absolute segment 16. Would int 13h automatically increment register CH to read 2 segments from track 1 and 3 from track 2? Or do i need to take care of that in the code?
Also what would happen if segments were overlapping to second head?
Thanks in advance,
Bart
Re: int 13h overlapping sectors
Posted: Sat Jan 29, 2011 3:40 am
by Chandra
norfavrell wrote:Hey.
Let's say that we want to read 5 segments. The first of those segments is on absolute track 1 and absolute segment 16. Would int 13h automatically increment register CH to read 2 segments from track 1 and 3 from track 2? Or do i need to take care of that in the code?
Also what would happen if segments were overlapping to second head?
Thanks in advance,
Bart
Segments or sectors?
Re: int 13h overlapping sectors
Posted: Sat Jan 29, 2011 3:55 am
by norfavrell
Sectors sorry. It was very late when i wrote it and I was quite tired.
Let's suppose that i want to read 5 sectors from floppy drive starting with sector 16 on track 1. Would int 13h automatically change to track 2 to read remaining 3 sectors or do i need to do it myself?
I am aware that if data doesn't fit into the segment some BIOSes will fail to read floppy.
Thanks,
Bart
Re: int 13h overlapping sectors
Posted: Sat Jan 29, 2011 6:22 am
by Chandra
Ralf Brown's Interrupt List wrote:
INT 13 - DISK - READ SECTOR(S) INTO MEMORY
AH = 02h
AL = number of sectors to read (must be nonzero)
CH = low eight bits of cylinder number
CL = sector number 1-63 (bits 0-5)
high two bits of cylinder (bits 6-7, hard disk only)
DH = head number
DL = drive number (bit 7 set for hard disk)
ES:BX -> data buffer
Return: CF set on error
if AH = 11h (corrected ECC error), AL = burst length
CF clear if successful
AH = status (see #00234)
AL = number of sectors transferred (only valid if CF set for some
BIOSes)
Notes: errors on a floppy may be due to the motor failing to spin up quickly
enough; the read should be retried at least three times, resetting
the disk with AH=00h between attempts
most BIOSes support "multitrack" reads, where the value in AL
exceeds the number of sectors remaining on the track, in which
case any additional sectors are read beginning at sector 1 on
the following head in the same cylinder; the MSDOS CONFIG.SYS command
MULTITRACK (or the Novell DOS DEBLOCK=) can be used to force DOS to
split disk accesses which would wrap across a track boundary into two
separate calls
I think you were talking about this. As being said, "most" BIOSes support 'multitrack' reads but not "all". So I would recommend you do this job by yourself.
Best Regards,
Chandra
Re: int 13h overlapping sectors
Posted: Sat Jan 29, 2011 7:00 am
by norfavrell
Thank you a lot will implement it myself
Thanks,
Bart