qa.hlp (Table of Contents; Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software, purely for historical purposes. If you're looking for up-to-date documentation, particularly for programming, you should not rely on the information found here, as it will be woefully out of date.
Int 21H Function 22H
   Summary  Notes  Back
──────────────────────────────────────────────────────────────────────────────
 
▀ The record is written (logically, not necessarily physically) to the
  file from memory at the current disk transfer address, specified by
  the most recent call to Int 21H Function 1AH. If the size and location
  of the buffer are such that a segment overflow or wraparound would
  occur, the function fails with a return code of 02H.
 
▀ The file location of the data to be written is determined by the combin-
  ation of the relative-record field (offset 21H) and the record size
  field (offset 0EH) of the FCB. The default record size is 128 bytes.
 
▀ The current block field (offset 0CH) and current record field (offset
  20H) are updated to agree with the relative-record field as a side
  effect of the function.
 
▀ The relative-record field of the FCB is not incremented by this func-
  tion; it is the responsibility of the application to update the FCB
  appropriately if it wishes to write successive records. Compare with
  Int 21H Function 28H, which can write multiple records with one func-
  tion call and automatically increments the relative-record field.
 
▀ If a record is written beyond the current end of file, the space
  between the old end of file and the new record is allocated but not
  initialized.
 
▀ [3.0+] If the program is running on a network, the user must have
  Write access rights to the directory containing the file to be written.
                                    -♦-