Category : OS/2 Files
Archive   : MEMAVL.ZIP
Filename : MEMAVAIL.C

 
Output of file : MEMAVAIL.C contained in archive : MEMAVL.ZIP
/* 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
#include

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;
}





  3 Responses to “Category : OS/2 Files
Archive   : MEMAVL.ZIP
Filename : MEMAVAIL.C

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/