[comp.sys.mac] How to recover from a Mac crash

dave@lsuc.on.ca (David Sherman) (01/09/90)

This may have been on the net before (my reading of these
newsgroups is spotty), and I'm sure it's documented somewhere,
but here goes anyway.  Someone may find this useful.

Suppose your Mac hangs, for whatever reason (bugs in
software, they've been known to happen).  You want to
restart, but you'd love to save your work first, from some
application other than the one which crashed.  (Ain't MultiFinder
wonderful?)

Press the programmer's button, if you have it installed, and type
	G 409B24
and press return.  This gets you back to the Finder.  You can
then save your work and restart.  (If you don't restart, weird
things happen.)

I was first told this trick a couple of years ago and used it on
a Mac Plus, and I do it now on a IIci, so I guess it's pretty generic.

David Sherman
Toronto
-- 
Moderator, mail.yiddish
{ uunet!attcan  att  utzoo }!lsuc!dave          dave@lsuc.on.ca

levin@bbn.com (Joel B Levin) (01/09/90)

In article <1990Jan9.021328.18712@lsuc.on.ca> dave@lsuc.on.ca (David Sherman) writes:

No, no, no!  Two problems here!


|Suppose your Mac hangs, for whatever reason (bugs in
|software, they've been known to happen).  You want to
|restart, but you'd love to save your work first, from some
|application other than the one which crashed.  (Ain't MultiFinder
|wonderful?)

The method here quit the current application.  It WILL NOT save your
work, close your files, or anything like that.  Unfortunately, it is
possible under MultiFinder that the current application at the time
you press the button is not the one you want to quit from.

Under Uni-Finder this will get you back to the Finder, but it won't
allow you to save your work.

|Press the programmer's button, if you have it installed, and type
|	G 409B24
|and press return.  This gets you back to the Finder.  

NO!  This works on the SE only (possibly by coincidence on other
machines).  You are telling the Mac to restart at the absolute
location in ROM of the _ExitToShell OS routine.  The location in other
models' ROMs is not the same.  (I KNOW it is different on the Plus.)
The results could be disastrous on other models.

If you must try something like this, try typing these two lines after
pressing the button:

   SM 0 A9F4
   G 0

|then save your work and restart.  (If you don't restart, weird
|things happen.)

Since this effectively quits the application, you will not be able to
save your work in that application.  And yes, restarting is a good
idea.

=
Nets: levin@bbn.com  |  "There were sweetheart roses on Yancey Wilmerding's
 or {...}!bbn!levin  |  bureau that morning.  Wide-eyed and distraught, she
POTS: (617)873-3463  |  stood with all her faculties rooted to the floor."

phillips@nrl-cmf.UUCP (Lee Phillips) (01/10/90)

[...]
>models' ROMs is not the same.  (I KNOW it is different on the Plus.)
>The results could be disastrous on other models.

On the Plus type G 4of6d8.

russ@key.COM (Russell Donnan) (01/11/90)

In article <59@nrl-cmf.UUCP> phillips@cmsun.UUCP (Lee Phillips) writes:
>[...]
>>models' ROMs is not the same.  (I KNOW it is different on the Plus.)
>>The results could be disastrous on other models.
>
>On the Plus type G 4of6d8.

That's not the point!!!!  What the previous poster (name unfortunately lost)
was trying to point out is that digging out the specific place in the ROMs
for all of the different MACs and ROM versions is pointless, frustrating,
and potentially dangerous.  If the cirumstances permit you to run the
finder, this will work on every Macintosh:

	SM 0 A9F4
	G 0

This uses the jump table and allows the ExitToShell routine to be relocated,
ala Mac ROM style!

Cheers!
-Russ
-- 
Russ Donnan  (415) 623-2121
Amdahl Corporation, Key Computer Laboratories, Fremont, CA, USA
russ@key.amdahl.com, ...!{pacbell,sgi,amdahl}!key!russ
-To capture the essence of an opinion takes but one lawyer.

urlichs@smurf.ira.uka.de (01/12/90)

In comp.sys.mac.hypercard phillips@cmsun.UUCP (Lee Phillips) writes:
< [...]
< >models' ROMs is not the same.  (I KNOW it is different on the Plus.)
< >The results could be disastrous on other models.
< 
< On the Plus type G 4of6d8.

Please don't.
On _all_ Macs, type
SM 0 A9F0
G 0

(A9F0 is the ExitToShell trap.)

If that doesn't work, you can try
SM 0 FFFF
G 0

(Actually you should use the instruction number for the unimplemented
instruction instead of FFFF, but I can never remember that one. FFFF works on
all Macs, but that might possibly change)
which will put up a System Error box you can restart from. This has the
advantage that your hard disk is unmounted cleanly, which (if it works) saves
you from a session with Disk First Aid.

Hint: If you ever have to hit the Reset button, pop in you Locked Unmodified
System Disk(TM) (unmodified, that is, except that Set Startup is on
Finder-Only, with Disk First Aid as startup program, and something like
GateKeeper and/or GateKeeper Aid should be in its System Folder) and check
your hard disks. Most of the time it will be unnecessary, but you never know...

Further hint: If A9F0 does in fact work, do a _Save_As_ (not a Save!) on all
your work (if you're running MultiFinder) and then restart your Mac
immediately. Then check that those documents are still OK.
See last line of previous paragraph...
-- 
Matthias Urlichs

noah@Apple.COM (Noah Price) (01/12/90)

In article <1374@smurf.ira.uka.de> urlichs@smurf.ira.uka.de (Matthias Urlichs) writes:
>
>Please don't.
>On _all_ Macs, type
>SM 0 A9F0
	  ^^^^--no, that's A9F4
>G 0

A9F0 is LoadSeg... you don't want that.  A9F4 is the ExitToShell trap.

noah

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
noah@apple.com                                    Mac IIci Hardware Design Team
...!{sun,decwrl}!apple!noah                                Apple Computer, Inc.

urlichs@smurf.ira.uka.de (01/14/90)

In comp.sys.mac.hypercard noah@Apple.COM (Noah Price) writes:
< 
< In article <1374@smurf.ira.uka.de> I write:
< >
< >Please don't.
< >On _all_ Macs, type
< >SM 0 A9F0
< 	  ^^^^--no, that's A9F4
< >G 0
< 
< A9F0 is LoadSeg... you don't want that.  A9F4 is the ExitToShell trap.
< 
Thanks for the correction. I thought something looked wrong up there, but I
was running A/UX at the time and couldn't simply ask MacsBug about it.

Something can be learned from this error. It's probably the fact that under
MacsBug, you type "ES" or "g ExitToShell" and don't have to bother with all
these silly numbers.  ;-)

And yes, I know of a few people who, upon observing that "G <magic-number>"
doesn't ever work on their Mac, then come to me, shouting that their Mac must
be severely faulty, and pointing at the latest magazine article where said
magic number was prominently printed.
Of course, I don't tell those people about A9F4, but I dig out their Mac
manual and show them the page upon which is printed, in effect, that the
Programmer's Switch is only provided for people who know exactly what they're
doing. Then I point out some of the more obvious errors in said magazine
article. _Then_ I tell them about A9F4. ;-)
Pity that this technique won't work with the newer Macs -- they have the
interrupt and reset buttons installed permanently...
-- 
Matthias Urlichs