www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2000/10/04/19:45:22

From: "Tony B." <tonybrewer AT bigDELETEfoot DOT com>
Newsgroups: comp.os.msdos.djgpp,comp.os.msdos.programmer
Subject: Re: get the amount of physical memory
Date: Wed, 4 Oct 2000 23:44:51 +0100
Organization: Customer of Energis Squared
Lines: 28
Message-ID: <8rgem6$3nv$1@news5.svr.pol.co.uk>
References: <8rcc9m$fsr AT news DOT or DOT intel DOT com>
NNTP-Posting-Host: modem-105.leopard-shark.dialup.pol.co.uk
X-Trace: news5.svr.pol.co.uk 970702342 3839 62.137.37.233 (4 Oct 2000 23:32:22 GMT)
NNTP-Posting-Date: 4 Oct 2000 23:32:22 GMT
X-Complaints-To: abuse AT theplanet DOT net
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.50.4133.2400
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

"Haim Cohen" <haim DOT cohen AT ntel DOT com> wrote in message
news:8rcc9m$fsr AT news DOT or DOT intel DOT com...
> Hi !
> Is someone know how to get the size of the available memory in the system
by
> C/C++ standard routines or assembly commands ?
> I mean the physical available memory, the size that the BIOS detects on
> system boot.
>
> thanks.

To get extended memory size, set ds:si to point to a buffer somewhere (at
least 26h bytes long) and call int 15h, function c7h, e.g.

;Debug test code
;assumes ds ok
mov si,200
mov ah,c7
int 15

Double word at 202 = number of 1k blocks from 1MB - 16MB
Double word at 206 = number of 1k blocks above 16MB

(This works on my PC, but might not on yours.)

Tony B.


- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019