home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / comp / os / msdos / programm / 11934 < prev    next >
Encoding:
Text File  |  1993-01-08  |  1.5 KB  |  44 lines

  1. Newsgroups: comp.os.msdos.programmer
  2. Path: sparky!uunet!news.uiowa.edu!herky.cs.uiowa.edu!bonak
  3. From: bonak@herky.cs.uiowa.edu (Esmail Bonakdarian)
  4. Subject: How to get real memory size
  5. Message-ID: <1993Jan8.223109.5835@news.uiowa.edu>
  6. Sender: news@news.uiowa.edu (News)
  7. Date: Fri, 8 Jan 1993 22:31:09 GMT
  8. Reply-To: bonak@herky.cs.uiowa.edu (Esmail Bonakdarian)
  9. Nntp-Posting-Host: herky.cs.uiowa.edu
  10. Organization: U of Iowa, Iowa City, IA
  11. Lines: 31
  12.  
  13. I am trying to write my own sysinfo utility, and I am having difficulty
  14. determining the physical amount of memory present. I can use biosequip()
  15. to get the amount of base memory (and number of serial and parallel ports,
  16. whether the mathco is present or not), but I am not able to determine the
  17. amount of extended memory when I have QEMM installed.
  18.  
  19. Is there a way to determine the total amount of physical memory (i.e., 4MB, 8MB
  20. etc) installed on the system regardless of the memory manager and whether the 
  21. memory is configured to be used as expanded or extended?
  22.  
  23. Also, while I'm asking, where is the BIOS manufacturer signature located?
  24. I am able to get the BIOS date, but not id the maker (e.g. AMI, Phoenix, etc).
  25.  
  26. Esmail
  27.  
  28. PS: I'm using TC++ v1.01 with MS-DOS 5.0
  29. ----------------------------------------
  30. #include <stdio.h>
  31. #include <dos.h>
  32.  
  33. void main(void)
  34. { int ext_mem_size = 0;
  35.   union REGS regs;
  36.  
  37.   regs.h.ah = 0x88;
  38.  
  39.   int86(0x15, ®s, ®s);
  40.   ext_mem_size = regs.x.ax;
  41.  
  42.   printf("    Extended memory          : %d K-bytes\n", ext_mem_size);
  43. }
  44.