I sometimes see statements that on some platforms the following C or C++ code:
int* ptr; *ptr = 0;
can result in writing to a hardware input-ou
See Embedded-Systems for examples of devices that use Memory-mapped I/O e.g. routers,adsl-modems, microcontroller etc.