I am having problems finding data on a floppy disk. According to the inode in the EXT2 file system that i am working with, the data I am looking for is stored block 33H (51 decimal). I am trying to access this data using INT 13 AH=02H, but i am not sure what parameters use. Can someone please tell me what to enter for the following to get data in block 33H :
1) cylinder number
2) head number
3) sector number
My floppy drive parameters returned by INT 13 AH=08h are as follows:
maximum head number = 1
maximum sector number = 12h (18 decimal)
maximum cylinder number = 4F (79 decimal)
Any help is greatly appreciated.
Thank You
MWM
Accessing data on floppy
RE:Accessing data on floppy
Thanks for your help Khumba, could you please tell me how you came up with those numbers, so that i can figure this out for myself in the future.
thank you
MWM
thank you
MWM
RE:Accessing data on floppy
you can probably assume 512-byte sectors for floppy disks
get the block size from the ext2 superblock; probably 1K
assuming 1K blocks and 512-byte sectors, there are 2 sectors per block,
so block 51 = sector 102
convert to LBA: sectors_per_track = 18, heads = 2,
sector = LBA % sectors_per_track + 1 = 13
head = LBA / sectors_per_track % heads = 1
cylinder (track) = LBA / sectors_per_track / heads = 2
Track 2, Head 1, Sector 13? that's my guess, probably wrong
>My floppy drive parameters returned by INT 13 AH=08h are as follows:
INT 13h AH=08h is useless for floppies. it will ALWAYS say 18 sectors per track, even if there are 19, 20, or 21
get the block size from the ext2 superblock; probably 1K
assuming 1K blocks and 512-byte sectors, there are 2 sectors per block,
so block 51 = sector 102
convert to LBA: sectors_per_track = 18, heads = 2,
sector = LBA % sectors_per_track + 1 = 13
head = LBA / sectors_per_track % heads = 1
cylinder (track) = LBA / sectors_per_track / heads = 2
Track 2, Head 1, Sector 13? that's my guess, probably wrong
>My floppy drive parameters returned by INT 13 AH=08h are as follows:
INT 13h AH=08h is useless for floppies. it will ALWAYS say 18 sectors per track, even if there are 19, 20, or 21