OSDev.org

The Place to Start for Operating System Developers
It is currently Thu Apr 18, 2024 4:59 pm

All times are UTC - 6 hours




Post new topic Reply to topic  [ 6 posts ] 
Author Message
 Post subject: Disk Sector loading
PostPosted: Sun Sep 23, 2001 11:00 pm 
when you ask to load a sector of a disk into memory, will it load the entire file also or just the 1 sector ?


Top
  
 
 Post subject: RE:Disk Sector loading
PostPosted: Sun Sep 23, 2001 11:00 pm 
>On 2001-09-24 20:01:12, truenoteno wrote:
>when you ask to load a sector of a disk into memory, will it load the entire file also or just the 1 sector ?

It depends. What function do you use to load the
disk sectors? Do you use BIOS INT 13h?
Do you use the read() or fread() functions in C?
What OS are you using?


Top
  
 
 Post subject: RE:Disk Sector loading
PostPosted: Mon Sep 24, 2001 11:00 pm 
>On 2001-09-24 22:17:52, Chris Giese wrote:
>>On 2001-09-24 20:01:12, truenoteno wrote:
>>when you ask to load a sector of a disk into memory, will it load the entire file also or just the 1 sector ?
>
>It depends. What function do you use to load the
>disk sectors? Do you use BIOS INT 13h?
>Do you use the read() or fread() functions in C?
>What OS are you using?

How to load sectors from HD in protected mode?


Top
  
 
 Post subject: RE:Disk Sector loading
PostPosted: Mon Sep 24, 2001 11:00 pm 
>On 2001-09-25 01:12:26, Iwabee wrote:
>>On 2001-09-24 22:17:52, Chris Giese wrote:
>>>On 2001-09-24 20:01:12, truenoteno wrote:
>>>when you ask to load a sector of a disk into memory, will it load the entire file also or just the 1 sector ?
>>
>>It depends. What function do you use to load the
>>disk sectors? Do you use BIOS INT 13h?
>>Do you use the read() or fread() functions in C?
>>What OS are you using?
>
>How to load sectors from HD in protected mode?

INT 13h and drivers for both the floppy and
IDE hard disks deal in sectors. For these
devices, one sector = 512 bytes.

You can load more than one sector at a time
so long as they are contiguous (next to each
other on the disk). In general, a file is
fragmented: the disk sectors it uses are NOT
contiguous. You need another layer of software
(the filesystem) to find the disk sectors
actually used by a file.

Hope this helps.


Top
  
 
 Post subject: RE:Disk Sector loading
PostPosted: Tue Sep 25, 2001 11:00 pm 
>>>>when you ask to load a sector of a disk into memory, will it load the entire file also or just the 1 sector ?
>>>
>>>It depends. What function do you use to load the
>>>disk sectors? Do you use BIOS INT 13h?
>>>Do you use the read() or fread() functions in C?
>>>What OS are you using?
>>
>>How to load sectors from HD in protected mode?
>
>INT 13h and drivers for both the floppy and
>IDE hard disks deal in sectors. For these
>devices, one sector = 512 bytes.
>
>You can load more than one sector at a time
>so long as they are contiguous (next to each
>other on the disk). In general, a file is
>fragmented: the disk sectors it uses are NOT
>contiguous. You need another layer of software
>(the filesystem) to find the disk sectors
>actually used by a file.

Ok. I know that, but in _PROTECTED_ _MODE_ BIOS ints
are disabled so I have to find another way. For
example thru I/O ports. What I ask is HOW to do this?


Top
  
 
 Post subject: RE:Disk Sector loading
PostPosted: Fri Sep 28, 2001 11:00 pm 
>Ok. I know that, but in _PROTECTED_ _MODE_ BIOS ints
>are disabled so I have to find another way. For
>example thru I/O ports. What I ask is HOW to do this?

Uhm... all that info wont fit in one message :) Besides,
it depends on what kind of hd. IDE or SCSI?

If you're lookin' for IDE info (which you probably are)
just search for the ATA Standard (or for IDE HD
programming). I believe HelpPC had a section
on HD's as well.

j.weeks


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

All times are UTC - 6 hours


Who is online

Users browsing this forum: Google [Bot] and 136 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