READ DISK SECTOR 
Author Message
 READ DISK SECTOR

Does anyone know how I can make a call (probably Int13) in order to read
a disk sector into qbasic,
ie getsector (C,H,S) Cylinder,Head,Sector  or
    getsector(physical sector)

Thanks !!



Sun, 21 Jul 2002 03:00:00 GMT  
 READ DISK SECTOR

Quote:

>Does anyone know how I can make a call (probably Int13) in order to read
>a disk sector into qbasic,
>ie getsector (C,H,S) Cylinder,Head,Sector  or
>    getsector(physical sector)

I haven't coded it in QBasic, but here's a start on the function:

You will find this capability in Int 25H Absolute Disk read and Int 26H
Absolute Disk Write.

        AL      Drive: 0=A, 1=B, etc.
        CX      Number of sectors to read/write
        DX      Starting logical sector number
        DS:BX   Segment:offset of buffer

Return: Carry clear     Successful
        Carry set       Unsuccessful (AX = error code)

Notes:  All registers except segment register may be destroyed.

        When these function return, the CPU flags originally stored
        on the stack by the INT 25H/26H instruction are STILL on the
        stack.  The stack must be cleared by a POPF or ADD SP,2.

        Logical sector numbers are obtained by numbering each disk
        sector sequentially from track 0, head 0, sector 1.
        The head number is incremented before the track number.

The additional details are too long for me to type here, but you should be
able to find them in a reference, now that you know what to look for.

You also might want to check into Int 21H, Function 44H, Subfunction 0DH,
Minor codes 61H (read) and 41H (write).

The expression "shoot your foot off" definitely comes to mind here. :-)
--

Sun Valley Systems    http://www.sunvaley.com
"For God so loved the world that He gave His only begotten Son, that
whoever believes in Him should not perish but have everlasting life."



Tue, 23 Jul 2002 03:00:00 GMT  
 READ DISK SECTOR


Quote:
> Does anyone know how I can make a call (probably Int13) in order to
read
> a disk sector into qbasic,
> ie getsector (C,H,S) Cylinder,Head,Sector  or
>     getsector(physical sector)

> Thanks !!

Go to the abc packets.
Its there!
Rick

Sent via Deja.com http://www.deja.com/
Before you buy.



Wed, 31 Jul 2002 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. READ DISK SECTOR

2. read/write directly disk sectors.

3. VBH6: read sector by seector from Hard Disk

4. Reading Physical Sectors and Tracks of Disks

5. Can I read a disk sector with VB?

6. Reading Physical Disk Tracks and Sectors

7. Reading and writing disk sectors.

8. Disk Sectors.

9. ABF) Writing to a specific sector on a disk

10. Writing to floppy disk boot sector - how ?

11. Get File Disk Sector info

12. RTF textbox and disk sectors.

 

 
Powered by phpBB® Forum Software