home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 11 Util
/
11-Util.zip
/
MEMAVL.ZIP
/
MEMAVAIL.C
next >
Wrap
C/C++ Source or Header
|
1992-06-08
|
595b
|
26 lines
/* memavail.c a program to display the amount of RAM available
for OS/2 to use. BIOS int 15h, subfunction 88h is called and
it should return the free mem.
Copyright Tom Stearns, Solutions for Business Computing, 1992
all rights reserved
*/
#include <dos.h>
#include <stdio.h>
main()
{
union REGS inregs, outregs;
unsigned int retval;
inregs.h.ah = 0x88;
retval = int86(0x15,&inregs,&outregs);
printf("\n\nYour BIOS reports %8d 1KB blocks\n (not counting %8d MB\n first MB) %8ld Bytes",retval,retval/1024,retval*1024L);
return 0;
}