TERRA Datentechnik, Technical Support                     06-May-92/Bj
======================================================================

Show run-time errors in MultiScope
----------------------------------

(see file(s) in:)
TERRA Tech Support Mailbox: SIG   M2V4  SHOWRTE.ZIP
TERRA Support Disk (>1.3) : \HINTS\SHOWRTE.TXT, SHOWRTE.ZIP 


These files provide an example on how to enable the debuggers to stop on 
run-time errors.

SHOWRTEA.ASM inserts an INT3 (a break point) into the code, SHOWRTE.MOD 
installs this routine as exception handler.  This means, that whenever 
an exception (run-time error) occurs, the debugger will act as if a break 
point has been reached.

TEST.MOD is a little sample program that shows an RTE.

To have the debugger stop at the exception, simply say 'B' (go to break 
point).  Then d'clk on the second entry in the call chain (the first entry 
is the exception handler itself), and you will see the offending line.

An INT3 in a program outside the debugger will cause a hang.  Therefore, 
a second example is provided, showing a possible work-around.  

TEST2.MOD installs ShowRTE as an exception handler conditionally, only if 
the variable debug is TRUE.  In the program, debug is explicitly set to 
FALSE, so when executing the program normally, a run-time error message is 
displayed as expected.

In the debugger, modify the value of debug to TRUE just after the program 
set it to FALSE.  Test2 will then install the ASM exception handler (just 
like Test), and a 'B' (go to break point) will break just like in the 'TEST' 
example.
