home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!sun-barr!cs.utexas.edu!zaphod.mps.ohio-state.edu!ub!dsinc!bagate!cbmvax!cbmehq!cbmden!kehlet!kehlet
- From: kehlet@kehlet.adsp.sub.org (Jesper Kehlet)
- Newsgroups: adsp.sw,comp.sys.amiga.programmer
- Subject: Exception handler example
- Message-ID: <kehlet.065m@kehlet.adsp.sub.org>
- Date: 13 Aug 92 01:54:14 GMT
- Distribution: adsp,world
- Organization: Compos Mentis Software Systems
- Lines: 32
- X-NewsSoftware: GRn 1.16e (7/4/92) by Mike Schwartz & Michael B. Smith
-
-
- Somebody told us some time ago, that he wanted to do a utility that made it
- possible for 68010+/6888x programs to be run on a 68000.
-
- It could be done via the exceptions 4 and 11, illegal instruction and
- LINE-F emulation.
-
- In search of a good way to remove the exception handler again, I came up
- with the 4-character identification, that can be put in a long word.
-
- I need some pros and cons, since I am now thinking of doing this other task
- myself, so decode it, look at the source and tell me what you think, i.e.
- your opinion.
-
- If you are interested in just using it as-is, it sets up a division by zero
- exception handler for the purpose of trapping exception #5, which doesn't
- really have to break the system...
-
- It is *NOT* mathematically correct, since simple math tells us, that it IS
- illegal, but I have reasoned with the fact, that the closer the denominator
- goes to zero, the higher the result of the division -- the numerator does
- really matter, except for going against zero from the positive or negative
- side -- I use the numerator to determine the sign of the operation.
-
-
- --
- Jesper Kehlet, Compos Mentis Software Systems -- A Kind Of Magic
-
- (uunet|pyramid|rutgers)!cbmvax!cbmehq!cbmden!kehlet!kehlet
- cbmehq!cbmden!kehlet!kehlet@cbmvax.commodore.com
-
- Since I am the president of this company, I speak not only for myself!
-