Assembly Language Help (alang.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.
CloseFile
 Map                                       Up Contents Index Back
────────────────────────────────────────────────────────────────────────────
 
;* CloseFile - Closes an open file, specified by handle. See the CopyFile
;* procedure for another example of using DOS Function 3Eh to close files.
;*
;* Shows:   DOS Function - 3EH (Close File)
;*
;* Params:  Handle - File handle
;*
;* Return:  None
 
CloseFile PROC,
        Handle:WORD
 
        mov     bx, Handle              ; BX = file handle
        mov     ah, 3Eh                 ; DOS Function 3Eh
        int     21h                     ; Close file
        ret
 
CloseFile ENDP
                                    -♦-