INT 21H (0x21) Function 15H (0x15 or 21) Sequential write 16H (0x16 or 22) Create file 17H (0x17 or 23) Rename file 18H (0x18 or 24) Reserved 19H (0x19 or 25) Get current disk 1AH (0x1A or 26) Set DTA address1BH (0x1B or 27) Get default drive data

Data Recovery PRO DATA DOCTOR

Home | Order Online | Downloads | Contact Us | Software Knowledgebase

it | es | pt | fr | de | jp | kr | cn | ru | nl | gr


INT 21H (0x21)

Function 15H (0x15 or 21) --> Sequential write

Call with: AH = 15H
DS: DX = segment: offset of previously opened
file control block

Returns: AL = 00H, if write successful
01H, if disk is file
02H, if segment wrap

Comments:

This function writes the next sequential block of data into a file, then increments the file pointer appropriately. The number of bytes of data to be written is specified by the record size-field (offset 0EH) of the file control block (FCB).


INT 21H (0x21)

Function 16H (0x16 or 22) --> Create file

Call with: AH = 16H
DS: DX = segment: offset of unopened file control block

Returns: If function is successful and file was created or truncated
AL = 00H
And FCB filled in by MS-DOS as follows:

Drive field (offset 00H) = 1 for drive A, 2 for drive B, etc.     
Current block field (offset0CH) = 00H
Record size field (offset 0EH) = 0080H
Size field (offset 10H) = file size from directory
Date field (offset 14H) = date stamp from directory
Time field (offset 16H = time stamp from directory

If function unsuccessful (directory full)
AL = FFH

Comments:

This function creates a new directory entry in the current directory or truncates any existing file with the same name to zero length. Also opens the file for subsequent read/write operations. This function must be used with caution because an existing file with the specified name is truncated to zero length and all data in that file is irretrievably lost.

INT 21H (0x21)

Function 17H (0x17 or 23) --> Rename file

Call with: AH = 17H
DS: DX = segment: offset of special file control block

Returns: If function is successful and one or more files renamed
AL = 00H

If function is unsuccessful and no matching files, or new filename matched an existing file
AL = FFH

Comments:

This function changes the name of all matching files in the current directory on the disk in the specified drive.

You can also use wild cards with this. The special file control block has a drive code, filename, and extension in the usual position (bytes 0 through 0BH) and a second filename starting 6 bytes after the first (offset 11H).

INT 21H

Function 18H (0x18 or 24) --> Reserved

INT 21H (0x21)

Function 19H (0x19 or 25) --> Get current disk

Call with: AH = 19H

Returns: AL = drive code (0 for A drive, 1 for B
drive etc.)

Comments:

This function returns the drive code of the current or default disk drive.

 

INT 21H (0x21)

Function 1AH (0x1A or 26) --> Set DTA address

Call with: AH = 1AH
DS: DX = segment: offset of disk transfer area.

Returns: Nothing

Comments:
This function specifies the address of the disk transfer area (DTA) to be used for subsequent FCB-related function calls.

INT 21H (0x21)

Function 1BH (0x1B or 27) --> Get default drive data

Call with: AH = 1BH

Returns: If function successful
AL = sectors per cluster
DS: DX = segment offset of media ID byte
CX = size of physical sector in bytes
DX = number of clusters for default drive

If function unsuccessful (invalid drive or critical error)
AL = FFH

Comments:

This function obtains selected information about the default disk drive and a pointer to the media identification byte from its file allocation table.

The media ID byte has the following meanings:

Media Descriptor ID

Medium

0F0H

3.5-inch Floppy Disk, double-sided, 18 sectors (or other)

0F8H

fixed disk

0F9H

5.25-inch Floppy Disk, double-sided, 15 sectors

0F9H

3.5-inch Floppy Disk, double-sided, 9 sectors

0FCH

5.25-inch Floppy Disk, single-sided, 9 sectors

0FDH

5.25-inch Floppy Disk, double-sided, 9 sectors

0FDH

8-inch Floppy Disk, single sided, single density

0FEH

5.25-inch Floppy Disk, single-sided, 8 sectors

0FEH

8-inch Floppy Disk, Single Sided, Single Density

0FEH

8-inch Floppy Disk, Double Sided, Double Density

0FFH

5.25-inch Floppy Disk, double-sided, 8 sectors


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 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20

 
 

page 21 | 22 | 23 | 24 | 25 | 26

Next page

© Copyright 2002-2005 DataDoctor.Biz

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

Website Data Recovery | recuperación de Datos | Récupération de données | Datenrettung | Recupero dati | データ復旧 | 데이터 복구 | 数据恢复 | Восстановление данных | De terugwinning van gegevens | Ανάκτηση δεδομένων
Sitemap Site map1 2 3 4 | Spanish1 2 3 | French1 2 3 | German1 2 3 | Italian1 2 3 | Portuguese1 2 3 | Japanese1 2 3 | Korean1 2 3 | Chinese1 2 3 | Russian1 2 3 | Dutch1 2 3 | Greek1 2 3
Data Recovery Book English | Spanish | French | German | Italian | Portuguese | Japanese | Korean | Chinese | Russian | Dutch | Greek