OT: This Swift thing
Roy Smith
roy at panix.com
Sat Jun 7 15:11:30 EDT 2014
In article <mailman.10857.1402167635.18130.python-list at python.org>,
Michael Torrie <torriem at gmail.com> wrote:
> On 06/07/2014 12:11 PM, Roy Smith wrote:
> > Several language constructs in C are there specifically to diddle bits
> > in hardware. Bit fields were in the earliest implementations of the
> > language to allow you to address individual bit control and status bits
> > in memory-mapped device controllers. The volatile keyword is there to
> > deal with bits which change value on their own (as hardware status
> > registers do).
> >
> > And, why do you need a library routine to touch a memory location, when
> > you can just dereference an integer? :-)
>
> Which of course, technically, Pascal has too.
>
> But memory addressing is only half the story. You still need interrupts
> and ioctl access, both of which happen via assembly instructions that
> libc exposes via a standard C subroutine interface.
Well, on a machine where all I/O is memory mapped, it's really 3/4 of
the story, but I get your point.
More information about the Python-list
mailing list