Article View: comp.os.msdos.programmer
Article #7549How to get real memory size
From: Esmail Bonakdarian
Date: Fri, 08 Jan 1993 22:31
Date: Fri, 08 Jan 1993 22:31
31 lines
1551 bytes
1551 bytes
I am trying to write my own sysinfo utility, and I am having difficulty
determining the physical amount of memory present. I can use biosequip()
to get the amount of base memory (and number of serial and parallel ports,
whether the mathco is present or not), but I am not able to determine the
amount of extended memory when I have QEMM installed.
Is there a way to determine the total amount of physical memory (i.e., 4MB, 8MB
etc) installed on the system regardless of the memory manager and whether the
memory is configured to be used as expanded or extended?
Also, while I'm asking, where is the BIOS manufacturer signature located?
I am able to get the BIOS date, but not id the maker (e.g. AMI, Phoenix, etc).
Esmail
PS: I'm using TC++ v1.01 with MS-DOS 5.0
----------------------------------------
#include <stdio.h>
#include <dos.h>
void main(void)
{ int ext_mem_size = 0;
union REGS regs;
regs.h.ah = 0x88;
int86(0x15, ®s, ®s);
ext_mem_size = regs.x.ax;
printf(" Extended memory : %d K-bytes\n", ext_mem_size);
}
Technical Details
Message-ID:
<1993Jan8.223109.5835@news.uiowa.edu>Path:
arc1-ca.pugleaf.net!sparky!uunet!news.uiowa.edu!herky.cs.uiowa.edu!bonakShow Full Headers
Complete Article Headers
Newsgroups: comp.os.msdos.programmer Path: arc1-ca.pugleaf.net!sparky!uunet!news.uiowa.edu!herky.cs.uiowa.edu!bonak From: bonak@herky.cs.uiowa.edu (Esmail Bonakdarian) Subject: How to get real memory size Message-ID: <1993Jan8.223109.5835@news.uiowa.edu> Sender: news@news.uiowa.edu (News) Date: Fri, 8 Jan 1993 22:31:09 GMT Reply-To: bonak@herky.cs.uiowa.edu (Esmail Bonakdarian) Nntp-Posting-Host: herky.cs.uiowa.edu Organization: U of Iowa, Iowa City, IA Lines: 31