Message-Id: Comments: Authenticated sender is From: "Salvador Eduardo Tropea (SET)" Organization: INTI To: yjtseng , djgpp AT delorie DOT com Date: Tue, 13 Apr 1999 12:11:25 +0000 MIME-Version: 1.0 Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7BIT Subject: Re: cwsdpr0.exe In-reply-to: X-mailer: Pegasus Mail for Windows (v2.54) Reply-To: djgpp AT delorie DOT com X-Mailing-List: djgpp AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk yjtseng asked: > I wrote inline assembly to access CR0. There was general protection fault at > run time. After suggestions given by Salvador Eduardo Tropea and Nate > Eldredge, I tried cwsdpr0.exe and it worked. I was able to access CR0. > > Questions: > > First: > Acording to cwsdpmi.doc, cwsdpr0.exe runs with virtual memory disabled. But, > the value of CR0 that I read is 0x80000011 which means the paging mechanism > is on. Any idea anybody? Paging mechanism isn't virtual memory. If I remmember OK the EMM386 driver uses it in DOS. It allows to remap the memory using pages, of course that's needed for virtula memory but not the reverse. There are a DPMI call to know if VM is available. > Second: > How can I pick cwsdpr0.exe as the DPMI host at compilation instead of using > stubedit my.exe dpmi=cwsdpr0.exe > after the executable is generated? I think there is no easier way, you could tell the linker to use an external stub file, but I think the stubedit step is easier. SET P.S. As you can see that's a priviledged instruction ;-) ------------------------------------ 0 -------------------------------- Visit my home page: http://welcome.to/SetSoft or http://www.geocities.com/SiliconValley/Vista/6552/ Salvador Eduardo Tropea (SET). (Electronics Engineer) Alternative e-mail: set-soft AT usa DOT net set AT computer DOT org ICQ: 2951574 Address: Curapaligue 2124, Caseros, 3 de Febrero Buenos Aires, (1678), ARGENTINA TE: +(5411) 4759 0013