Outils pour utilisateurs

Outils du site


back2root:ibm-pc-ms-dos:interrupts:int_21:int_21_40

Table des matières

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

Request/Call:

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

Return:

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

Back

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