Xref: news2.mv.net comp.os.msdos.djgpp:2475 From: arcanix AT aol DOT com (Arcanix) Newsgroups: comp.os.msdos.djgpp Subject: DPMI hosts Date: 5 Apr 1996 00:17:38 -0500 Organization: America Online, Inc. (1-800-827-6364) Lines: 99 Sender: root AT newsbf02 DOT news DOT aol DOT com Message-ID: <4k2adi$5kt@newsbf02.news.aol.com> Reply-To: arcanix AT aol DOT com (Arcanix) NNTP-Posting-Host: newsbf02.mail.aol.com To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp This isn't too relevant to DJGPP, but I thought some of you might want to hear this anyway. It seems like some DPMI hosts are flawed in unusual ways. I wrote a small program that gives info about the user's computer. Here it is: (Note that some of the code is unused, but was used at some point in the program's histoy). #include #include #include #inlude #include void main(void) { char *string; unsigned char *buff; int computer; __dpmi_version_ret version; /* unsigned char major; unsigned char minor; unsigned short flags; unsigned char cpu; unsigned char master_pic; unsigned char slave_pic; */ printf("Total physical ram remaining: %lu\n", _go32_dpmi_remaining_physical_memory()); printf("Total virtual memory remaining: %lu\n", _go32_dpmi_remaining_virtual_memory()-_go32_dpmi_remaining_physical_memory ()); __dpmi_get_version(&version); printf("You are using DPMI version %u.%u\n", version.major, version.minor); switch(version.cpu) { case (3) : computer=386; break; case (4) : computer=486; break; case (5) : computer=586; break; } printf("Your CPU is a %d\n", computer); switch(_go32_info_block.run_mode) { case (_GO32_RUN_MODE_XMS) : string="XMS"; break; case (_GO32_RUN_MODE_VCPI) : string="VCPI"; break; case (_GO32_RUN_MODE_DPMI) : string="DPMI"; break; case (_GO32_RUN_MODE_RAW) : string="raw"; break; } printf("Run mode is: %s", string); } I then ran this program in under different DPMI hosts. The first was CWSDPMI. The second was borland's 32rtm extender (in resident mode, I got it from the Doom Construction Kit v. 3.2 zipfile),and the last was windows 3.1. Strangely enough, the only host to return valid information was CWSDPMI. Both of the other ones had serious mistakes. Anyway, here is the info that I got: Field 1: Physical mem remaining. Field 2: Virtual mem remaining (without physical, so it should be = to HD space remaining) Field 3: DPMI version Field 4: Type of CPU Field 5: What type of host is managing memory (should always be DPMI?) I have a Pentium Overdrive 83 with 8MB RAM (lots of TSR's) and 19 MB HD space remaining, with DPMI version 0.9 CWSDPMI: 1: 4,771,840 2: 19,271,680 3: 0.90 4: 586 5: DPMI (All readings are correct) 32rtm: 1: 3,563,520 (Must be a HUGE ram hog) 2: 4,294,926,336 (!!!!!!!!) 3: 0.90 4: 486 (Wrong) 5: DPMI Win 3.1: 1: 954,368 (As we know, windows is a massive ram eater) 2: 31,113,216 (I am running a 5MB swap file, so this number is exactly twice as big as the correct amount of virtual memory) 3: 0.90 4: 486 (wrong) 5: DPMI /-|rcanix