home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
No Fragments Archive 10: Diskmags
/
nf_archive_10.iso
/
MAGS
/
STFORMAT
/
STF14.MSA
/
NOBOMBS_NOBOMBS.DOC
< prev
next >
Wrap
Text File
|
1987-04-21
|
4KB
|
111 lines
Program :- NOBOMBS.TOS
----------------------
This program,as the name suggests,stops those all too common
bombs that appear in the middle of the screen,when the machine
crashes.Instead it replaces the most common of these with their
actual error messages,and the number of bombs that would of
appeared.
This program is what is known as a TSR ( Terminate and Stay
Resident.) program.So once run from either the Desktop,the Auto
folder or a Command line,the program stays in memory waiting for
an error to occur.
Once run,the program initialises itself and prints an initial
message to tell you what the program does.To exit from this or one
of the error messages,simply press any key and you will be
returned to the calling program (e.g the DESKTOP.).
Due to the nature of some of the errors that can occur,not
all are intercepted,so that if one of these rare and usually more
fatal errors occur,the program will crash with it's usual thud and
bomb out.These errors would probably interfere with the error
handler and cause a multiple crash.
Current errors handled.
-----------------------
Here is a list of the errors,which the error handler will
intercept:-
+----------+-------------------------------+
| No.Bombs | Message |
+----------+-------------------------------+
| 2 | Bus error. |
| 3 | Address error. |
| 4 | Illegal Instruction. |
| 5 | Division by Zero. |
| 8 | Privilege Violation. |
| 9 | Trace. |
| 12 | Undocumented error. |
| 13 | Undocumented error. |
| 14 | Undocumented error. |
| 15 | Uninitialised interrupt. |
| 24 | Spurious interrupt. |
+----------+-------------------------------+
Postmortem Information.
-----------------------
This program,as does the operating system when
crashing,produces postmortem information.This is so that once the
program has tried to crash,the status of the machine before the
crash can be found.This aids with debugging the crashed program by
allowing you to see what went wrong and where.This information can
be viewed with a program such a 'POSTMORT.PRG' by M.S.Powell,as
found on the Coverdisk of ST Format No.1.
Examples.
---------
So that you can see the program in action an example program
is supplied.
First,Run the NOBOMBS.TOS program and exit to the desktop
with a key press.Then run the DIVZERO.PRG program.This program
will try to do a Division by Zero,which is an error.But instead of
erroring,the error handler will intercept this and should print
the message :-
'Division by Zero (5 bombs)'
A simple press of any key will terminate the crashed
program and return you to the calling program ( e.g. DESKTOP).
Compatibility.
--------------
As far as I know,this program is compatible with all current
versions of TOS,that run on a 68000.Although I have not checked
this,the method of implementing the errors should easily work on
all ST's.
---------------
Anyone interested in knowing more about this program or are
interested in programming (especially in BASIC,C,MACHINE CODE and
others)or in general and wants to exchange ideas ,help,software or
tips.
Please contact me at :-
Mr. A.D. Messer.
'Lucerne',
Nett Rd,
Shrewton,
Salisbury,
Wiltshire.
SP3 4HB
---------------