Function  22h  Random Write to File Specified by FCB                      (FCB) 

Writes one record as specified in the Struct -FCB to the current DTA

entry AH 22h

DS:DX address of the opened Struct -FCB

return AL 00h successful write operation

01h disk full; no data written (write was canceled)

02h DTA too small for the record size specified (write was

canceled)

note 1) This service cannot write to read-only files.

2) The record pointed to by the Current Block (offset 0Ch) and the Current

Record (offset 20h) fields is loaded at the DTA, then the Current Block

and Current Record fields are incremented.

3) If the record size is less than a sector, the data in the DTA is written

to a buffer; the buffer is written to disk when it contains a full

sector of data, the file is closed, or a Reset Disk (function 0Dh) is

issued.

4) The current file pointers are NOT incremented this function.

5) The record is written to disk at the current DTA address as specified

by the most recent call to function 1Ah. If the size of the record and

location of the DTA are such that a segment overflow or wraparound would

occur, the error return is set to AL=02h