Category : C++ Source Code
Archive   : VCCRT1.ZIP
Filename : FMSIZE.ASM

 
Output of file : FMSIZE.ASM contained in archive : VCCRT1.ZIP
page ,132
title fmsize - C runtime far heap size
;***
;fmsize.asm - far heap size
;
; Copyright (c) 1985-1992, Microsoft Corporation. All rights reserved.
;
;Purpose:
; defines _fmsize() - far heap memory block size
;
;*******************************************************************************

include version.inc
.xlist
include cmacros.inc
.list


sBegin code
assumes ds,data
assumes cs,code

page
;***
;unsigned _fmsize(address) - return far heap memory block size
;
;Purpose:
; Returns the size in bytes of a memory block in the far heap
; allocated by _fmalloc().
;
;Entry:
; far *address - ptr to memory block
;
;Exit:
; returns size in bytes (unsigned)
;
;Uses:
;
;Exceptions:
;
;*******************************************************************************

cProc _fmsize,,<>

parmD address

cBegin

les bx,address
mov ax,es:[bx-2]
and al,not 1 ; make even

cEnd

sEnd code

end


  3 Responses to “Category : C++ Source Code
Archive   : VCCRT1.ZIP
Filename : FMSIZE.ASM

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. 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/