Logical Approach to Disks and OS The INT 13H Interface and INT 13H Extensions

Files Recovery Software
Home Contact Details Customer Support Download Demo Products  

 
 

Chapter 3

Logical Approach to Disks and OS

The hard disk can not run its hardware it self and needs two basic software to run its operations, the BIOS (Basic Input Output System) and The DOS (or Operating System). The disk operating system does not directly talk to the hardware of computer and hard disk but it needs the BIOS in between. That is why the BIOS has taken an important role in the computer.

BIOS

The basic job of BIOS is to provide a standard interface between the hardware or the devices connected to the computer and the DOS. The system BIOS is the lowest-level interface between the hardware of your system and the software that runs on it. It has several significant roles that it plays in the control of access to hard disks such as

  • BIOS Interrupt Routines
  • Hard Disk Detection and Configuration
  • Hard Disk Interface Mode Support

To ensure the interoperability of various hardware and software products, the BIOS of the system is tailored to the needs of its hardware, and provides a standard way of letting software addressing the hardware. These are called BIOS services and are used by many operating system and application programs. They provide a uniform interface to the hard disk, so applications need not to know how to talk to each type of hard disk individually.

Standard IDE/ATA hard disks are configured in the BIOS using various BIOS settings. Modern BIOS programs can detect modern IDE/ATA disks to determine these parameters and automatically configure them. The BIOS controls which types of interface modes can be used with the hard disk, working with the system chipset on the motherboard and the system I/O bus.

The INT 13H Interface and INT 13H Extensions

The primary interface to the BIOS has been the software interrupt 13H which is generally known as INT 13H , where INT stands for interrupt and 13H is the number 19 in hexadecimal notation.

We shall learn and discuss the use of interrupts in programming in detail in the programming phase of this book. The Int13H interface supports many different commands that can be given to the BIOS, which then passes them on to the hard disk. The interrupt 13H include most of the tasks we need to perform with the disk such as reading, writing, formatting etc.

The use and work with Int13H requires the invoking program to know the specific parameters of the hard disk, and provide exact head, cylinder and sector addressing to the routines to allow disk access.

The BIOS uses the geometry for the hard disk as it is set up in the BIOS setup program. The Int13H interface allocates 24 bits for the specification of the geometry of the drive, broken up as follows:

  • 10 bits for the cylinder number, or a total of 1,024 cylinders.
  • 8 bits for the head number, or a total of 256 heads.
  • 6 bits for the sector number, or a total of 63 sectors.

Thus the maximum possible number of sectors in the disk can be

= 1024 * 256 * 63
= 16515072

As we see here that the INT 13H interface can support disks containing up to 16515072 sectors with 512 bytes per sector. Thus the maximum disk size may be,

= 16515072 * 512
= 8455716864 Bytes
~ 8.456 GB

Thus the INT 13H interface can support the disk size approximately up to 8.456 GB (or 7.875 GiB).

Today most of the computer users use the hard disks which is much bigger in capacity then 8 GB that is why, the INT 13H interface has finally come to the end of its usefulness in modern computer systems and has been replaced with a newer interface called INT 13H extensions however INT 13H still may be used by DOS and some other older operating systems, and for other compatibility purposes.

Int 13H Extensions

It is really an interesting story that when INT 13H interface was developed, nobody ever expect to get the 8 GB size in hard disk. However today we may feel an 8 GB hard disk much smaller in capacity, even for home user's personal computer.

The older standard has an important limitation that it uses 24 bits of addressing information and as such can only handle drives that contain up to 16515072 sectors with 512 bytes per sector that yields a maximum capacity of 8.456 GB (or 7.875 GiB).

Thus the problem was to widen the access path from 24 bits to something larger but it was not possible to expand the existing INT13H BIOS interface because if we try to do this a lot of older hardware and software would stop working. And practically, there is no hope to get the respectable place in computer world with a lot of older hardware and software not working with your development.

Therefore a new interface was developed to replace Int13H. These routines are called Int13H extensions . This new interface uses 64 bits instead of 24 bits for addressing and allows a maximum hard drive size of 9.4 * 10 21 bytes that is 9.4 trillion gigabytes .

We shall learn the use of both, the INT 13H and INT 13H extensions in the programming section of this book. There are a number of other size limitations that took place in the earlier days. Some of the popular logical and physical limits have been described below:

The 2.1 GB limit

This size limit was observed in some older BIOSes which only allocate 12 bits for the field in CMOS RAM that gives the number of cylinders. Therefore this number may be at most 111111111111B (Maximum possible 12-Bit Binary Number) which is equivalent to 4095. In this way the maximum disk size with 16 heads, which can be accessed, will be:

= 4095 * 16 * 63 * 512 Bytes
= 2113413120 Bytes are accessible.

The 33.8 GB limit

This hard disk size barrier was noticed in early 1999. Large disks report 16 heads, 63 sectors/track and 16383 cylinders. Many BIOSes compute an actual number of cylinders by dividing the total capacity by 16*63.

For disks larger than 33.8 GB this leads to a number of cylinders larger than 65535. In this particular case, some versions of Award BIOS cannot handle drives that have more than 65,535 cylinders. Now the BIOS crashes or hangs. Since hard disk parameters usually use 16 heads and 63 sectors, this works out to a capacity of about 33.8 GB or 31.5 GiB before trouble occurs.

The solution is to upgrade the BIOS or one can use a jumper to make the disk appear smaller.

 

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

Next page

 

Chapter 2

 
Previous page

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

 
 
 
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