Programs to Initializing Disk By Resetting Disk System Scan Floppy Disk Print Status of Scanned Sector Bad command Address mark not found Attempt to write to write-protected disk

Files Recovery Software
Home Contact Details Customer Support Download Demo Products  

 
 

/// Initializing Disk By Resetting Disk System \\\

gotoxy(10,2); printf("Initializing The Disk...");

for(i=0;i<3;i++)
{
inregs.h.ah=0x00; // Function Number
inregs.h.dl=0x00; // Floppy Disk

int86(0x13,&inregs,&outregs);
}

gotoxy(10,2); printf("The Status of the Disk is as....\n");

/* Scan the Floppy Disk from 0 to 79 Tracks (Total Tracks 80) */

for(track=0;track<=79;track++)
for(head=0;head<=1;head++)
for(sector=1;sector<=18;sector++)
{
inregs.h.ah = 0x04; /// function Number
inregs.h.al = 1; /// Number of sectors
inregs.h.dl = 0x00; /// Floppy Disk
inregs.h.ch = track;
inregs.h.dh = head;
inregs.h.cl = sector;
inregs.x.bx = FP_OFF(buf);
sregs.es = FP_SEG(buf);

int86x(0x13,&inregs,&outregs,&sregs);

//// Print The Status of the Scanned Sector \\\\

switch(outregs.h.ah)
{
case 0x00:
cprintf("STATUS: No Error!!");
break;

case 0x01:
cprintf("STATUS: Bad command");
break;

case 0x02:
cprintf("STATUS: Address mark not found");
break;

case 0x03:
cprintf("STATUS: Attempt to write to write-protected disk");
break;

Previous page

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


page 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38

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