Path: csiph.com!x330-a1.tempe.blueboxinc.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!nx02.iad01.newshosting.com!newshosting.com!69.16.185.21.MISMATCH!npeer03.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!post01.iad.highwinds-media.com!newsfe17.iad.POSTED!00000000!not-for-mail From: David Lamb User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.18) Gecko/20110616 Thunderbird/3.1.11 MIME-Version: 1.0 Newsgroups: comp.lang.java.programmer,comp.lang.c Subject: Re: Arithmetic overflow checking References: <015aeb15-57db-48ab-9cd4-77f8448b632f@w24g2000yqw.googlegroups.com> <2rydnez7l-H5BYnTnZ2dnUVZ_vGdnZ2d@earthlink.com> <9LWdnZH2hdfmyYvTnZ2dnUVZ_vidnZ2d@posted.palinacquisition> <3797038f-22d1-40b2-8c12-60db5a0976b8@t5g2000yqj.googlegroups.com> <4e1bf1bc$0$15671$4fafbaef@reader2.news.tin.it> <4e1c149b$0$15663$4fafbaef@reader2.news.tin.it> In-Reply-To: <4e1c149b$0$15663$4fafbaef@reader2.news.tin.it> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Lines: 18 Message-ID: NNTP-Posting-Host: 67.193.237.254 X-Complaints-To: abuse@cogeco.net X-Trace: newsfe17.iad 1310473798 67.193.237.254 (Tue, 12 Jul 2011 12:29:58 UTC) NNTP-Posting-Date: Tue, 12 Jul 2011 12:29:58 UTC Date: Tue, 12 Jul 2011 08:29:50 -0400 Xref: x330-a1.tempe.blueboxinc.net comp.lang.java.programmer:6119 comp.lang.c:8173 On 12/07/2011 5:34 AM, io_x wrote: > "tm" ha scritto nel messaggio >> Yes, but it must be checked after every operation. >> A hardware that triggers an interrupt, would save this >> extra checks. > > #in how i see that > #i like extra checks > #if hardware 'triggers' an interrupt all you lost the prog > #or lost the control of the program; and this is not good. I seem to recall at least one computer architecture where a hardware interrupt essentially simulated a procedure call (indirectly through a fixed address), so the location where the exception occurred would be known to the exception handler. Thus control could be returned to the point of exception if desired (which it usually wasn't -- some sort of stack unwinding was likely better).