This article is from the Mac Programming FAQ, by Jon Watte firstname.lastname@example.org with numerous contributions by others.
1) The Quadras 900 and 950 have special processors that handle the serial
ports; if you write directly to the serial chips, you will crash (this
goes for the IIfx as well)
2) The Quadras have 68040 processors, as have the Centrises. These
processors have separate instruction and data caches (like the 68030) but
they are larger (4K each) and unlike the 68030 which is write-through
data cached, the 68040 is copy-back data cached. This means that changes
you make to "your code" aren't really changed all the time, since the
changes may still be in the data cache and not written to memory when the
CPU reads that part of memory into its I-cache. Even worse; that part
might already have been read into the I-cache before you change it in the
D-cache, meaning that writing out the D-cache will still not be enough.
You need to flush both the caches when writing self-modifying code.
Self-modifying code includes code that builds its own jump tables and
code that decrypts itself and code that "stubs" MDEFs or WDEFs to jump
back into the application code.
You flush the cache using FlushDataCache() which is implemented if
Gestalt says you have a 68020 or better processor (or if the _HwDispatch
trap is implemented)
The current PowerMac 68k emulator doesn't have the self-modifying cache
problem, but a future faster version will.