News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

Displaying Total memory

Started by zak100, January 30, 2010, 01:18:12 PM

Previous topic - Next topic

zak100

Hi,
Dave:
I ran your application and this time I got 524288KB which is equal to 512MB. Thanks for your help. However, I am still trying to understand the code. I am also going to run the application provided by MichealW through the link .
Zulfi.

dedndave

Michael's method is probably better if those functions are supported (and it returns the right result)
if those functions are not supported, you could write the code to fallback on my method

zak100

I got this when I executed the memmap.exe


Memory Map returned by Interrupt 15h Function E820h:

Interrupt 15h Function E820h not supported or not available.

Extended Memory size returned by Interrupt 15h Function 88h = 0 bytes

Extended Memory size from CMOS RAM = 1048576 bytes

Press any normal key to exit...

D:\MASMPR~1\help\APPLIC~1>


What I understood from your writing is that I have to execute your code if MichealW's program doesnt succeed. I am executing your code as an OS and MichealW's program under DOS, so I dont know how to do it?

Zulfi.

dedndave

it's a bit involved, Zulfi
Ralf recommends using:
1) test to see if function EAX = 0E820h is supported, if so use that (Michael's method)
2) if that is not supported, use function AX = 0E802h
3) if that is not supported, use function AX = 0E801h (my method)
4) if that is not supported, use function AH = 88h (Michael's linked code shows how)

each one is quite different, but i would do like Ralf says   :bg
that would ensure that your code works correctly on as many machines as possible
i have some other pressing tasks to deal with at the moment, so i don't have time to play with it
maybe i will get tired of working on my stuff and need a break, though   :P

MichaelW

Zulfi,

How old is your test system, and who was the BIOS vendor (AMI, Award, Phoenix, etc)? I have a system with a Phoenix BIOS dated 04/10/98 that supports Interrupt 15h Function E820h. You should be able to identify the BIOS vendor from the boot screen, and you can get the date from the DEBUG prompt with:

D F000:FFF5
eschew obfuscation

dedndave

i think Ralf said something about that being a Phoenix service to start with
then the others followed suit because windows was using that function
any machine older than that may have issues
i have a couple laying around here that are older   :P

zak100

Hi,
Thanks Dave.
MichealW: I got this through Debug:
D:\>debug
-d F000:fff5
F000:FFF0                 30 36 2F-33 30 2F 30 37 00 FC A2        06/30/07...
-q


and BIOS I saw:
RealTekL8110S/8169S Giga Bit Boot Agent


Its HP DX-2700.
Zulfi.

dedndave

QuoteRealTekL8110S/8169S Giga Bit Boot Agent

that's the bios for your network card   :P

i don't think realtek writes system bios

if you want to see the bios info, you'll have to write a booter for it or run under win 95/98

MichaelW

With a BIOS data of 06/30/07 Interrupt 15h Function E820h should be supported. The reason my app needs to run under DOS is because it uses the DOS display functions.
eschew obfuscation

zak100

Hi,
Thanks. I dont know why its not working in my case. I also need to explore about retrieving BIOS information.

Zulfi.

dedndave

INT 11h, INT 12h, and google "the bios data area" from adress 0040:0000 to 0040:00FF

FORTRANS

Hi,

   Here is another couple of data points using MichaelW's
MEMMAP.

FYI,

Steve N.


- - - [Windows 2000, P-III] - - -

Memory Map returned by Interrupt 15h Function E820h:

Interrupt 15h Function E820h not supported or not available.

Extended Memory size returned by Interrupt 15h Function 88h = 0 bytes

Extended Memory size from CMOS RAM = 1048576 bytes

Press any normal key to exit...


- - -[P-III, MS-DOS] - - -

Memory Map returned by Interrupt 15h Function E820h:

BASE=00000000h LENGTH=0009FC00h (654336)TYPE=AVAILABLE
BASE=0009FC00h LENGTH=00000400h (1024)TYPE=RESERVED
BASE=000F0000h LENGTH=00010000h (65536)TYPE=RESERVED
BASE=FFFF0000h LENGTH=00010000h (65536)TYPE=RESERVED
BASE=00100000h LENGTH=0FEF0000h (267321344)TYPE=AVAILABLE
BASE=0FFF3000h LENGTH=0000D000h (53248)TYPE=ACPI_RECLAIM
------------------------------------------------------------
TOTAL LENGTH          0FFBD000h (268161024)

Extended Memory size returned by Interrupt 15h Function 88h = 0 bytes

Extended Memory size from CMOS RAM = 67043328 bytes

Press any normal key to exit...


- - - [Pentium] - - -

Memory Map returned by Interrupt 15h Function E820h:

BASE=00000000h LENGTH=0009FC00h (654336)TYPE=AVAILABLE
BASE=0009FC00h LENGTH=00000400h (1024)TYPE=RESERVED
BASE=000E0000h LENGTH=00020000h (131072)TYPE=RESERVED
BASE=00100000h LENGTH=02F00000h (49283072)TYPE=AVAILABLE
------------------------------------------------------------
TOTAL LENGTH          02FC0000h (50069504)

Extended Memory size returned by Interrupt 15h Function 88h = 0 bytes

Extended Memory size from CMOS RAM = 49283072 bytes

Press any normal key to exit...

zak100

Hi,
i cant understand the following line:

mov     si,offset AscBuf+LoadSeg+6

Previously in this program and in other programs I have been guided to use LoadOfs but here LoadSeg. And then we are adding 6. Kindly help me with this.

Zulfi.

dedndave

my bad, Zulfi - it should be LoadOfs - i corrected the previous post

as for the +6, i wanted to point to the last word in the string before the termination null byte
when you convert binary to decimal, the digits tend to come out backwards
in this case, we convert 2 digits at a time
so, we extract the last 2 digits first, and the first digits of the ASCII decimal string come out last