Export to GitHub

grub4dos-chenall - issue #77

How to get size of available memory into a variable


Posted on Feb 11, 2012 by Happy Kangaroo

What steps will reproduce the problem? 1. displaymem displays available memory as text - but how to get this in a variable like %MEM% ??? 2. 3.

What is the expected output? What do you see instead?

What version of the product are you using? On what operating system?

Please provide any additional information below.

Comment #1

Posted on Feb 11, 2012 by Happy Kangaroo

solved with

/bios int=0x15 eax=0x0000e801 > (md)0x300+1 && cat --skip=24 --length=4 (md)0x300+1 | set n= set /a MEMSIZE=0x%n%/16+16

Comment #2

Posted on Feb 12, 2012 by Happy Hippo

0000:8298 4 (DWORD) saved_mem_upper (extended memory size in KB)

set /a MEMSIZE=*0x8298&0xffffffff>>10+1

Comment #3

Posted on Feb 12, 2012 by Happy Hippo

(No comment was entered for this change.)

Status: Done

Labels:
Type-Defect Priority-Medium