Date: Mon, 14 May 2001 12:35:39 +0300 (IDT) From: Eli Zaretskii X-Sender: eliz AT is To: MarKol cc: djgpp AT delorie DOT com Subject: Re: What's wrong?? In-Reply-To: <9do6sp$pri$1@sunrise.pg.gda.pl> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Reply-To: djgpp AT delorie DOT com Errors-To: nobody AT delorie DOT com X-Mailing-List: djgpp AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk On Mon, 14 May 2001, MarKol wrote: > int > main() > { > unsigned int cr0; > // store a copy of CR0 > __asm__ __volatile__ ("movl %%cr0, %%eax":"=a"(cr0)::"eax"); > } > > > main.c: In function `main': > main.c:6: Invalid `asm' statement: > main.c:6: fixed or forbidden register 0 (ax) was spilled for class > AREG. See section 8.17 of the FAQ. Note that CR0 cannot be accessed unless you are in Ring 0 (I think), so your code might GPF at run time.