Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
[Ton_Marks]_Assembler_Tutorial(BookFi.org).doc
Скачиваний:
3
Добавлен:
11.11.2019
Размер:
216.06 Кб
Скачать

14H function

Use:

To sequentially read an FCB file.

Call registers:

AH = 14H

DS:DX = Pointer to an FCB already opened.

Return registers:

AL = 0 if there were no errors, otherwise the corresponding error code will be returned: 1 error at the end of the file, 2 error on the FCB structure and 3 partial reading error.

What this function does is that it reads the next block of information from the address given by DS:DX,

What this function does is that it reads the next block of information from the address given by DS:DX, and dates this register.

15H function

Use:

To sequentially write and FCB file.

Call registers:

AH = 15H

DS:DX = Pointer to an FCB already opened.

Return registers:

AL = 00H if there were no errors, otherwise it will contain the error code: 1 full disk or read-only file, 2 error on the formation or on the specification of the FCB.

The 15H function dates the FCB after writing the register to the present

block.

16H function

Use:

To create an FCB file.

Call registers:

AH = 16H

DS:DX = Pointer to an already opened FCB.

Return registers:

AL = 00H if there were no errors, otherwise it will contain the 0FFH value.

It is based on the information which comes on an FCB to create a file on a disk.

21H function

Use:

To read in an random manner an FCB file.

Call registers:

AH = 21H

DS:DX = Pointer to and opened FCB.

Return registers:

A = 00H if there was no error, otherwise AH will contain the code of the error: 1 if it is the end of file, 2 if there is an FCB specification error and 3 if a partial register was read or the file pointer is at the end of the same.

This function reads the specified register by the fields of the actual block and register of an opened FCB and places the information on the DTA, Disk Transfer Area.

22H function

Use:

To write in an random manner an FCB file.

Call registers:

AH = 22H

DS:DX = Pointer to an opened FCB.

Return registers:

AL = 00H if there was no error, otherwise it will contain the error code: 1 if the disk is full or the file is an only read and 2 if there is an error on the

It writes the register specified by the fields of the actual block and register of an opened FCB. It writes this information from the content of the DTA.

FILE WORKING FUNCTIONS:

HANDLES:

3Ch function

Use:

To create a file if it does not exist or leave it on 0 length if it exists,

Handle.

Call registers:

AH = 3CH

CH = File attribute

DS:DX = Pointer to an ASCII specification.

Return registers:

CF = 0 and AX the assigned number to handle if there is no error, in case there is, CF will be 1 and AX will contain the error code: 3 path not found, 4 there

CF will be 1 and AX will contain the error code: 3 path not found, 4 there are no handles available to assign and 5 access denied.

This function substitutes the 16H function. The name of the file is specified on an ASCII chain, which has as a characteristic being a conventional chain of bytes ended with a 0 character.

The file created will contain the attributes defined on the CX register in the following manner:

Value Attributes

00H Normal

02H Hidden

04H System

06H Hidden and of system

The file is created with the reading and writing permissions. It is not possible to create directories using this function.

Соседние файлы в предмете [НЕСОРТИРОВАННОЕ]