Subj : Re: Question about memory size finding...? To : borland.public.cpp.borlandcpp From : waking Date : Fri Sep 16 2005 10:45 pm On Tue, 13 Sep 2005 23:29:25 +0500, "mujeebrm" wrote: > int86(16, &inregs, &outregs); > memsize = outregs.x.ax; Why are you using decimal 16 above? That's 0x10 which is the video interrupt. You should be using 0x12 (dec 18) for conventional memory blocks. >how can i modify/convert this program >so that it show full system memory ( base mem + extended mem) in 16 bit >environ That depends on various factors. If you are running under DOS with no XMS or EMS managers loaded, then you can simply use: /* MEMORIES.C - Shows how much conventional and extended RAM is available. * (Excluding extended memory taken by an XMS driver.) * Programmed July 1997 by Wayne A. King for demonstration purposes. */ #include #include int main() { union REGS regs; printf("\nConventional memory = %dK\n", int86(0x12, ®s, ®s)); regs.h.ah = 0x88; int86(0x15, ®s, ®s); printf("Extended memory = %dK\n", regs.x.ax); return 0; } If you have an XMS/EMS manager loaded you have to interrogate it to get the numbers. -- Wayne A. King (waking@idirect.com, Wayne_A_King@compuserve.com) .