Science Fair Project Encyclopedia
The Macintosh Toolbox was a set of resources, drivers, routines and APIs stored in the ROM of "Old World ROM" Apple Macintosh computers. The term Toolbox originally applied only to the set of subroutines (or functions) and global variables that implemented the user interface (hence Apple's references to the User Interface Toolbox), and not the operating system proper. Though conceptually different, the architecture of the software did not distinguish or enforce a clear separation between Toolbox and operating system functions.
When the original Macintosh 128K was designed, ROM was faster than RAM, and RAM was expensive, so a large part (though not all) of the Macintosh's operating system was implemented in ROM, so that common routines (such as libraries, graphics routines, etc) did not need to be loaded from an operating system file at all. The part of the operating system loaded from disk (including the Macintosh Finder) was named the Macintosh System Software, later renamed Mac OS and now usually referred to as "Classic Mac OS."
The trap mechanism of the Motorola 68000 microprocessor was used to dispatch Toolbox system calls to the appropriate subroutines in ROM. This mechanism also allowed software patches to the (unalterable) code in ROM: any requests for a resource were "trapped" and rerouted through a jump table to the updated version in RAM.
With the release of the iMac, the first "New World ROM" Mac, the Toolbox ROM disappeared as hardware, instead re-implemented as a ROM file on the hard disk. The Open Firmware boot ROM loaded the ROM file into RAM, at which point the Classic Mac OS startup process continued as usual.
One consequence of this design is that "Old World" Macintoshes cannot boot into an alternative operating system (e.g. MkLinux) directly; the ROM code must boot Mac OS before it can be patched, necessitating the inclusion of a Macintosh disk partition in operating systems installed on these models. Typically a boot loader will start a minimal Mac OS installation, then transfer control of the machine to another operating system kernel.
In Mac OS X, the Toolbox is not used at all, though the Classic environment loads the Toolbox ROM file into its virtual machine. Much of the Toolbox was restructured and implemented as part of Apple's Carbon programming API, allowing programmers familiar with the Toolbox to port their program code more easily to Mac OS X.
The Macintosh Toolbox was originally prototyped and debugged in Pascal, and then rewritten in Motorola 68000 assembly language for speed and to fit within the size constraints of the ROM technology available at the time.
The contents of this article is licensed from www.wikipedia.org under the GNU Free Documentation License. Click here to see the transparent copy and copyright details