[comp.sys.mac.hardware] Using the Programmer's Switch

ingemar@isy.liu.se (Ingemar Ragnemalm) (12/19/90)

aslakson@cs.umn.edu (Brian Aslakson) writes:

>glf@sppy00.UUCP (Hill) writes about the programmer's switch:
>>I know that pushing it gets me the window with a > in the upper left
>>corner and I know that there's SOMETHING I can type there to make the
>>finder or some other application active, but I don't know what that
>>something is.

>>I don't have any debuggers or any such toys, so if it isn't built in,
>>I can't use it (unless I can ftp it).  Anyone have a list of things I
>>can do from this window?

>I'd like to see a list too, but for now I can add this (which I just
>found today):
>	SM 0 A9F4<return>
>	G 0<return>
>Which is supposed to get you back to the app so that you can save before
>restarting.

>Sometimes I can get back to the finder with just:
>	G<return>

>A9F4 is a trap, and G 0 means start executing at memory location 0, I believe.

At MacPlus and SE, I use the A9F4 trick all the time, but why doesn't this
seem to work on a Mac II?

Also, CrashSaver, the nice little INIT that makes the interrupt button
return you to Finder (great emergency exit from home-developed programs!)
doesn't seem to work with MacII. Is there a good substitute?
(I think it is my *right* to kill a process if I want to. If a program
hangs and I know what I'm doing, I don't want to reboot the machine.)

And, isn't it possible to get a programmer's switch for LC or IIsi?
My dealer say it isn't. Can the "Pkey INIT" help me out? (I don't have
access to any LC or IIsi to try it on at the moment.) (In case you didn't
know, Pkey is a nice little INIT that turns the start button in the corner
of the keyboard into an interrupt switch.)


--
Ingemar Ragnemalm
Dept. of Electrical Engineering	     ...!uunet!mcvax!enea!rainier!ingemar
                  ..
University of Linkoping, Sweden	     ingemar@isy.liu.se

dwal@ellis.uchicago.edu (David Walton) (12/20/90)

In article <ingemar.661619127@stuart> ingemar@isy.liu.se (Ingemar Ragnemalm) writes:
>
>At MacPlus and SE, I use the A9F4 trick all the time, but why doesn't this
>seem to work on a Mac II?

Whether the _ExitToShell call (trap A9F4) works depends on what kind
of condition the Macintosh is in following a crash.  If something's
gone off and stomped all over the System heap, it may not work.  I've
been generally successful when using the ROM debugger both to return
to the Finder (Exit To Shell) and to Reboot or Shut down.

>[stuff deleted]
>And, isn't it possible to get a programmer's switch for LC or IIsi?
>My dealer say it isn't. Can the "Pkey INIT" help me out? (I don't have
>access to any LC or IIsi to try it on at the moment.) (In case you didn't
>know, Pkey is a nice little INIT that turns the start button in the corner
>of the keyboard into an interrupt switch.)

Your dealer is correct: there's not programmer's switch.  On these
models, the start button is the programmer's switch, in combination
with a set of modifier keys: Command-Control-Power restarts the
machine, and Command-Power generates a non-maskable interrupt.  I
believe that Macsbug version 6.2b1 minimum must be installed for the
NMI to be generated.  Some INITs, I think (perhaps Programmer's Key)
will let you map these sequences to a different combination.

>Ingemar Ragnemalm




--
David Walton            Internet: dwal@midway.uchicago.edu
University of Chicago   {  Any opinions found herein are mine, not  }
Computing Organizations {  those of my employers (or anybody else). }

jimb@silvlis.com (Jim Budler) (12/23/90)

In article <ingemar.661619127@stuart> ingemar@isy.liu.se (Ingemar Ragnemalm) writes:
>Also, CrashSaver, the nice little INIT that makes the interrupt button
>return you to Finder (great emergency exit from home-developed programs!)
>doesn't seem to work with MacII. Is there a good substitute?

I have acquired something called Bomb Shelter, which seems to have the
same function. It works on my MacIIsi, but I don't use it anymore, since
I have a debugger. It was written by Andrew Welch.

>And, isn't it possible to get a programmer's switch for LC or IIsi?
>My dealer say it isn't. Can the "Pkey INIT" help me out? (I don't have
>access to any LC or IIsi to try it on at the moment.) (In case you didn't
>know, Pkey is a nice little INIT that turns the start button in the corner
>of the keyboard into an interrupt switch.)

Two options. Beg borrow or steal a copy of Macsbug 6.2b1 or newer. I have
been advised not to mail it to people. It's on AppleLink, so any dealer
can get it. Whether they will or not is another story.

The other option is ProgrammersKEY. I believe it is a newer version of
the PKey you mentioned. It does work on a MacIIsi.

I will send ProgrammersKEY and/or Bomb Shelter by mail, if requested.
I also have the Think C source for Bomb Shelter as a seperate package
I will send on request.

>
>Ingemar Ragnemalm
>Dept. of Electrical Engineering
>University of Linkoping, Sweden	     ingemar@isy.liu.se

jim
--
     __           __
     /  o         /      Jim Budler      jimb@silvlis.com      |  Proud
    /  /  /\/\   /__    Silvar-Lisco, Inc.  +1.408.991.6115    | MacIIsi
/__/  /  /   /  /__/   703 E. Evelyn Ave. Sunnyvale, Ca. 94086 |  owner