TIP: Click on subject to list as thread! ANSI
echo: cis.os9.68000.osk
to: Kim Kempf 71161,3221 (X)
from: Bob van der Poel 76510,2203
date: 1991-09-13 21:23:39
subject: #12220-#Intercepts

#: 12237 S12/OS9/68000 (OSK)
    13-Sep-91  21:23:39
Sb: #12220-#Intercepts
Fm: Bob van der Poel 76510,2203
To: Kim Kempf 71161,3221 (X)

Kim, thanks for the details on intercept routines. I'll be interested to read
your reply to Mark's query (yet another stack?). But I still don't understand
something: just when does the F$RTE get called? Surely the C compiler is not
intelligent to create my intercept function differently from any other
function--and they all end the same by doing a RTS. Oh, does the intercept
routine itself set up the stack so that the RTS branches to the F$RTE and from
there back to the program?

Yes, you are correct in that it is possible to rewrite a program to check
global flags.... but the question which has to come up is--in how many
different places should one check? And there is always the possibility that
(especially during development!) that a minor loop might be infinite and the
only way out of the *$*%**$# thing is to hit ABORT. If the intercept just sets
a flag, hitting ABORT is not going to be all the helpful. Well, I guess it
could set a global flag, and have a panic flag too which causes a exit via the
intercept if a certain number of ABORTs have been done... but for termination I
think that doing a cleanup from the intercpet and then an exit is the cleanest.

The longjmp() technique is pretty sleasy. But, again, it is a nice way to
restart to a known point (esp. in games, etc.). Again, the checking of global
flags in who knows how many places can get pretty tedious. Plus, it slows down
the response time...

There are 2 Replies.

SOURCE: compuserve via textfiles.com

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.