diskaddrpacket readabsolutesectors writeabsolutesectors getdrivegeometry

Files Recovery Software
Home Contact Details Customer Support Download Demo Products  

 
 

The Data Types representing several parameters of the disk have the following meanings:

Data Type

Size in Bytes

Description

unsigned int size

2 Bytes

Size of Buffer

unsigned int flags

2 Bytes

Information Flags

unsigned long cyl

4 Bytes

Number of Physical Cylinders on Drive

unsigned long heads

4 Bytes

Number of Physical Heads on Drive

unsigned long spt

4 Bytes

Number of Physical Sectors Per Track

unsigned long sectors[2]

8 Bytes

Total Number of Sectors on Drive

unsigned int bps

2 Bytes

Bytes Per Sector

  • The structure diskaddrpacket is used by the functions readabsolutesectors and writeabsolutesectors. The format of disk address packet has been given in the following table:

Data Type

Size in Bytes

Description

char packetsize

1 Byte

Size of Packet, generally 10H

char reserved

1 Byte

Reserved (0)

int blockcount

2 Bytes

Number of Blocks to Transfer

char far *bufferaddress

4 Bytes

address to Transfer Buffer

unsigned long blocknumber[2]

4 Bytes

Starting Absolute Block Number

  • The getdrivegeometry function is used to get the parameters of specified Drive. The Function getdrivegeometry uses function number 0x48 of INT 13H Extensions.

The meaning of parameters has been described in the table given next:

Parameter

What it means

i.h.ah = 0x48

Function Number 0x48 of INT 13H Extensions

i.h.dl = drive

Drive Number

i.x.si = FP_OFF ( (void far*)&g )

ds:si address to buffer for drive parameters as discussed earlier

s.ds = FP_SEG ( (void far*)&g )

ds:si address to buffer for drive parameters as discussed earlier


Previous page

page 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19

Next page
 
 
Data Recovery Book
 
Chapter 1 An Overview of Data Recovery
Chapter 2 Introduction of Hard Disks
Chapter 3 Logical Approach to Disks and OS
Chapter 4 Number Systems
Chapter 5 Introduction of C Programming
Chapter 6 Introduction to Computer Basics
Chapter 7 Necessary DOS Commands
Chapter 8 Disk-BIOS Functions and Interrupts Handling With C
Chapter 9 Handling Large Hard Disks
Chapter 10 Data Recovery From Corrupted Floppy
Chapter 11 Making Backups
Chapter 12 Reading and Modifying MBR with Programming
Chapter 13 Reading and Modifying DBR with Programming
Chapter 14 Programming for “Raw File” Recovery
Chapter 15 Programming for Data Wipers
Chapter 16 Developing more Utilities for Disks
Appendix Glossary of Data Recovery Terms
 
 
Pro Data Doctor

Home

Products

Contact Details

Customer Support

Download Demo

Terms and Conditions

 
Pro Data Doctor