Message-ID: <5BF60CD649EDD411A04600B0D049F53A544465@hydmail02.hyd.wilco-int.com> From: Prashant Ramachandra To: "'djgpp AT delorie DOT com'" Cc: "'Tom St Denis'" Subject: RE: Accessing registers from C Date: Mon, 2 Jul 2001 08:53:21 +0530 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2650.21) Content-Type: text/plain Reply-To: djgpp AT delorie DOT com On Monday, July 02, 2001 2:28 AM, Tom St Denis [SMTP:tomstdenis AT yahoo DOT com] wrote: | | "Jacek K." wrote in message news:9hns3d$4rn$1 | @news.tpi.pl... | > Are there some instructions/macros to access CPU registers? | > Anything other | > than inline assembly, of course. | | No and you shouldn't. And why not? Try this: void foo () { register unsigned long eax __asm__ ("ax"); ... } Everytime you use the variable "eax", you're actually accessing or modifying the eax register itself. -- Prashant TR Web: http://www.midpec.com/ "Those who do not understand Unix are condemned to reinvent it, poorly." -- Henry Spencer