Outils pour utilisateurs

Outils du site


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

Différences

Ci-dessous, les différences entre deux révisions de la page.

Lien vers cette vue comparative

Prochaine révision
Révision précédente
back2root:ibm-pc-ms-dos:interrupts:int_21:int_21_40 [2023/01/10 11:55] – supprimée - modification externe (Unknown date) 127.0.0.1back2root:ibm-pc-ms-dos:interrupts:int_21:int_21_40 [2023/01/16 17:54] (Version actuelle) – modification externe 127.0.0.1
Ligne 1: Ligne 1:
 +====== INT 0x21 - 0x40 - Write To File or Device Using Handle ======
 +
 +===== Request/Call: =====
 +
 +{{tablelayout?rowsHeaderSource=Auto&colwidth=""}}
 +^  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 **
 +
 +{{tablelayout?rowsHeaderSource=Auto&colwidth=""}}
 +^  reg  ^   descr  ^
 +|  AX   | number of written bytes |
 +
 +** CF Set: error **
 +
 +{{tablelayout?rowsHeaderSource=Auto&colwidth=""}}
 +^  reg  ^   descr  ^
 +|  AX   | error code (see (see [[back2root:ibm-pc-ms-dos:hardware:informations:dos_error_code|DOS Error Code]])) |
 +
 +===== Notes & Comments =====
 +
 +<WRAP round box>
 +  * 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
 +</WRAP>
 + 
 +[[start|Back]]