Category : C++ Source Code
Archive   : VCCRT2.ZIP
Filename : B_MEMSIZ.ASM

 
Output of file : B_MEMSIZ.ASM contained in archive : VCCRT2.ZIP
page ,132
title b_memsiz
;***
;b_memsiz.asm - contains the _bios_memsize() function
;
; Copyright (c) 1987-1992, Microsoft Corporation. All rights reserved.
;
;Purpose:
; This module contains the _bios_memsize() function.
;
;*******************************************************************************

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

sBegin code

assumes cs,code

page
;***
;unsigned _bios_memsize() - return the total amount of memory in the system
;
;Purpose:
; The function "_bios_memsize" returns the total amount of memory
; installed on this machine, in kilobytes. 640 means 640 KB.
;
;Entry:
;
;Exit:
; AX = number of kilobytes of memory in the system
;
;Uses:
;
;Exceptions:
;
;*******************************************************************************

cProc _bios_memsize,,<>

ifdef _WINDOWS
cBegin
else
cBegin
endif


int 12H ; get memory size in AX


ifdef _WINDOWS
cEnd
else
ret
cEnd
endif


sEnd

end


  3 Responses to “Category : C++ Source Code
Archive   : VCCRT2.ZIP
Filename : B_MEMSIZ.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/