Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!cs.utexas.edu!chinacat!sequoia!rpp386!woody From: woody@rpp386.cactus.org (Woodrow Baker) Newsgroups: comp.lang.c Subject: Re: Shouldn't ANSI have provided nonvolatile instead of volatile? Summary: What ansi should or should not have done. Message-ID: <17910@rpp386.cactus.org> Date: 11 Feb 90 06:03:42 GMT References: <1117.18:37:35@stealth.acf.nyu.edu> <1990Feb8.162440.22318@utzoo.uucp> Organization: River Parishes Programming, Plano, TX Lines: 41 In article <1990Feb8.162440.22318@utzoo.uucp>, henry@utzoo.uucp (Henry Spencer) writes: > In article <1117.18:37:35@stealth.acf.nyu.edu> brnstnd@stealth.acf.nyu.edu (Dan Bernstein) writes: > most C compilers have done by default all along (with the result that > elaborate trickery was sometimes needed to get the effect of volatile), > so there is no sudden drop in safety. I wish that there had been more notice, or information as to when the standards meetings were held, or that they had gotten a wider input. They virtually ignored the needs of control programmers. Features that were not adopted, for lack of support, and /or were not brought up: Flexible way to declare a function as an interrupt handler. I like Turbo 'C's modifier of interrupt. It simply brackets the entire function with a push all registers, and restore all registers. The definition of it would be: saves the entire working register set of the machine and restores it on exit. QUADS. I.E. double longs. FIXED i.e. fixed point math. This type would deal with chars,ints, longs and quads. There would be an assumed binary point in the middle of the data. for chars, between the left and right nibbles, for ints, between teh smallest unit of an int. For longs, between the halves, i.e. for 16 bit intergers, between the 2 bytes etc. The operators, + - / * % should work on these, and conversions to unsigned types of the same size, should have no modifications to the values. These would aid control programming a lot. We use 'C' for several projects, including embedded 8051 micro processors. Cheers Woody > -- > SVR4: every feature you ever | Henry Spencer at U of Toronto Zoology > wanted, and plenty you didn't.| uunet!attcan!utzoo!henry henry@zoo.toronto.edu