www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/04/13/11:08:04

Message-Id: <m10X4mC-000S8gC@inti.gov.ar>
Comments: Authenticated sender is <salvador AT natacha DOT inti DOT gov DOT ar>
From: "Salvador Eduardo Tropea (SET)" <salvador AT inti DOT gov DOT ar>
Organization: INTI
To: yjtseng <yjtseng AT micron DOT com>, djgpp AT delorie DOT com
Date: Tue, 13 Apr 1999 12:11:25 +0000
MIME-Version: 1.0
Subject: Re: cwsdpr0.exe
In-reply-to: <F554E1189472D21198D000805F654BFE05FA8D@ntxchangerend.engr.rendition.com>
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

yjtseng <yjtseng AT micron DOT com> 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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019