Category : C++ Source Code
Archive   : VCCRT2.ZIP
Filename : D_CLOSE.ASM
Output of file : D_CLOSE.ASM contained in archive : VCCRT2.ZIP
title d_close - Close Handle
;***
;d_close.asm - Close handle
;
; Copyright (c) 1987-1992, Microsoft Corporation. All rights reserved.
;
;Purpose:
; Direct interface to DOS "close handle" system call.
;
;*******************************************************************************
include version.inc
.xlist
include cmacros.inc
include msdos.inc
.list
sBegin code
assumes cs,code
assumes ds,data
extrn __dosreturn:near
page
;***
;unsigned _dos_close(handle) - Close handle
;
;Purpose:
; Close a handle: Direct interface to the DOS "close handle" system
; call (int 21h,3Eh).
;
;Entry:
; int handle = handle of file to close
;
;Exit:
; returns:
; 0 = success
; !0 = failure (then returns DOS error code, errno = appropriate
; mapped value)
;Uses:
; AX, BX
;
;Exceptions:
;
;
;*******************************************************************************
cProc _dos_close,
parmW handle
cBegin
;Get the handle and close the file
mov bx,[handle] ;file handle
callos close ;issue the close system call
jmp __dosreturn ;return 0 if successful
cEnd
sEnd
end
Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!
This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.
But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/