Xref: news2.mv.net comp.os.msdos.djgpp:7946 From: Elliott Oti Newsgroups: comp.os.msdos.djgpp Subject: Re: what is dpmi.... Date: Tue, 27 Aug 1996 13:15:11 -0700 Organization: Academic Computer Centre Utrecht, (ACCU) Lines: 48 Message-ID: <3223574F.43AE@stud.warande.ruu.nl> References: <9608271823 DOT AA18073 AT pdv DOT com> NNTP-Posting-Host: warande1078.warande.ruu.nl Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Franklin asked what DPMI was > and what can i use this for...(please correct my grammar if bad) > > regards, Franklin Castillo DPMI = Dos Protected Mode Interface DPMI servers are programs that control a 386/486/586 in protected mode and are responsible for: 1. DOS (low memory) and expanded memory management 2. Management of interrupts (hard and software) 3. Page and LDT management 4. Context switching 5. Debugging. In the good old days,right after 640k was enough for everyone,people started pluggin' extra memory into their PC's, and Intel developed this newfangled workstation chip called the 80286 which had a thing called protected mode. In order to access that extra memory, MS, Intel and Lotus developed the Expanded Memory specification (EMS) to handle expanded memory, and later the Extended Memory Specification (XMS) for extended memory above 1Mb. Out of the two standards,and to cope with this new 286 protected mode thingy , the VCPI and later DPMI standards developed. DPMI and VCPI servers are programs that handle the messy stuff of finding and allocating memory, switching to & from protected mode etc, like Windows (DPMI), CWSDPMI( DPMI), go32 ( VCPI ), Dos4GW ( VCPI) etc. DPMI is a successor to VCPI ( Virtual Control Program Interface ); VCPI servers have control of the system in V86 mode -- this means programs have to beg 'em for memory, and say aye and amen -- but in protected mode the client ( ie the application program) has control & can do essentially what it likes. With DPMI this changes; DPMI servers assign priviledge levels to programs running under them.The DPMI host itself has the highest level and the client runs at a lower priviledge level. The lower the level, the more permission has to be asked of the DPMI host before a program can do something. Clients running at the lowest level not only have to ask politely for memory, they can't issue interrupts, outports, inports, or farts without permission. Or at least they can try, but they won't neccessarily get away with it. Using DPMI directly is a real pain in the arse and should be avoided as much as posible. There are 80+ functions you can call under a DPMI host and so you want to use a DOS extender to ease the pain, or a compiler that shields you from the nasty complexities of DPMI function calls. Which is why I, after hours of numbly & fruitlessly poring thru the DPMI specs in yesteryear, have nothing but profound admiration for C.W Sandman and DJ Delorie who not only understand the stuff, but actually MAKE extenders/DPMI servers that *WORK*. Elliott