#: 3234 S12/OS9/68000 (OSK)
03-May-90 03:38:23
Sb: #3232-C process control
Fm: Kevin Darling (UG Pres) 76703,4227
To: Joseph W. Cheek 76264,142 (X)
Joe -
Sounds like a feeble excuse; or he's very young and right out of school.
He's talking about the ANSI C "volatile" type. You use it for, say, accessing
an I/O or status port... whose value can change at any time. Example:
volatile char *rs232 = 0xff68;
while (*rs232 & READY_FLAG)
waitawhile;
Declaring it as volatile indicates that the compiler should ALWAYS get the
value from its memory location. The reason for this type is to prevent compiler
optimizations which might keep the original (unchanged) value around.
As far as I can tell, OS9's C compiler never optimizes something like this. And
if your friend thinks for just a minute, he'd realize that since OS9 has been
used for control for over a decade now, then perhaps things must have worked
out okay, eh? .
Run over to the MW display area (go MSC) and check out the latest Pipelines
newsletter... with the large section about OS9 control usage in England. Print
it out for him. Might interest him a bit. best - kev
|