Low level disk services - Usual newbie needs help type of message 
Author Message
 Low level disk services - Usual newbie needs help type of message

Greetings,

I have done some assembler programming in the past, but now I have a
project that demands some basic hard disk / cdrom access that is beyond
my understanding.

What i want to do is: access the data on a specific location on the hard
disk, regardless of the FAT, i want to go directly using cylinders,
heads and such. And if possible to be able to do the same with a cdrom
or DVD drive, if it doesn't need too much additional coding. Is there a
way to do this, and if there is, how exactly does it work? Bear in mind
that I have never done that kind of programming in the past.

For the compiler part I still use my old copy of turbo C++ 3.XX from
borland,

Thansk in advance,
Claude Martel Olivier



Sat, 05 Apr 2003 03:00:00 GMT  
 Low level disk services - Usual newbie needs help type of message
Howdy.

Quote:

> What i want to do is: access the data on a specific location on the hard
> disk, regardless of the FAT, i want to go directly using cylinders,
> heads and such. And if possible to be able to do the same with a cdrom
> or DVD drive, if it doesn't need too much additional coding. Is there a
> way to do this, and if there is, how exactly does it work? Bear in mind
> that I have never done that kind of programming in the past.

Find a copy of Ralph Brown's interrupt list (any search engine should
find it) and look at INT 13h.  I haven't checked to see if functions 2
and 3 (read sectors and write sectors) also work for CDs, but these
should work for hard drives:

Function 2, read sectors:
INPUT:
AH=02h
AL=number of sectors to read
CH=cylinder number (low 8 bits, zero based)
CL=cylinder/sector:
    bits 7-6 = cylinder number (high 2 bits)
    bits 5-0 = sector number
DH=head number (zero based)
DL=drive number (80h = drive 1, 81h = drive 2)
ES:BX points to buffer

OUTPUT:
AH=00h - no error
   xxh - error code
AL=number of sectors transferred
CF=0 - no error
   1 - error

Function 3, write sectors:
Input and Output for function 3 are the same as for function 2.

Like I said though, get the latest copy of the interrupt list.

chris judge,
formfill, inc.



Tue, 15 Apr 2003 03:20:55 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Floppy Disk Drive Low Level Programming Help!

2. Need help on low level keyboard routines

3. Access disk Low level ?!

4. Low-level disk read/write

5. Low-level disk control

6. Low level hard disk access

7. Low level hard disk programming

8. Code to Low-Level read/write to Floppy Disks

9. Low level disk access

10. Low level disk/file info from 32bit VC?

11. Low level floppy disk stuff

12. Really Low Low Low Level Stuff.

 

 
Powered by phpBB® Forum Software