Function To Change the Parameters of DBR

Data Recovery Software
Software Development Home Contact us Support

Data Recovery | Data Recovery Software | Partition Recovery | Undelete Partition | Password Recovery | Keylogger | File Recovery | Undelete Software

/* Function To Change the Parameters of DBR */

Recover_with_values()
{
int val =0;

/* Jump Code of 3 Bytes For Floppy */
b.code[0] = 0xEB;
b.code[1]= 0x3E;
b.code[2]= 0x90 ;

/* System Id of 8 Bytes */
strcpy(b.system_id, "+05PSIHC");

/* Bytes Per Sector = 512 */
b.bytes_per_sec = 512;

/* Sector per Cluster for 1.44M 3.5" Floppy = 1 */
b.sec_per_clus = 1;

/* Number of Reserved Sectors = 1 */
b.res_sec =1;

/* Number of FAT Copies = 2 */
b.fat_copies =2;
/* Number of Root Directory Entry = 224 */
b.root_dir_entry =224;

/* Number of Sectors on Disk = 2880 */
b.no_sects =2880;

/* Media Descriptor Byte For Floppy = F0 (H) */
b.format_id =0xF0;

/* Sectors Per FAT = 9 */
b.sec_per_fat =9;

/* Sectors Per Track = 18 */
b.sec_per_trk =18;

/* Number of Sides = 2 */
b.no_sides =2;

/* Number of Special Reserved Sectors (or Hidden
Sectors) = 0 */
b.no_sp_res_sect =0;

/* Use For Floppy Disk*/
val = abswrite ( 0, 1, 0, &b ) ;

if ( val == -1 )
{
printf ( "\n Disk Write Error...bad sector\n" ) ;
printf ( " Disk was not Recovered." ) ;
exit ( 1 ) ;
}

return 0;
}

display_info()
{
printf ( "\n Jump Code (Hex) = %X%X%X (H)\n",
b.code[0],b.code[1],b.code[2]);
printf ( " System ID = %s\n", b.system_id ) ;
printf ( " Bytes per sector = %d\n", b.bytes_per_sec ) ;

printf ( " Sectors per cluster = %d\n", b.sec_per_clus ) ;

printf ( " Reserved sectors = %d\n", b.res_sec ) ;

printf ( " FAT copies = %d\n", b.fat_copies ) ;

printf ( " Root directory entries = %d\n", b.root_dir_entry ) ;

printf ( " No. of sectors on disk = %u\n", b.no_sects ) ;

printf ( " Media Descriptor Byte = %X\n", b.format_id ) ;

printf ( " Sectors per FAT = %d\n", b.sec_per_fat ) ;

printf ( " Sectors per track = %d\n", b.sec_per_trk ) ;

printf ( " No. of sides = %d\n", b.no_sides ) ;

printf ( " No. of reserved sectors = %d\n", b.no_sp_res_sect ) ;
return 0;
}

Data Recovery
Files Recovery Windows Data Recovery Data Recovery Utilities USB Drive Data Recovery
Data Recovery Utility Undelete Files File Recovery Software Data Recovery Services
Digital Camera Data Recovery iPod Data Recovery Data Retrieval Software Pen Drive Data Recovery

Comments on coding:

The structure boot is used to access the DBR, to read-write the parameters of the disk. The function display_info(), displays the various parameters of the disk, reading from the DBR. The function Recover_with_values() is used to modify and recover the parameters of DBR of Floppy.

The values used by the function Recover_with_values(), are for parameters of 1.44MB, 3 ½ inch floppy disk’s DBR. The description of these values has been given in the table given next:

Value

Description

b.code[0] = 0xEB;
b.code[1] = 0x3E;
b.code[2] = 0x90 ;

Jump Code of 3 Bytes For specified Floppy, has been given EB 3E 90(H)

strcpy(b.system_id,"+05PSIHC");

System Id of 8 Bytes. It is calculated with current date and time of the system, however almost anything works.

b.bytes_per_sec = 512;

Bytes Per Sector = 512

b.sec_per_clus = 1

Number of Sectors per Cluster for 1.44M 3.5" Floppy is 1

b.res_sec = 1;

Number of Reserved Sectors = 1

b.fat_copies  =  2;

Number of FAT Copies = 2

b.root_dir_entry = 224;

Number of Root Directory Entries for the specified floppy disk = 224

b.no_sects  = 2880;

Number of Sectors on Disk = 2880

b.format_id = 0xF0;

Media Descriptor Byte For the specified Floppy = F0 (H)

b.sec_per_fat = 9;

Number of Sectors Per FAT = 9

b.sec_per_trk = 18;

Number of Sectors Per Track = 18

b.no_sides = 2;

Number of Sides = 2

b.no_sp_res_sect = 0;

Number of Special Reserved Sectors (or Hidden Sectors) = 0

 

Sample Chapters from book DATA RECOVERY WITH AND WITHOUT PROGRAMMING by Author Tarun Tyagi
Data Recovery with & without Programming


Publishers of the Book
Number of Pages
ISBN
Price of the Book


BPB Publications, New Delhi, India
540
81-7656-922-4
$69.00 (Including Shipping Charges, Cost of Book and Other expenses, Free Source Code CD included with the Book)





Buy Data recovery Book

Previous page

page 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9

 


 

Chapter 14

 
 

page 1 | 2 | 3 | 4 | 5 | 6

Next page

 

Data recovery software Data recovery software
Windows Data Recovery Software Windows Data Recovery Software
iPod Data Recovery Software iPod Data Recovery Software
Memory Card Data Recovery Software Memory Card Data Recovery Software
Pen Drive Data Recovery Software Pen Drive Data Recovery Software
Digital Camera Data Recovery Software Digital Camera Data Recovery Software
Removable Media Data Recovery Software Removable Media Data Recovery Software
FAT Data Recovery Software

FAT Data Recovery Software

NTFS Data Recovery Software NTFS Data Recovery Software
Zune Music Recovery Software Zune Music Recovery Software
Sim Card Data Recovery Software Sim Card Data Recovery Software
Digital Pictures Recovery Software Digital Pictures Recovery Software

System Utilities System Utilities
Keylogger Keylogger
Secure Data Wiper Secure Data Wiper

Real Estate Ghaziabad

Real Estate Ghaziabad

Website Design

Website Design

Real Estate Noida

Real Estate Noida

Web Services

Web Services

Link Exchange

Link Exchange

Mobile Website Design

Mobile Website Design

Live Chat Online

Live Chat Online

Software Development

Software Development

File Recovery Tools

File Recovery Tools

Memory Stick Data Recovery

Memory Stick Data Recovery

Data Retrieval

Data Retrieval

Files Recovery

Files Recovery

iPod Restore

iPod Restore

Hard Drive Data Recovery

Hard Drive Data Recovery

Mobile Phone Data Recovery

Mobile Phone Data Recovery

Data Recovery Tools

Data Recovery Tools

© Copyright 2002-2005 DataDoctor.Biz

Home | Contact us | Downloads | Services | Resources | Terms and conditions | Site map

Languages: English Spanish French German italian portuguese Japanese Korean Chinese Russian Dutch Greek
Data Recovery Book: English Spanish French German Italian Portuguese Japanese Korean Chinese Russian Dutch Greek