home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Carousel
/
CAROUSEL.cdr
/
mactosh
/
code
/
asm_cras.sit
< prev
next >
Wrap
Text File
|
1988-05-14
|
2KB
|
72 lines
11-May-88 21:21:35-MDT,2481;000000000000
Return-Path: <u-lchoqu%sunset@cs.utah.edu>
Received: from cs.utah.edu by SIMTEL20.ARPA with TCP; Wed, 11 May 88 21:21:29 MDT
Received: by cs.utah.edu (5.54/utah-2.0-cs)
id AA03235; Wed, 11 May 88 21:22:04 MDT
Received: by sunset.utah.edu (5.54/utah-2.0-leaf)
id AA29210; Wed, 11 May 88 21:22:01 MDT
Date: Wed, 11 May 88 21:22:01 MDT
From: u-lchoqu%sunset@cs.utah.edu (Lee Choquette)
Message-Id: <8805120322.AA29210@sunset.utah.edu>
To: rthum@simtel20.arpa
Subject: CrashSaver.asm
; Crash Saver
; (c) 1985 by DailSoft
; You may distriJHJHASDKFHSLFHALHHFAthers as long as orginal credit is
; givin to Macazine. Also, you must include the entire contents the
; folders labeled "Crash Saver" and "Ordering" from this issue.
; Macazine can be ordered from:
; DailSoft
; P.O. Box 2861
; Newport News, VA 23602
; The cost of Macazine is $15.95/issue or $60.00/year (6 issues).
; This program is designed to allow for a return to the Finder when a
; system error occurs. By pressing the Interrupt button (not the Reset
; button) on the programmers switch during a system error, an
; ExitToShell trap will be executed. This will return you to the
; Finder (or to the Switcher). One reason for doing this is to preserve
; your RamDisk.
; Warning, this method will usually work, but in some cases, ExitToShell
; will produced a repeated System Error.
; This application should be made your startup application.
; Note: By modifying the interrupt vectors, MacsBug will not work when this
; utility has been installed.
Include MacTraps.D ; Use System and ToolBox traps
autoInt4 EQU $70
autoInt5 EQU $74
autoInt6 EQU $78
autoInt7 EQU $7C
Install
; Allocate space on the system heap for the crash saver.
MOVE.L #(Exit-CrashSaver),D0 ; Length of block.
_NewPtr ,SYS ; Allocate in system heap.
; Make interrupt vectors point to crash saver.
MOVE.L A0,autoInt4
MOVE.L A0,autoInt5
MOVE.L A0,autoInt6
MOVE.L A0,autoInt7
; Copy local copy of crash saver to the system heap.
MOVE.L A0,A1 ; A1 points to destination.
LEA CrashSaver,A0 ; A0 points to source.
MOVE.L #(Exit-CrashSaver),D0 ; D0 is length of copy.
_BlockMove ; Execute move.
RTS ; Return to the Finder.
CrashSaver
AND #$F8FF,(SP) ; Force all interupts to be enabled.
; set return to ExitToShell call.
LEA ETS,A0
MOVE.L A0,2(SP)
RTE
ETS
NOP ; Make sure interrupt button is released before exit
_ExitToShell
Exit
END