home *** CD-ROM | disk | FTP | other *** search
Text File | 1987-05-15 | 1.9 KB | 46 lines | [TEXT/QED1] |
- These are trivial FKEYs which perform the same function
- as ShutDown and Restart from the Finder. The reason for them is so you don't
- have to return to the Finder before rebooting your Mac safely. It
- relies on the new Shutdown manager which was implemented in the Mac II
- and is retrofitted in earlier Macs via system patches in System 4.1.
-
- According to Inside Mac Volume 5 they both will send goodbye kisses
- to all open DAs. I tried this with MockWrite and indeed this worked fine for
- the Restart Fkey. With Shutdown, I found that with an open MockWrite, it
- did get the goodbye kiss and then Shutdown with occurred with the resulting
- dialog but when I hit the Restart button on the dialog (this is on a MacPlus)
- I got a system bomb ID 20. Pressing restart on that bomb box resulted
- in a hung system. I run with a few nonstandard inits so this may not happen
- to you. The Restart FKEY suffered no such problems.
-
- THIS FKEY REQUIRES SYSTEM 4.1 OR LATER TO WORK!!!!! USING EARLIER SYSTEMS
- WILL GENERATE A BOMB BOX WITH ID12.
-
- This is of course FREE and distribution is unlimited. The source code
- is trivial...Apple did all the hard work in the _Shutdown trap.
-
- Here is the source to generate the Restart Fkey. The Shutdown Fkey is merely
- the same code with the MOVE.W #sdRestart,-(SP) changed to
- MOVE.W #sdPowerOff,-(SP).
-
- ---------------- beginning of source ----------
-
- sdPowerOff EQU 1
- sdRestart EQU 2
- .TRAP _ShutDown $A895
-
-
-
- MOVE.W #sdRestart,-(SP) ; push selector on stack
- _ShutDown ; call shutdown trap
- ; RTS ; not really necessary but here it is
-
- --------------- end of source
-
- David Gelphman BITNET address: DAVEG@SLACVM
- Bin #88 SLAC ARPANET address: DAVEG@SLACVM.BITNET
- Stanford, Calif. 94305 UUCP address: ...psuvax1!daveg%slacvm.bitnet
- 415-854-3300 x2538 GEnie: D.Gelphman
- usual disclaimer #432 applies: my employer apologizes for the fact
- that I have access to this net.
-