Hacker News new | past | comments | ask | show | jobs | submit login

Classic (Pre Mac OS X) Mac applications were 68k code blobs that lived in the resource fork of an application (The resource fork was basically a type/id database where arbitrary data could be loaded into memory and purged (ore prevented from being purged) when memory was low.)

When the PowerPC transition took place, much of the system remained in emulated 68k. PowerPC applications were typically data fork (regular file) demand paged, but they could also live as resources. The point being, once you got some data in memory, you were able to call it 68k -> PPC or PPC to 68k using something known as the MixedMode Manager.

Since a big part of the way the classic MacOS was designed was to supply function pointer callbacks, there was a tedious phase where you had to wrap any function pointers supplied to the system with a thunk that would perform the ABI translation for you.

You typically wouldn't have to write those yourself - all the toolbox APIs had a macro / inline defined that would create the thunk for you - the legacy of this can still be seen in the vestigial CarbonCore/MixedMode.h and related headers.

Anyway, it was fairly trivial to wind up with code that not only mixed processor architectures and ABIs, but also supported in process loading of third party code (like PowerPC accelerated photoshop plugins, or After Dark screen saver modules.)




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: