delorie.com/archives/browse.cgi | search |
X-Sybari-Space: | 00000000 00000000 00000000 00000000 |
From: | Martin Stromberg <Martin DOT Stromberg AT epl DOT ericsson DOT se> |
Message-Id: | <200303130749.IAA25231@lws256.lu.erisoft.se> |
Subject: | Re: Getting CRx registers |
To: | djgpp-workers AT delorie DOT com |
Date: | Thu, 13 Mar 2003 08:49:46 +0100 (MET) |
In-Reply-To: | <09e801c2e8ac$6685f830$0600000a@broadpark.no> from "Gisle Vanem" at Mar 12, 2003 04:31:06 PM |
X-Mailer: | ELM [version 2.5 PL3] |
MIME-Version: | 1.0 |
Errors-To: | nobody AT delorie DOT com |
X-Mailing-List: | djgpp-workers AT delorie DOT com |
X-Unsubscribes-To: | listserv AT delorie DOT com |
> Is there a safe way to get the value of the Control Registers > (CR0-4) under CPL > 0?. Under Win-XP "movl %cr4,%eax" seems > to be safe (i.e. doesn't crash), but return value is always 0. Under > plain DOS and CWSDMI it crashes. Not for CR1-CR4. For CR0 you can SMSW to get the lower 16 bits. And, IIRC, DB 66; SMSW to get all! (Undocumented so perhaps it won't work on all CPUs. Unsure if it should be 66 or 67.) I have a little test program for this somewhere if anybody is interested. Right, MartinS
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |