China DOS Union

-- Unite DOS · Advance DOS · Grow DOS --

Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
DOS stands for freedom, openness and progress. Let us work hard, learn from the openness and GNU spirit of FreeDOS and Linux, and together build and grow a free GNU GPL world!

中国DOS联盟论坛
The time now is 2026-08-01 19:43
中国DOS联盟论坛 » DOS开发编程 & 发展交流 (开发室) » How to get the total amount of physical memory installed on the current machine View 1,508 Replies 5
Original Poster Posted 2006-04-16 23:31 ·  中国 上海 虹口区 电信
高级用户
★★
Credits 653
Posts 252
Joined 2006-04-16 19:48
20-year member
UID 53939
Status Offline
As the title says, which expert knows

=======================
Solved by myself:

EAX: 0x0000E820
INT 15h

[ Last edited by asbai on 2006-4-17 at 08:55 ]
Floor 2 Posted 2006-04-16 23:41 ·  中国 四川 绵阳 电信
高级用户
★★
Credits 587
Posts 282
Joined 2006-04-10 03:40
20-year member
UID 53599
Gender Male
Status Offline
Oh, the motherboard's power-on self-test will display it. What else do you need to get...
Floor 3 Posted 2006-04-16 23:57 ·  中国 上海 虹口区 电信
高级用户
★★
Credits 653
Posts 252
Joined 2006-04-16 19:48
20-year member
UID 53939
Status Offline
Is this the programming section? Of course it's for programming, heh.

Both assembly and C are okay. The interrupts I found can only check up to 64MB at most. Only the XMS Driver's Query Any Free Extended Memory (Function 88h) seems to be able to retrieve memory larger than 64MB, but it only returns free XMS, and in actual use it always doesn't work (for a machine with 1G memory, the EDX still only returns more than 60MB, don't know why)

[ Last edited by asbai on 2006-4-17 at 00:02 ]
Floor 4 Posted 2006-04-17 23:22 ·  中国 四川 绵阳 电信
高级用户
★★
Credits 587
Posts 282
Joined 2006-04-10 03:40
20-year member
UID 53599
Gender Male
Status Offline
I remember that DOS can only manage up to 64M?
Floor 5 Posted 2006-04-18 02:59 ·  中国 上海 杨浦区 电信
高级用户
★★
Credits 653
Posts 252
Joined 2006-04-16 19:48
20-year member
UID 53939
Status Offline
Originally posted by xuantian at 2006-4-17 23:22:
I remember that DOS can only manage 64M or so


DOS 7.1's built-in HIMEM.SYS supports the XMS 3.0 specification and can manage up to 4GB.

Another thing: int 15h is a BIOS interrupt, not a DOS one, heh
Floor 6 Posted 2006-04-18 15:04 ·  中国 四川 绵阳 电信
高级用户
★★
Credits 587
Posts 282
Joined 2006-04-10 03:40
20-year member
UID 53599
Gender Male
Status Offline
Forum Jump: