🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.asm370
Article #48

Suppressing fixed point divide exception

#48
From: Paul Dadswell
Date: Thu, 22 Jun 1989 11:39
25 lines
1870 bytes
I have an application which allows an operator to plot files sent to
them on a plotter. One of the facilities is a command (QUERY) to
estimate how much longer a plot will take. It answers this by issuing
a STCK to get the current time and subtracting the starting time (also
stored by STCK). The subtraction is carried out by shifting both values
12 bits to the right to get microsecs into the LSB. The idea is then to
divide by the number of records plotted so far to get time per record
and multiply by the number of records left to get an estimate of the
time it will take.

Because the number of records is small compared to microsecs, I divide
the time by F'100000' to get it into 1/10 secs before dividing by the
number of records plotted so far. However despite all these efforts I
occaisonally get a fixed point divide exception, which crashes the
application and forces a re-ipl, not a desirable behaviour. Yes - I do
check that the number of records plotted is > 0.

Since the information is only a guess anyway, I would rather get a wrong
answer than crash. Is there some way of ignoring the divide exception
or trapping it which would enable me to give either the wrong answer or
a message along the lines "Cannot estimate time to finish....sorry"

Paul.

PS. The machine it is running on is a 3090 running HPO 5.
Technical Details
Message-ID: <8906221225.AA29193@jade.berkeley.edu>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!tut.cis.ohio-state.edu!ucbvax!ibm.southampton.ac.uk!CPI027

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!tut.cis.ohio-state.edu!ucbvax!ibm.southampton.ac.uk!CPI027
From: CPI027@ibm.southampton.ac.uk (Paul Dadswell)
Newsgroups: comp.lang.asm370
Subject: Suppressing fixed point divide exception
Message-ID: <8906221225.AA29193@jade.berkeley.edu>
Date: 22 Jun 89 11:39:32 GMT
Sender: daemon@ucbvax.BERKELEY.EDU
Reply-To: IBM 370 Assembly Programming Discussion List <ASM370%UCF1VM.bitnet@jade.berkeley.edu>
Distribution: inet
Organization: The Internet
Lines: 25