Outils pour utilisateurs

Outils du site


Table des matières

INT 0x21 - 0x40 - Write To File or Device Using Handle


reg value descr
AH 0x40
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 data buffer to write


CF cleared : success

reg descr
AX number of written bytes

CF Set: error

reg descr
AX error code (see (see DOS Error Code))

Notes & Comments

  • 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


back2root/ibm-pc-ms-dos/interrupts/int_21/int_21_40.txt · Dernière modification : 2023/01/16 17:54 de