Reading from Hard Drive 
Author Message
 Reading from Hard Drive


: I have been programming in C and Pascal for 2 years and this year I have
: been taking Structured Assembler.  I would like to know if anyone can
: tell me how I could read directly form the hard drive
: ie. Sector 0000 Offset 0039 and place that information directly into a
: variable.

: Thanks


I would like to thank those people who responsed to my inquiry.  They
have enlighted me to the fact that I need additional knowledge in
Structured Assembler.  I have tried to read the information from the hard
disk to a variable but my efforts have been unsuccessful.  I thought that
if I shared what I was tring to accomplish that there might be an easier
way to perform the task in Assembler.  I am trying to read the Volume ID
number that is stored in the Boot record into to a variable.  The Volume
ID number is on the Floppy disks and Hard disk at Segment 0000 Offset 0039.

Thank in Advance.



Mon, 15 Sep 1997 03:00:00 GMT  
 Reading from Hard Drive

Quote:

>: how I could read directly form the hard drive
>I am trying to read the Volume ID
>number that is stored in the Boot record into to a variable.

the smallest unit you can read/write on a disk (hard or floppy) is the
sector, so there's no way you can read only a byte and put it in a
memory variable.  what you need to do is to declare a buffer large enough
to hold a sector, then call the appropriate bios services that will
read/write that sector (beware of logical/physical sector number conversions)
and then access the data you need from there.
--
                                Steven ?:)


Mon, 15 Sep 1997 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. How can I read the Hard drive's Serial Number

2. How do you read the hard drive serial number?

3. Read Hard Drive ID

4. Parallel computing (and hard drive space...)

5. Want to put REALbasic back on my hard drive

6. ID of hard drive

7. Hard Drive Information

8. new hard drive / which file system?

9. hard drive

10. Hard Drive Serial Number & Stuff

11. Deleting Files on the hard drive from a Directory Queue

12. Recording audio to hard drive

 

 
Powered by phpBB® Forum Software