INT 21H (0x21) Function 0DH (0x0D or 13) Disk reset 0EH (0x0E or 14) Select disk 0FH (0x0F or 15) Open file 10H (0x10 or 16) Close file 11H (0x11 or 17) Find first file 12H (0x12 or 18) Find next file 13H (0x13 or 19) Delete file 14H (0x14 or 20) Sequential read

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 0DH (0x0D or 13) -> Disk reset

Call with: AH = 0DH

Returns: Nothing

Comments:

This function flushes all file buffers. The function does not update the disk directory for any files that are still open.

INT 21H (0x21)

Function 0EH (0x0E or 14) -> Select disk

Call with: AH = 0EH

DL = drive code (0 = A, 1= B, etc.)

Returns: AL = number of logical drives in system

Comments:

Selects the specified drive to be current or default, disk drive and returns the total number of logical drives in the system.

The applications should limit themselves to the drive letters A-Z (0 = A, 1 = B, etc.). Logical drives means, the total number of block devices such as floppy disk and hard-disk drives etc. Generally A single physical hard-disk drive is partitioned into two or more logical drives.

INT 21H (0x21)

Function 0FH (0x0F or 15) -> Open file

Call with: AH = 0FH

S: DX = segment: offset of file control block

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

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

If function unsuccessful and file not found
AL = 0FFH

Comments:

Opens a file and makes it available for subsequent read/write operation. If the program is going to use a record size other than 128 bytes, it should set the record-size field at FCB offset 0EH after the file is successfully opened and before any other disk operation.

 

INT 21H (0x21)

Function 10H (0x10 or 16) -> Close file

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

Returns: If function successful (directory update successful)
AL = 00H
If function unsuccessful (file not found in directory)
AL = FFH

Comments:

It is used to close a file. It closes a file, flushes all MS-DOS internal disk buffers associated with the file to disk, and updates the disk directory if the file has been modified or extended.

INT 21H (0x21)

Function 11H (0x11 or 17) -> Find first file

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

Returns: If function successful and matching file found
AL = 00H

And buffer at current disk transfer area (DTA) address filled in as an unopened normal FCB or extended FCB, depending on which type of FCB was input to function.

If function unsuccessful (no matching filename found)
AL = FFH

Comments:

It searches the current directory on the designated drive for a matching filename. You can use wildcards (? and *). This function returns first matching filename.

INT 21H (0x21)

Function 12H (0x12 or 18) -> Find next file

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

Returns: If function successful and matching filename found
AL = 00H
And buffer at current disk transfer area (DTA) address set up as an unopened normal FCB or extended FCB, depending on which type of FCB was originally input to INT21H function 11H

If function unsuccessful and matching filenames not found
AL = FFH

Comments:

This is the companion of the previous function. If INT 21H Function 11H has been successful, it returns the next matching filename, if any. This function assumes that the FCB used as input has been properly initialized by a previous call to INT 21H Function 11H and possible subsequent calls to INT 21H Function 12H and that the filename or extension being searched for contained at least one wildcard character.

INT 21H (0x21)

Function 13H (0x13 or 19) -> Delete file

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

Returns: If function is successful and file or files deleted
AL = 00H
If function is unsuccessful and no matching files were found or at least one matching file was read-only,
AL = FFH

Comments:

It deletes all matching files from the current directory on the default or specified disk drive. You can also use wildcards (? and *).

INT 21H (0x21)

Function 14H (0x14 or 20) -> Sequential read

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

Returns: AL = 00H if read successful
01H if end of file
02H if segment wrap
03H if partial record read at end of
file

Comments:

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

The record is read into memory at the current disk transfer area (DTA) address, specified by the most recent call to INT 21H Function 1AH. If the size of the record and the location of the buffer are such that a segment overflow or wraparound would occur, the function fails with a return code of 02H.

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