From: Paul Shirley Newsgroups: comp.os.msdos.djgpp Subject: Re: Register Variable Question? Date: Tue, 17 Dec 1996 01:16:57 +0000 Organization: DrinkSoft Lines: 19 Distribution: world Message-ID: References: <19961215 DOT 150724 DOT 3694 DOT 0 DOT MSnakes AT juno DOT com> <7lld+CAWnbtyEwMN AT talula DOT demon DOT co DOT uk> NNTP-Posting-Host: chocolat.foobar.co.uk MIME-Version: 1.0 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp In article <7lld+CAWnbtyEwMN AT talula DOT demon DOT co DOT uk>, Shawn Hargreaves writes >I very much doubt that global variables can be allocated to registers. >Think what this would mean: no code, anywhere in your program, could use >these registers! Because of the way C compiles each source files as an >individual unit, there is no way that this could be enforced. AFAIK it *is* possible to do this with gcc. It is probably possible with djgpp but I can think of very few programs it would benefit overall. I think one of the gnu Forth interpreters (Tile or GForth) has a compile option to use global register variables. I can't give more details because a Forth system under the LGPL has a few problems for me (so I deleted it). (Forth of course is an ideal use for global registers ;) --- Paul Shirley: shuffle chocolat before foobar for my real email address