www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/04/08/17:15:01

Message-ID: <F554E1189472D21198D000805F654BFE05FA67@ntxchangerend.engr.rendition.com>
From: yjtseng <yjtseng AT micron DOT com>
To: "Salvador Eduardo Tropea (SET)" <salvador AT inti DOT gov DOT ar>, djgpp AT delorie DOT com
Cc: yjtseng AT micron DOT com
Subject: RE: Help needed in getting CR0 under DOS
Date: Thu, 8 Apr 1999 15:14:46 -0600
MIME-Version: 1.0
X-Mailer: Internet Mail Service (5.5.2448.0)
Reply-To: djgpp AT delorie DOT com

Thanks  for the reply.

I don't think it is a privileged instruction based on the following quote
from the Intel Architecture Software Developer's Manual page 2-13: 

		In protected mode, the move-to-or-from-control-registers
forms of the MOV instruction allow
		the control registers to be read (at any privilege level) or
loaded (at privilege level 0 only). This
		restriction means that application programs (running at
privilege levels 1, 2, or 3) are prevented
		from loading the control registers; however, application
programs can read these registers.

I don't know that the inline code is in protected mode or real mode when it
is executed? As to (2), maybe you are right but is there anyway to verify
it? As to (3), yes, I use normal cwsdpmi.exe. Any document that I can access
to see the difference between CWSDPR0 under DOS and CWSDPMI and how can I
invoke it? Thanks.

	-----Original Message-----
	From:	Salvador Eduardo Tropea (SET) [SMTP:salvador AT inti DOT gov DOT ar]
	Sent:	April 08, 1999 10:18 AM
	To:	yjtseng; djgpp AT delorie DOT com
	Subject:	Re: Help needed in getting CR0 under DOS

	yjtseng <yjtseng AT micron DOT com> wrote:

	> I wrote inline assembly code to access the control register CR0
and
	> compiled it 
	> under djgpp. It ran O.k. in window DOS but gave me general
protection fault
	> under  pure DOS environment. 

	1) Isn't it a privileged instruction?
	2) Are you sure it succed under Windows, or is just that it didn't
complain?
	3) Did you tried with CWSDPR0 under DOS or with other DPMI host? I
guess you 
	used the normal CWSDPMI and (1) is true so then the crash is logic.

	SET
	------------------------------------ 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