Macintosh: How To Call ExitToShell Trap from ROM Debugger (9/94)

What is the A ("ExitToShell") trap or address to call for "Resume OS" from the ROM debugger on a Macintosh?

This article has been archived and is no longer updated by Apple.
The most efficient way to call the "ExitToShell" trap with any Macintosh with the ROM debugger is documented below. To use this method, the interrupt switch must first be depressed to generate the debugger window.

At the ">" ROM debugger prompt, type the following lines, pressing Return after each:

SM 0 A9F4
G 0

In the first line, the "SM" stands for "Set Memory", the "0" signifies memory location "0", and the "A9F4" is the trap number for the "ExitToShell" trap. This line puts "A9F4" at memory location "0". In the second line, the "G" stands for "Go" and the "0" stands for memory location "0". This line tells the computer to execute the instructions starting at memory location "0". Since "A9F4" is at memory location "0", the "ExitToShell" trap is executed.

Barring other memory corruption, your Macintosh should exit back to the Finder. It is recommended that all other work in progress be saved and that the machine be restarted to completely clear and reset memory.

Article Change History:
06 Sep 1994 - Reviewed for technical accuracy, removed reference to specific
Macintosh models.

Support Information Services
Published Date: Feb 18, 2012