[Info-vax] LLVM, volatile and async VMS I/O and system calls
Dave Froble
davef at tsoft-inc.com
Fri Sep 24 19:06:42 EDT 2021
On 9/24/2021 6:16 PM, chris wrote:
> On 09/22/21 20:58, Bob Gezelter wrote:
>> On Wednesday, September 22, 2021 at 2:11:40 PM UTC-4, Simon Clubley
>> wrote:
> orld.
>>>
>>> There's a reason why volatile is used so liberally in embedded
>>> bare-metal
>>> programming. :-)
>>>
>>> Simon.
>
> Primarily because embedded spends a lot of time accessing hardware
> registers directly, for example:
>
> volatile unsigned char *ttyport = (volatile unsigned char*) TTY_PORT
>
> which assigns a numerc value to the pointer and tells the compiler
> not to optimise it away, nor change the value.
>
> Something application level code should rarely, if ever, see...
Well, now, that sort of depends on your definition of "application
level code", doesn't it?
I sometimes design/write stuff where I consider such issues.
Of course I write it in Basic, not that shitty C stuff. Basic seems to
usually get things right. (Don't tell John I wrote that, he'll hold it
against me when I ask him to fix Basic.)
:-)
--
David Froble Tel: 724-529-0450
Dave Froble Enterprises, Inc. E-Mail: davef at tsoft-inc.com
DFE Ultralights, Inc.
170 Grimplin Road
Vanderbilt, PA 15486
More information about the Info-vax
mailing list