INT 12H: Conventional Memory Size
Expects: none (just execute INT 12H)
Returns: AX conventional▲ memory size, in Kbytes
Info: This returns the amount of RAM in the conventional memory area.
This is not particularly useful. On most computers it always
returns 0280H (640 decimal). This is the same as the value found
at 0040:0013 in the BIOS Data Area.
It does not include expanded▲ memory or extended▲ memory above
1 MB. See EMM Functions, XMS Functions and INT 15H for ways to
obtain that information.
On PCs, this value is taken from the switch settings. PCjrs,
XTs, and most clones perform a memory scan during the POST to
determine how much memory is installed. The AT reads its
CMOS Memory to determine the amount of conventional memory, as
determined via a "setup utility".
The PSP: Program Segment Prefix of any program also contains a
memory-size value; accessing PSP:0002 is one way to determine how
much RAM is available for a program to use. (DOS or a control
program way wish to give your program less than the full amount
of RAM). See Program Startup & Exit.
See Also: Memory Control Functions
BIOS Data Area