INT 21,40 - Write To File or Device Using Handle

AH = 40h

BX = file handle

CX = number of bytes to write, a zero value truncates/extends

the file to the current file position

DS:DX = pointer to write buffer

on return:

AX = number of bytes written if CF not set

= error code if CF set (see ~DOS ERROR CODES~)

- if AX is not equal to CX on return, a partial write occurred

- this function can be used to truncate a file to the current

file position by writing zero bytes


Zurück zum Interrupt Info. Roger Morgan / 1998 L.Änderung 29.03.99